Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Should I switch from Vim to Emacs, and if so any suggestions? [closed]

First of all, I love vim. I have been using vim for a few years now and it has changed my perceptions of what an editor is capable of. I also love modes.

However I am thinking of switching and here is why:

I really like Xcode and it has emacs bindings. I use Mac OS X and it has emacs functionality in all text input fields. I hate using the mouse, and I think switching would make sense.

I'm also kind of tired of doing all my work in terminal windows: with Xcode I would have access to a great IDE, and a great rat-free editor (emacs).

Having said all this, I find emacs Meta keys approach a little uncomfortable, and a little daunting, plus I have spent a lot of time learning to do things in vim.

Should I switch? And if so has anyone else made this switch or used both vim and emacs and have an opinion about which they prefer and why?

Also for emacs users out there who have used Xcode, how good is the emacs implementation in Xcode? Worth the switch?

like image 631
Bjorn Avatar asked Feb 26 '09 19:02

Bjorn


People also ask

Should I use Emacs or Vim?

Emacs is easier to learn since it has a more natural interface (for users familiar with GUI-based text editors). Since Vim has different editing modes, beginners find it a little harder to learn.

Is Emacs slower than Vim?

Speed. Both VIM and Emacs are super fast, especially when compared to modern-day Electron GUI text editors (like Brackets and Atom). There are arguments against Emacs being slower than Vim but the differences are very insignificant. Emacs takes around 1-2 seconds at startup compared to the instant startup of Vim.

Can you use Vim in Emacs?

But if you're already accustomed to the Vim key commands, you may be discouraged from learning a whole new set of Emacs commands. That's why a group of Vim users got together and ported Vim key commands over to Emacs. In order to use the Vim key commands you just need to install Emacs and install the “evil” major mode.


1 Answers

Why can't you use both? Using Emacs doesn't mean you have to stop using Vim.

Benefits of learning and using both:

  • Sometimes one editor is better than the other for some particular language. Better syntax highlighting, better indentation rules, better macros, better integration with external tools, or whatever. You will always be using the best editor for the job if you're able to choose between Vim and Emacs.
  • Sometimes a community gravitates toward one editor or the other. You can participate in the community no matter which is used.
  • You can learn neat tricks from one editor and port them to the other. Both editors have features that you'd never think of if you stuck to one exclusively.
  • If some computer only has one or the other set up, you can still use it effectively.
  • Learning is fun.
  • Geek cred.

Disadvantages:

  • Learning takes time and effort.
  • Fragmentation and duplication of effort (all of your favorite tricks and keymappings have to be written twice, in Vim script and elisp).

I see the advantages outweighing the disadvantages.

I use Emacs for Lisp code, and because I use Lisp for web development, I also stay in Emacs for CSS and Javascript and such. I use Vim for Ruby, Python, Perl, PHP, BASH, plaintext, and almost everything else. Both editors have strengths and weaknesses, but mostly both have strengths.

The only way to know if you like Vim or Emacs better is to invest time in both, so you can make an informed decision. Maybe you'll find that Emacs fits the way you think and work better, or maybe not. It's such a subjective thing that the only way to know is by trying.

Text editors aren't religions, and the free disk space in your brain is for all intents and purposes unlimited. So use both and enjoy.

like image 104
Brian Carper Avatar answered Sep 21 '22 14:09

Brian Carper