3

I always type paired characters by pairs:

'' "" () [] {} <>

How do I map Vim immediately jump inside them when I type them during Insert Mode? I tried some googling but I can't seem to get the right search term.

4

2 回答 2

5

使用AutoClose插件,它将为您插入右大括号,将光标留在其中。如果您足够快地键入匹配的括号,它会将您的光标移到该对之外。

于 2012-02-06T17:30:41.087 回答
1

在不使用任何插件的情况下,我发现我可以使用它:

inoremap '' ''<esc>i
inoremap "" ""<esc>i
inoremap () ()<esc>i
inoremap [] []<esc>i
inoremap {} {}<esc>i
inoremap <> <><esc>i
于 2012-02-08T07:41:44.160 回答