我想按一下文件中的箭头符号。基本上在击中后输入箭头键折叠以显示更多文本。我有这么多这样的箭头键。
▾ $wp_filter = (array [365])
\
▸ $wp_filter['pre_term_name'] = (array [2])
完全崩溃后
▾ $wp_filter = (array [365])
\
▾ $wp_filter['pre_term_name'] = (array [2])
\
▾ $wp_filter['pre_term_name'][10] = (array [2])
\
▾ $wp_filter['pre_term_name'][10]['sanitize_text_field'] = (array [2])
\
⬦ $wp_filter['pre_term_name'][10]['sanitize_text_field']['function'] = (string [19]) `sanitize_text_field`
我正在尝试
:%s/▸/\r/g
在箭头中断到下一行后,它不会折叠文本和文本。
▾ $wp_filter = (array [365])
\
$wp_filter['pre_term_name'] = (array [2])
我也试过
:%s/▸/▸\r/g
它在箭头标记后打破了这一行。
▾ $wp_filter = (array [365])
\
▸
$wp_filter['pre_term_name'] = (array [2])
答案 0 :(得分:0)
请参阅http://vim.wikia.com/wiki/Folding或http://vimdoc.sourceforge.net/htmldoc/fold.html
特别是:za
切换一级折叠,zA
切换所有级别。您需要在节点上才能使其正常工作。
要打开文件中的所有折叠:zR
(并且zM
将关闭所有折叠)(当然,这里不需要在节点上,因为它对所有这些都起作用)