Live data from Hacker News

Ask HN Emacs Users: What's in your .emacs file?

news.ycombinator.com

1–10 of 67 posts

Re: Ask HN Emacs Users: What's in your .emacs file?

#3
My .emacs, which is commented, is located at http://github.com/zck/emacs/blob/master/.emacs . I need to update it and move it over to bitbucket, though.

Specifically, my favorite things are show-paren-mode, ido-mode, and rebinding C-, and C-. to move back and forward between windows.

Re: Ask HN Emacs Users: What's in your .emacs file?

#4
I went .emacs bankrupt this summer.

gist.el, powershell-mode, yaml-mode, org-mode are a few I've taken out for brevity.

Otherwise, a few of these are emacs23 specific:

  ;; syntax highlighting
  (global-font-lock-mode 1)
  
  ;; add .emacs.d to load path
  (setq load-path (cons "~/.emacs.d" load-path))
  
  ;; nethack
  (add-hook 'nethack-mode-hook (lambda () (linum-mode 'nil)))
  (setq load-path (cons "~/.emacs.d/nethack" load-path))
  (autoload 'nethack "nethack" "Play Nethack." t)
  (setq nethack-program "/opt/local/bin/nethack")
  
  ;; 4 spaces in objective-c
  (add-hook 'objc-mode-hook
            (lambda ()
              (setq tab-width nil)
              (setq c-basic-offset 4)))
  
  ;; straight to *scratch* buffer please
  (setq inhibit-splash-screen t)
  
  ;; use old navigation for line movement
  (setq line-move-visual nil)

  ;; linum mode
  (require 'linum)
  (global-linum-mode 1)
  (add-hook 'linum-before-numbering-hook
  	  (lambda () (setq linum-format "%d ")))

Re: Ask HN Emacs Users: What's in your .emacs file?

#10
Funny, about an hour ago I finally broke down and remapped Ctrl+w to backward-kill-word[1] after re-reading Yegge's Effective Emacs, and you've just reminded me to push the commit to my fork of emacs-starter-kit, which is a great way to get a core set of functionality. Works best if you're tyrannical about keeping it up to date, which I mostly am.

http://github.com/daemianmack/emacs-starter-kit/

Favorite two most recent additions: pyflakes/pylint for Python, and rainbow-mode for CSS.

[1] Having backward-kill-word a two-finger-stroke, instead of the two-handed alt+Backspace, is great! On the other hand, it turns out I kill-region a lot more than I thought I did, so that's a little weird.

Post reply on HN