Live data from Hacker News

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

news.ycombinator.com

41–50 of 67 posts

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

#41
Mine's on github too: http://github.com/markhepburn/dotemacs

It's quite large, and includes a lot of third-party stuff, much of it as submodules.

It's relocatable (with additional platform and/or machine-specific loads) which might be semi-interesting: http://everythingtastesbetterwithchilli.com/initialisation-f...

Little things off the top of my head that I find useful: * wind-move -- use shift-arrow keys for window navigation * (fset 'yes-or-no-p 'y-or-n-p) * browse-kill-ring * mic-paren-mode * rename-file-and-buffer from Yegge * unscroll (undo inadvertent C-v) from Glickstein's book * lots of little tweaks like using C-,/. for smooth scrolling up/down * uniquify to keep buffer names unique * find-file-at-point

Lots of autloads for more efficient initialisation (although that's less of an issue now that I'm using --daemon at startup)

I do the usual UI tweaks like turning off the menu and tool bar, using ido mode (with smex -- ido for commands), etc. There's not a lot of keys that I rebind, but I do change backward-kill-word to C-w (consistent with shell usage), and kill-region to C-xC-k. Both those suggestions were from Yegge's effective emacs article which is worth a browse; I've ignored his advice to also change M-x to C-xC-m though.

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

#42
post #35

Viper mode gives you the best of both worlds, although I'm probably considered a heretic in both religions. (setq viper-mode t) (require 'viper) (custom-set-variables '(column-number-mode t) '(inhibit-startup-screen t) '(show-paren-mode t) '(tool-bar-mode nil) '(menu-bar-mode nil)) I used to have slime config stuff in there, but now Ubuntu does it all for me. Thanks Ubuntu!

So you're the other viper-mode user! We should have coffee sometime :)

Or coffee and tea mixed. My favorite.

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

#45
post #23

My .emacs is on GitHub: http://github.com/avar/dotemacs/blob/master/.emacs along with the elisp library I use http://github.com/avar/elisp Some noteworthy things: It's a ~1200 line file (and expanding) this is how I navigate it: (defun show-dot-emacs-structure () "Show the outline-mode structure of ~/.emacs" (interactive) (occur "^;;;;+")) Which shows the outline of the file, e.g.: 74 matches for "^;;;;+" in buffer:…

> I really wish I could find something for Emacs which automatically detects the style of the code I'm editing and switches the coding style to that. If it makes you feel any better, back when I was managing a team in Visual Studio, we called this the "When in Rome" feature. And yes, the versions of this we tried to put together worked as you'd expect... mostly. Determining peoples' whitespace decisions are not trivi…

> How many lines does the THEN clause of an IF need to have before you surround it with curlies?

If I'm your manager, 0.

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

#47
post #35

Viper mode gives you the best of both worlds, although I'm probably considered a heretic in both religions. (setq viper-mode t) (require 'viper) (custom-set-variables '(column-number-mode t) '(inhibit-startup-screen t) '(show-paren-mode t) '(tool-bar-mode nil) '(menu-bar-mode nil)) I used to have slime config stuff in there, but now Ubuntu does it all for me. Thanks Ubuntu!

So you're the other viper-mode user! We should have coffee sometime :)

He's not the only one. viper + vimpulse here.

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

#48
post #47

Earlier quoted context omitted.

So you're the other viper-mode user! We should have coffee sometime :)

He's not the only one. viper + vimpulse here.

Another Viper mode heretic here. 10 years of everyday vi (I started with elvis!) and then switching to emacs will do that. I use gtags and doxymacs pretty extensively too.

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

#49
I actually did a huge re-organization of my .emacs file (including moving it to .emacs.d/init.el) a few months ago, dividing it into topic specific configuration files (general, files and buffers, programming, python-config, etc) and have support for loading different configurations depending on which machine I'm on.

http://github.com/Nafai77/config/tree/master/HOME/_emacs.d/

One of the next things I'm going to do is explore using el-get. It's always a pain moving to a new machine and having to download and checkout all of the third-party libraries I use.

Post reply on HN