Vim or emacs what to learn? for beginners

This info is taken from stackoverflow answers and here is the link.

Vim:

better as a simple editor (fewer keys required for simple tasks)
more active scripting community - internal language: vimscript
one central repository of scripts, plugins, color schemes, …
also extensible in python, ruby
can be made portable (emacs has some problems with that)

Emacs:

non modal (most of today’s editors have taken this approach)
more powerful language for extending it (elisp is a full blown language, and in emacs you can practically redefine everything; while in vim you cannot redefine build in functions of the editor. On the downside, vimscript is relatively similar to today’s dynamic languages while elisp doesn’t resemble pretty much anything)
more extendible
excellent support for GNU tools (the bunch of them)

I learned Vim first, and am quite comfortable with it. I’m not so comfortable with Emacs. I use the Vim mode plugin for Sublime Text, as well as Vim within Tmux when I need to. I learned it as I learned Linux, so I wasn’t looking for a code editor so much as just a terminal editor. In the end, it’s going to be preference entirely, and a person would do well to learn either or both without much regards to which is “best”.

That said, beginners shouldn’t be learning complicated tools like these. Getting the programs themselves running is easy enough, but they’re not easy to extend and configure, and one could easily dump a week’s worth of coding time into making it all work just right.

1 Like

@P1xt and @PortableStick thank you guys for informative advice. :v:

No one has spoken in favor of EMACS, so I’m giving it a vote. I haven’t used either in twelve years, but I’ve played with both and stuck with Emacs. Honestly, I was probably biased by LISP’s connection to early AI development/research. I figured LISP would be a cool tool to learn in addition to having a robust editor.

1 Like

I’m mostly going to second @P1xt 's advice. If you’re a beginner, use an editor that was created after the invention of the mouse. At some point in your life you’ll probably have to learn to work in environments where using the editor of your choice isn’t an option. Cram on vim/emacs then so people don’t give you crap about it. I’ve never really used emacs but I’m OK with vim because it’s just always there. It still takes me a while to get used to the feel of it every time I have to go into server linux devland.

TL;DR - There is absolutely no reason not to just use whatever is the most comfortable and efficient for you.

2 Likes

I agree with @P1xt and @ArielLeslie. I might even go so far as to say worrying about Vim or Emacs early on might push you into bike shedding territory. I think a simple editor that doesn’t tempt you into going down the rabbit hole of tooling for tooling’s sake is the best way to go early on (and possibly forever). Usually learning design patters, modeling applications, and learning how to solve tough problems is the biggest area of inefficiency early on. Beyond learning touch typing and a couple of common keyboard shortcuts on a simple IDE, Sublime Text, or Atom, you probably won’t improve productivity much overall through more efficient editing until later in your career.

I agree with @PortableStick. If I had to choose I would go for VIM though

1 Like

I recommend starting with vim because it concentrates on being a fantastic text editor. I’ve barely used emacs, but people jokingly call it an operating system :~). It’s a monster and it even has an Evil Mode, which supposedly feels like vim. I’ve heard of people who have migrated to emacs because of evil mode. However, if you want to use emacs you should at least be able to read lisp, which is not an easy task for the uninitiated. Vim’s scripting language is arguable not great, but it’s easier to understand what is going on in your .vimrc

Vim (and Emacs) have a learning curve similar to a brick wall. It took me about two months until I felt as productive as before, and another week to feel vastly limited by conventional arrow-keys text editing. And I was already familiar with using the hjkl keys as movement keys, add another month or so if you are not. You should be willing to spend extra time learning vim/emacs and get annoyed often because getting anything done takes ages… until you get it :~)

Edit: I like this image.

1 Like

I second all votes for VS Code, if you “just want to get things done” and are more comfortable in a GUI.

If you’re going to end up in a *nix or BSD environment, which as dev you probably will at some point, then a basic understanding of Vim is good. Vim is in just about every distribution of Linux and BSD. It also does have a GUI version so you’re “stuck” in just a terminal window.

As a matter of preference, I tend toward emacs. It’s over sized and over powered but there are many good ways to gently on board yourself into the emacs lifestyle. I recommend Prelude as a good entry point.

The benefit to both Vim & emacs is that they can be accessed via the terminal, so we go back to ubiquity.

The terminal editor I grab first if it’s a clean/new instal of *nix is nano. It’s about as no frills as it gets and is pretty approachable for most needs. if nano isn’t available I try ee for easy edtior (a BSD staple). If that doesn’t work I then go to vi which is the editor that Vim is built to improve.

If the concept of mixing Vim & emacs is interesting you might look into the spacemacs project.

1 Like

Although this is a very old topic. I still got directed here somehow, and I think this question is still very relevant today. Additionally I guess it is still worth to provide an updated answer for other people directed here. So here follows some humble personal advice.

I think there is a good reason that most IDE’s come with vim-bindings and that there even is an evil mode for emacs. It is simply because vim-style navigation is great! Furthermore, depending on which language you are learning first, for most scripting languages you do not need a full IDE as you will just write scripts and try them. So

using some editor that makes this simple will be the easiest for a beginner.

However, I guess if you are serious about prrogramming then learning vim-keybindings is worth the small investment. I would recommend you use neovim for learning vim keybindings as it is arguably easier to setup than vim, and arguably best fit to learn vim-style navigation. However as soon as you start to work on larger projects and you start customizing neovim a lot then my advice is to checkout spacemacs. It is really easy to get a nice working environment while you use vim-style keybindings. In the end customizing your editor with emacs lisp seems to be one of the best choices you can make as a programmer. I would say all these steps would take a few months. But they are not necessary of course; you can be very productive in any good editor. Maybe a (very) strange analogy is with writing music. There are great famous musicians who used only three chords and a 4/4 measure there whole career and they were very productive with them. But some people like to experiment more with music like Zappa or Stockhausen. In that sense you can spend your whole career without learning vim-keybindings or learning emacs lisp and just use any good IDE. But if you want to explore what is possible in editing code than espescially emacs provides you an outstanding basis.

1 Like