c++ - Is there any good way to control the line just after manual indented line? -


i'd control indent follows:

#define my_ns_macro namespace myns  namespace ns1 { int a;  // indent 0 expected int b;  // indent 0 expected }  my_ns_macro { int c;  // indent 0 manually (if press tab here, indent 4)  int d; // expect indent 0, indent 1... }  void f() {     int e = 0; // indent 4 expected. } 

the variables a, b, , e indented expected. variable c, emacs controls indent 4. however, i'd indent 0. remove 4 spaces hand. it's ok me. then, enter next variable d, expect line indented 0 too. however, indented 1. there way control indent?

here .emacs:

(defun my-c-c++-mode-init ()   (setq c-basic-offset 4)   (c-set-offset 'substatement-open 0)   (c-set-offset 'innamespace 0)   (c-set-offset 'arglist-intro '+)   ) (add-hook 'c-mode-hook 'my-c-c++-mode-init) (add-hook 'c++-mode-hook 'my-c-c++-mode-init) 

turns out, there's variable that's interfering want c-label-minimum-indentation

if set so:

(setq c-label-minimum-indentation 0)  ;# default 1 

you indentation want.


Comments

Popular posts from this blog

javascript - Slick Slider width recalculation -

jsf - PrimeFaces Datatable - What is f:facet actually doing? -

angular2 services - Angular 2 RC 4 Http post not firing -