本文介绍了在特定点折叠JSON的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个JSON文件,并希望在每行中使用一个切换开关( z a )对其进行折叠,并使用一个称为subsection的键.我考虑过使用像这样的全局命令:
I have a JSON file and would like to fold it with a toggle (za) at every line with a key called subsection. I thought about using a global command like:
:g/subsection/za但是它不起作用,因为全局命令期望将编辑功能作为第二个参数,并且 z a 未编辑.
but it doesn't work since a global command expects an editing function as the second argument, and za is not editing.
有什么想法吗?
推荐答案怎么样::g/subsection/norm za
来自:h :g
To repeat a non-Ex command, you can use the ":normal" command: > :g/pat/normal {commands}更多推荐
在特定点折叠JSON
发布评论