Emacs: What's the Best Setup for Python, Ruby, Java, JavaScript, etc?
One of the common question i get is:
what's the best emacs setup for {Python, Ruby, PHP, JavaScript, Java, C++, etc}?
Vanilla Emacs works fine. You just need to master it.
I recommend mastering plain emacs first. Most people asking such questions have no idea about emacs basics.
〔see Emacs: Init File Tutorial〕
〔see Emacs: Master Tips〕
There are, however, many useful and quality emacs enhancements. Here's a guide.
List of Emacs Starter Kits, year 2013
Try a starter kit. I recommend spacemacs.
List of Emacs Starter Kits, year 2013
Abbrev and Function Templates
abbrev saves lots of typing! Setup your own collection of abbrevs of any lang.
Emacs: Setup Hundreds of Abbrevs
Smart Completion
Try company-mode at http://company-mode.github.io/
It's available on MELPA.
〔see Emacs: Install Package with ELPA/MELPA〕
Note: if you are {C, C++, Java} programer working on large code base, emacs's completion will never be as good as those in Microsoft Visual Studio or IntelliJ (or the lesser Eclispe, NetBeans). (only very few may disagree. That usually means you have to be expert of emacs and elisp.)
Syntax Checking
try flycheck at http://www.flycheck.org/en/latest/
Ruby
Try emacs prelude https://github.com/bbatsov/prelude
try Steve Purcell's https://github.com/purcell/emacs.d
also
- 〔Setting up Emacs as Ruby development environment on OSX By Hemant Kumar. At http://crypt.codemancers.com/posts/2013-09-26-setting-up-emacs-as-development-environment-on-osx/ , accessed on 2013-10-30〕
- 〔Configuring Emacs as a productive development environment for Rails development By Gaurab Paul. At http://lorefnon.me/2014/02/02/configuring-emacs-for-rails.html , accessed on 2014-04-24〕
Haskell Clojure Elm etc
try Steve Purcell's https://github.com/purcell/emacs.d
Python
try Steve Purcell's https://github.com/purcell/emacs.d
try
• Elpy, the Emacs Lisp Python Environment https://github.com/jorgenschaefer/elpy/wiki
• Jedi.el — Python auto-completion for Emacs http://tkf.github.io/emacs-jedi/
• Ropemacs is a plugin for performing python refactorings in emacs. It uses rope library and pymacs. https://github.com/python-rope/ropemacs
HTML CSS
try web-mode http://web-mode.org/
try Emacs: Xah CSS Mode 📦 for pure css file.
JavaScript
emacs has a simple js mode builtin.
other js mode with more features are
js2 mode https://github.com/mooz/js2-mode
js3 mode (fork of js2) https://github.com/thomblake/js3-mode
if you prefer simple and static, try my Emacs: Xah JS Mode (JavaScript) 📦
skewer-mode, for live web dev, connecting to browser. https://github.com/skeeto/skewer-mode
C, C++
〔Emacs for C++ developers By Bin Chen (陈斌). At ❮https://github.com/redguardtoo/mastering-emacs-in-one-year-guide/blob/master/emacs_cpp_developer_guide-en.org❯, accessed on 2013-07-07〕
Emacs Lisp
try my Emacs: Xah Elisp Mode 📦
Editing Parenthesis
lisp hackers like ParEdit http://www.emacswiki.org/emacs/ParEdit. I don't like.
try smartparens, which is based on ParEdit https://github.com/Fuco1/smartparens
try lispy, an alternative to ParEdit or SmartParen https://github.com/abo-abo/lispy
or, try Xah's way. That is, Emacs: Xah Fly Keys 📦. It deals with parenthesis/brackets too.
Emacs Key System
emacs keybinding system is the MOST important element for improving efficiency, for working with any programing language. Because, it is the keys you use to do anything in emacs.
using a efficient emacs keybinding system will beat efficiency than any emacs enhancement.
i recommend one of the following
try ergoemacs-mode http://ergoemacs.github.io/
try https://github.com/emacs-evil/evil
You need few weeks to be proficient with any of them.