2

I try to change indent from 4 spaces to 2 spaces (I need to write code with this style).

I try to evaluate this in the buffer with php code:

(setq tab-width 2)

or

(setq-default tab-width 2)

but it didn't work, when I type TAB I got 4 spaces.

Geoffrey
  • 5,407
  • 10
  • 43
  • 78
jcubic
  • 61,973
  • 54
  • 229
  • 402

1 Answers1

4

Ok found it:

(setq c-basic-offset 2)
jcubic
  • 61,973
  • 54
  • 229
  • 402