Add autoindentation to emacs

If you hit Ctrl+J, instead of Enter, you get ‘Newline+Indent’. If you like the feature, you can permanently add this to emacs defaults by adding the following to your ~/.emacs

(define-key global-map (kbd "RET") 'newline-and-indent)

Read more here and here.

You are reading this post on Joel G Mathew’s tech blog. Joel's personal blog is the Eyrie, hosted here.