emacs - 渲染换行符

时间:2014-08-15 21:21:31

标签: logging emacs

我使用emacs查看php错误日志。问题是当记录多行时很难读取。它看起来像这样:

[Fri Aug 15 14:55:02 2014] [error] [client 10.10.10.10] WC_Checkout Object\n(\n    [posted] => \n    [checkout_fields] => Array\n        (\n            [billing] => Array\n                (\n       \
             [billing_country] => Array\n                        (\n                            [type] => country\n                            [label] => Country\n                            [required\
] => 1\n                            [class] => Array\n                                (\n

OSX具有控制台日志查看器程序,可以很好地使用换行符格式化日志文件。无论如何我可以获得正确格式化多行错误的emacs(或使用其他终端日志查看程序)吗?即下面的内容而不是上述内容:

[Fri Aug 15 14:55:02 2014] [error] [client 67.161.204.87] 
   WC_Checkout Object
   (    
   [posted] => 
        [checkout_fields] => Array
        (
            [billing] => Array
            (
                 billing_country] => Array
                 (
                     [type] => country
                     [label] => Country
                     [required] => 1
                 )
            )
         )
    )

1 个答案:

答案 0 :(得分:1)

您可以通过以下操作将\n替换为换行符:

Mx replace-string RET \n RET Cq Cj