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

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -