Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

my emacs.d still needs a few tweaks but I'm convinced it always will.

most useful parts: replacing fundamental mode with text-mode as the default mode when a new buffer is open.

(setq default-major-mode 'text-mode)

turn auto fill (automatic line wraping) and flyspell (spellchecking) on by default

(add-hook 'text-mode-hook 'turn-on-auto-fill)

(add-hook 'text-mode-hook 'turn-on-flyspell)

also I find yasnippet http://code.google.com/p/yasnippet/ wonderful for coding html mockups and django templates.

my github repo if anyone cares to take a peek: http://github.com/bmac/emacs



Regarding newlines: in Emacs 23, I recommend visual-line-mode over auto-fill-mode, unless you actually need hard line breaks. For when you do want hard newlines, (setq-default fill-column 80). I never understood why the default is 72; it makes text files excessively narrow.


The default is 72, in my understanding, because of the historical use of email.

As folks successively quote each other in a thread, the prepending of '>' to the quoted text requires something narrower than 80, else it'll hit the 80-chars-wide limit and wrap.

72 would allow 4 or 8 quote-levels, depending on if your client decides to insert spaces around the '>'.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: