当前位置:   LINUX > 正文

删除到vim中当前括号内的结尾

linux,vim,text-editor,json,python,go,DevBox,在线流程图,编程,编程问答,程序员,开发者工具,开发工具,json解析,二维码生成,unix时间戳,在线开发工具,前端开发工具,开发人员工具,站长工具

说我正在编辑这个json

{
  "a": {"language": "python"},
  "b": {},
  "c": {"language": "java"},
  "d": {"encoding": "utf-16"}
}

我的光标在b"b": {}.我想删除直到当前{}块结束 .所以它看起来像,

{
  "a": {"language": "python"},
  "
}

看起来很奇怪.但解释我想要什么.

我怎么能在Vim中做到这一点?



1> Marth..:

你可以用d]}.
来自:help ]}:

                                    *]}*
]}          go to [count] next unmatched '}'.
            |exclusive| motion.

该帮助还说这是该动作的用例之一:

The above four commands can be used to go to the start or end of the current
code block.  It is like doing "%" on the '(', ')', '{' or '}' at the other
end of the code block, but you can do this from anywhere in the code block.

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/blog/LINUX/detail/18545
推荐阅读
相关标签
  

闽ICP备14008679号