vim点击“回车"在特定的信件上 [英] vim hit "enter" on a specific letter
问题描述
我想在文件中的箭头符号上按回车键.基本上在按下回车键后,箭头键会折叠以显示更多文本.我有很多这样的箭头键.
I want to hit enter on the arrow symbol in a file. Basically after hitting enter the arrow key collapses to show more text. I have so many such arrow keys.
▾ $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
它不会折叠文本和箭头后的文本到下一行.
It does not collapse the text and the text after arrow breaks to next line.
▾ $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])
推荐答案
参见 http://vim.wikia.com/wiki/Folding 或 http://vimdoc.sourceforge.net/htmldoc/折叠.html
特别是:za
切换一级折叠,zA
切换所有级别.您需要在节点上才能使其工作.
particularly: za
toggles one level of folding, zA
toggles all levels. You need to be on the node for this to work.
要打开文件中的所有折叠:zR
(并且 zM
将关闭所有折叠)(当然这里不需要在节点上,因为它作用于所有这些)
To open all folds in the file: zR
(and zM
will close all of them) (of course here, no need to be on a node, as it acts on all of them)
这篇关于vim点击“回车"在特定的信件上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!