Bala
Bala

Reputation: 1019

Why isn't return bound to newline-and-indent by default on emacs

I have tried emacs on and off for a while now and every time I start emacs, I go through the same routine. Customizing. The first one is binding return to newline-and-indent. (g)Vim does this by default. Showing matching parenthesis is also done by default on (g)Vim. It is grea that I can customize emacs to my heart's content but why doesn't emacs have nice and easy defaults? For reference, I am now using Emacs 23 on a RHEL5 box.

Upvotes: 1

Views: 450

Answers (3)

scottfrazer
scottfrazer

Reputation: 17337

The title of your question doesn't really reflect what your question is (and has been answered by Trey and Torok), but I'll tell you why I like it being bound to just newline: useless whitespace. Say you are nested inside a conditional in a function etc. and hit return a couple times to leave a blank line. The blank line now has a bunch of space chars on it. Yes, you can (and I do) remove trailing whitespace before saving, but I also have visual whitespace mode on and I can see it there taunting me.

Upvotes: 2

viam0Zah
viam0Zah

Reputation: 26322

To have those nice and easy defaults, install Emacs Starter Kit. It enables by default a bunch of useful and convenient features make even the advanced Emacs users more productive.

Otherwise, as TJ pointed out, Emacs Customization Mode (type M-x customize) allows you to save permanently any of the settings. You can even store them in a separate file from your dotemacs―(setq custom-file "~/.emacs-custom.el")―so you can use it in every computer you work on.

Upvotes: 2

Trey Jackson
Trey Jackson

Reputation: 74480

Probably because RMS didn't want it, that and because changing long-standing defaults is just an issue of politics. Like vi, Emacs has a hard-core following and basic changes like these are minefields.

Note: if you saved your customizations, then you wouldn't have to re-do them every time...

Upvotes: 2

Related Questions