balu
balu

Reputation: 3689

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

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 where that behaviour comes from? And how do I shut it off?

Thanks

Upvotes: 4

Views: 981

Answers (2)

Drasill
Drasill

Reputation: 4016

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.

Upvotes: 4

sehe
sehe

Reputation: 393134

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

Upvotes: 5

Related Questions