vim-autoclose icon indicating copy to clipboard operation
vim-autoclose copied to clipboard

Inserting two curly braces causes automatic line break

Open ami7ava opened this issue 12 years ago • 9 comments

There is a newline inserted if two curly braces ({{) are typed and results the following

{
|
}

This helps while editing javascript files, but creates problem when editing a template file such as mustache or handlebarsjs.

Being able to enable/disable this feature for a set of filetypes could be great.

ami7ava avatar Dec 22 '12 12:12 ami7ava

I do not have a newline inserted when two curly braces inserted. Is this a feature request? or just request an option? I would appreciate it if you could tell how to insert a new line for curly braces.

yichuan1118 avatar Jan 08 '13 07:01 yichuan1118

+1. This has been irking me for a while and couldn't figure out which plugin was causing it. Simply doing :iunmap {{ doesn't kill it either.

cvincent avatar Mar 12 '13 05:03 cvincent

+1 really annoying while using handlebar templates

caifara avatar Jul 10 '13 08:07 caifara

:+1: Would be really helpful, I get tired to always have to go up and start typing ^^

borisguery avatar Jul 19 '13 16:07 borisguery

This did it for me:

imap {{ {{}}<Esc>hi

olgen avatar Oct 03 '13 11:10 olgen

thanks @olgen for workaround

patrickmcelwee avatar Nov 02 '13 01:11 patrickmcelwee

+1

wamoyo avatar Jun 18 '14 15:06 wamoyo

This issue affects me also. Quite annoying. @olgen's workaround does not work for me, because when I type <p>{{item.title and continue typing }}</p> it ends up as <p>{{item.title}}}}</p> -- not what autoclose is supposed to do. My workaround is to disable autoclose entirely for Handlebars buffers.

xtagon avatar Apr 29 '15 05:04 xtagon

Thanks @olgen, :+1:

earthday avatar May 08 '15 04:05 earthday