开发者

How to disable automatic line break when inserting two curly braces in vim?

开发者 https://www.devze.com 2023-03-09 18:19 出处:网络
Whenever I type two curly braces ({{), I get something like that: { } is used to describe the position of the cursor.

Whenever I type two curly braces ({{), I get something like that:

{
|
}

| is used to describe the position of the cursor.

This behaviour is totally annoying, e.g. when using different template engines which reserve this syntax for variables.

How can I find out whe开发者_如何学JAVAre that behaviour comes from? And how do I shut it off?

Thanks


To find out where it comes from:

:verbose imap {{
:verbose map {{

Look for the mapping with 'i' (insert mode mapping) and see where it is defined

If that's not it, it could be an abbreviation:

:verbose abbrev


If you use the same plugin as me, AutoClose, then you can type <leader>a (which is ,a for me, it depends on your <leader> key).

<leader>a toggles On or Off for autoclose.

0

精彩评论

暂无评论...
验证码 换一张
取 消