Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 275
balu Avatar asked Jan 20 '23 14:01

balu


2 Answers

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
like image 186
sehe Avatar answered Jan 28 '23 05:01

sehe


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.

like image 30
Drasill Avatar answered Jan 28 '23 06:01

Drasill