For the LIFE of me I can't figure out why emacs indents lines in *.cmake files with 2 spaces per indent rather than what the Standard Indent is set to in customize. I also have c-basic-offset
set to 4. I can't find anything with apropos help, google, C-h C-m
...
EVERYTHING ELSE works with indentation spacing of 4 -- python, c++, etc. Why does cmake indent to 2 spaces while everything else does 4? How can I change it back to use 4 spaces?
From a quick look at cmake-mode
, cmake-tab-width
is the variable you want to change.
Try (setq cmake-tab-width 4)
somewhere in your Emacs startup files.
This is with Emacs 24.3 on Ubuntu 14.04; cmake-mode.el seems to come from CMake 2.8.12.2 (all stock Ubuntu provided packages).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With