Ask HN: What's in your .emacs file?
1–10 of 60 posts
Re: Ask HN: What's in your .emacs file?
#2Mine's pretty minimal at the moment, but it does the job.
Re: Ask HN: What's in your .emacs file?
#3Re: Ask HN: What's in your .emacs file?
#4 ;; Don't mix tabs and spaces
(setq-default indent-tabs-mode nil)
;; Use "newline-and-indent" when you hit the Enter key so
;; you don't need to keep using TAB to align each line.
(global-set-key "\C-m" 'newline-and-indent)
;; Get rid of the with duplicate file names
(require 'uniquify)
(setq uniquify-buffer-name-style 'post-forward-angle-brackets)
And then a whole bunch of autoload statements for different programming languages.Re: Ask HN: What's in your .emacs file?
#5delete-delete-delete save-buffer Much better.
Re: Ask HN: What's in your .emacs file?
#6http://bitbucket.org/[redacted]/dotfiles/src/tip/.emacs.d/pl...
Probably my favorite bit of the config is that it uses flymake to run Pyflakes on my Python code as I'm writing it. I also have a little plugin that shows the error in the minibuffer area when the point is over the offending line.
It also disables backup/autosave file littering by using a locked down directory in /tmp.
As far as bindings go, I wrote delete-backward-indent for python-mode which deletes a level of indentation instead of just one space. There's also newline-maybe-indent that doesn't indent if the previous line has no indentation.
Everything else is pretty straightforward customization, I think. flyspell-prog-mode is another thing worth mentioning: it highlights spelling errors, but only in strings and comments.
Re: Ask HN: What's in your .emacs file?
#7The basic init.el file loads my various language modes, and some other minor modes (e.g., tempbuf-mode). It also loads a bunch of files from the "emacs.d/my_lisp" directory which contains various overrides and new functionality attached to existing modes (e.g., icicles customization, assorted one-off functions I want to add to modes). Lastly, it loads a bunch more files from my emacs.d/lisp directory which implement custom functionality.
For example, the current emacs M-x eshell doesn't behave the way I like. I often want multiple shells, so I've build a "ring of shells" functionality: f6 cycles through the ring of shells, C-f6 creates new shell window in the ring. I did something similar with window configurations.
Also, the emacs.d stores all modes which I use regularly. So when I migrate to a new computer, all I need to do is
darcs get me@oldbox:emacs.d
and tweak a few settings.Re: Ask HN: What's in your .emacs file?
#8Re: Ask HN: What's in your .emacs file?
#9178 lines of crap accumulated over about 20 years. I think I only use an indent variable setting, one key binding, and a handful of language autoloads. delete-delete-delete save-buffer Much better.
I hear ya.
One of the things I started doing lately is not moving any dotfiles automatically when I get a new machine. After 3 days of moaning, I go and dig out just the stuff that I have noticed I am missing. (I do the same for firefox plugins and so on). It has definitely helped with the historical crud.
Re: Ask HN: What's in your .emacs file?
#10 (add-hook 'c-mode-common-hook
(lambda ()
(font-lock-add-keywords nil
'(("\\