Reload .emacs file: M-x eval-buffer
Emacs keys
Emacs intro
Emacs intro
Tabs and spaces
Replace tabs with spaces in selected region: M-x untabify
Force emacs to indent with spaces instead of tabs:
M-x set-variable < RET > indent-tabs-mode <RET > nil
or place this in .emacs (setq-default indent-tabs-mode nil);
Change tab width in buffer:
M-x set-variable RET tab-width RET 8
(setq-default tab-width 4)
indent region: 'C-M-\' == CTRL+ALT+\
indent parenthetical grouping: 'C-M-q' (place marker on first curly paranthesis)
indent whole function where marker is located: C-c C-q
Set the encoding by C-x RET c
Mark all: 'C-x h'
Set newline coding to unix:
C-x RET f unix RET
Set max column width:
(setq-default fill-column 81)
Show whitespace:
M-x set-variable < RET > show-trailing-whitespace <RET > t/nil
Turn on auto line break:
M-x auto-fill-mode
Tips: http://xahlee.org/emacs/emacs_adv_tips.html