How to get vim to indent once when entering a newline inside brackets -
one thing has been annoying me lot in vim if enter new line inside pair of brackets, automatically inserts 2 (8 spaces):
x = { } y = [ ] z = ( )
i'm unsure how change enters 1 indent (4 spaces). furthermore, closing bracket isn't indented @ when enter new line this:
x = { }
my vimrc: https://pastebin.com/syq55w9m
it's because of option smartindent. according vim :
an indent automatically inserted: - after line ending in '{'. - after line starting keyword 'cinwords'. - before line starting '}'
personally use auto-pairs instead of vim-autoclose, in case want new line :
x = { }
Comments
Post a Comment