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
Post a Comment