i wonder anyone here use emacs ? i have some questions when coding with C++ file, for example how to customize indent size and highlight color ?
Printable View
i wonder anyone here use emacs ? i have some questions when coding with C++ file, for example how to customize indent size and highlight color ?
'M-x font-lock-mode' should do the colouring for you. Not sure about the indent size. I use vim now, not emacs.
edit your ".emacs" file (probably in your home directory) using the Lisp like emacs scripting language.
- OR -
click: Options -> Customize Emacs -> Top level Customization Group
and customize through the GUI.
thanx i dive myself into Top level Customization and found standard indent size is 4 ? but actually when i coding a file default it seems indent is 8 spaces far. what's wrong ???Quote:
Originally Posted by Perspective
hmmm, my standard indent size is 4 too, but may actual tab size when coding is 2.Quote:
Originally Posted by black
try adding this to your .emacs file, you can change the 4 to whatever tab size you want.
Code:;; set tab size to 4
(defun my-c-mode-common-hook ()
(setq c-basic-offset 4)
)
(add-hook 'c-mode-common-hook 'my-c-mode-common-hook)