emacs - Change autoindent offset in C after inserting a curly bracket -


i relatively new emacs environment , have trouble find solution problem.

what happens when insert curly bracket e.g. foo(, automatically adds 4 spaces in front of current line.

i using bsd c style. there setting can change behavior? have tried changing c basic offset has no effect far.

emacs isn't adding spaces, instead it's "fixing" indentation, thinks 4 spaces per indentation level. c-basic-offset variable want change, should put in .emacs:

(setq-default c-basic-offset 2) 

you need setq-default. if use setq, change current buffer.


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -