
Ask HN: Why do you still use Emacs/Vim? - ashton314
Modern IDE’s have many nice, fancy features. Yet I still find myself preferring Emacs. I also have much respect for those who use Vim. So, why do you (or not) use Emacs or Vim?
======
richardjdare
I programmed for over 15 years before I got into Emacs. I grew up with Visual
C++ and later on used Eclipse, Netbeans and XCode.

Along the way I realised I wanted a text editor with live-coding capability. I
wanted to be able to write code on the fly in some sort of DSL to manipulate
text while I was working on it, in conjunction with normal gui manipulation
tools.

I started thinking about writing my own editor with Qt and V8 until a friend
told me that Emacs could pretty much do what I wanted.

I had always been aware of Emacs but I thought it was just an old editor with
an ugly gui with thousands of features and keyboard shortcuts I'd struggle to
remember :) I didn't know it was an interactive Lisp programming environment.

While plenty of editors have plugins, to the best of my knowledge only Emacs
offers an interactive programming environment where writing code is part of
how you use the software. I mean, you can actually write Elisp code straight
into the text/html/c document you're working on and run it.

So as long as there are no other editors with that kind of capability, I'll
carry on using Emacs. The only thing that would replace it for me would be
some kind of Super-Emacs running Common Lisp within a modern graphical
interface.

I still use IDEs all the time though for Java and C++. My least favourite
programming activity is dealing with project settings, build tools and
configuration so I let the IDE handle that :) I use Emacs for everything else.

------
super_mario
Because Vim is like programming text. You have motion commands, you have
operators that act on text motion command moves over, and you can specify how
many time to repeat the operator. You have programming specific motion
commands, so called text objects. This is incredibly powerful. You learn to
move around efficiently and you multiply your power, because now you can also
make changes, delete, etc using the newly learned motion command.

General form of the command in Vim is: nOm meaning repeat n times operator O
acting over motion command m. There are motion commands to move by letters,
words, sentences, paragraphs, code blocks, XML/HTML tags etc. There are
delete, change, insert, etc operators.

So for example: 3dw says 3 times (d)elete (w)ord (i.e. delete 3 words). di{
says delete everything inside code block.

Vim is also modal, there is distinct mode for editing by issuing commands, and
there is insert (also replace, visual etc) mode(s) which is what all other
editors have as the only mode. This makes it incredibly powerful, and it is
possible to make large sweeping changes with very few key strokes.

Also, vim discourages mouse use. The context switch of your arm moving to the
mouse is like CPU doing a cache miss and going to disk to fetch data. It's a
huge distraction and if you add time to actually find the mouse pointer,
select something etc, it really slows you down compared to Vim.

So, I still (since 1993) use Vim because it makes me really productive and I
can edit text really fast with it. With that said, Vim is not an IDE (even
though with language server and background tasks support it can be made into
surrogate IDE). So, the best of both worlds is to have a good IDE with good
Vim support. Jetbrains products have solid Vim support (much much better than
say VS Code), so if you need to work with verbose language or work with
unfamiliar libraries, IDEs are still useful.

However, I also love the ability to work in plain Vim when I work on code base
I know really well and don't need IDE type of help. Vim is also great at
working though SSH remotely, tmux etc.

------
kasey_junk
Vim loads fast and has the best vim emulation mode of all the other
editors/IDE i've tried.

~~~
ashton314
Lol:

> has the best vim emulation mode

Good point. XD I must ask, have you tried Emacs’ “viper” or “evil” modes?

------
bradknowles
I’ve been using vi since about 1985. At the time, emacs was the program that
would crash our PDP 11/70 if more than one copy was running anywhere on it.
And all undergrads in the EE/CS department shared that one machine.

So, the only people who got to run emacs were the sysadmins, and they were
really good about warning everyone else away from it.

It also helped that emacs is a great OS from the 1970s, and the only thing it
lacks is a decent text editor. ;)

~~~
ashton314
> the only thing it lacks is a decent text editor

That’s a funny joke. It’s made funnier by the fact that Emacs can emulate Vim.
(“Viper” and “Evil” modes.)

------
anonlastname
I use emacs because it's competent as a text editor and doesn't try to be more
than that. It works well in conjunction with other Unix style tools.

It's hackable enough to have various plugins built for it that I need to use
sometimes. For example, proof general and modes for specific languages.

Also, I like that Emacs is extremely polished. When I am working with someone
who uses VS on windows they will typically have projects break for no reason
and generally a more buggy experience

~~~
beatgammit
> emacs... text editor... doesn't try to be more than that

Enter meme about emacs OS.

My big issue with emacs is that it isn't installed by default everywhere,
whereas at least vi is pretty nearly everywhere (except windows). Vi is pretty
good, vim is better, and emacs is a different beast altogether.

However, I'm considering switching to emacs _because_ it's not just an editor.
I think org mode is awesome, and I'm playing with it using evil mode so I get
the best of both worlds. I've seen awesome renderers hacked into it (LaTeX,
PDF, HTML, etc), and pretty much every emacs user gloats about the crazy
features that they've thrown in (e g. web browser).

People seem to use emacs because it's _more_ than an editor, and people seem
to use vim because it's _just_ an editor. Yes, you can do crazy stuff in vim
as well, but people in general seem to prefer simpler configs in vim and more
crazy configs in emacs.

Yes, emacs doesn't try to be an IDE like Visual Studio, but it also tries to
be more than a simple text editor like nano or vim.

~~~
mbrock
Emacs can edit files over ssh, even via multiple hops of ssh, so often you
don't need to install it everywhere!

------
asidiali
I use (neo)vim so that I can have a consistent editor experience across any
*nix machine I’m on, be it my MacBook or some remote VM instance that I’m
ssh’d into. Copy over config files and ready to go.

------
beatgammit
I've never found the fancy features in IDEs to be worth it. Compared to
vim/emacs, they're:

\- slow \- visually distracting \- lightweight in text manipulation \- built
around seldom use features

I rarely need a debugger or type information, yet the entire interface bends
over backwards to include those features. In fact, I feel that IDEs encourage
more complicated code structure because it makes dealing with them reasonable.

The only time I use an IDE is when:

\- the build process is too complicated (mobile, .NET or Java, game engines)
\- I'm unfamiliar with the platform \- everyone else is using it, so I'd have
to maintain the CLI build process myself \- I need a fancy debugger

That being said, I've only fired up an IDE a couple times in the last year or
so, so vim has been more than capable at solving my problems.

------
snazz
I recently switched from Vim to Emacs with Evil. Vi motions are really not
that hard to get used to. I reached my previous productivity quickly and then
was able to move on from there. However, you're not going to get the full IDE
experience with vim (by design), so moving to Emacs felt natural to me when I
wanted more advanced plugins and I learned that Evil was as good if not better
than Vim itself.

I have used IDEs in the past and it was an overall pleasant experience. Visual
Studio is okay, XCode is fine, Eclipse is all right, but what bothered me most
was that all three were necessary to be able to develop for common platforms.
I would find a game changing plugin for one and then want it in another (not
happening). The integration between language and editor is the beauty of IDEs
and that's the best and the worst thing about them, the reason that they're
never going to replace the venerable text editor for me. The other issue is
that IDEs discourage experimentation into new languages because using a new
language means learning a new editor and getting comfortable with all new
tooling. I'd much rather use the same editor for everything, with easy-to-get
modes for every kind of language imaginable instead of learning yet another
okay-ish IDE for each language.

------
cimmanom
Reliable. Ubiquitous. Lightweight.

Really don’t need the extra overhead of an IDE.

(Actually, I use another text editor on the desktop, but still don’t need an
IDE. Vim on the server. Someday someone will make an extension to support both
Mac and Vim keybindings together in my text editor, and my life will be
complete.)

------
alexgaribay
I use Emacs with evil-mode (vi binings). Along with evil-mode, I have
Spacemacs for a decent set of packages with some sane mnemonic key bindings
for a lot of operations. I recently started using magit in Emacs as well for
git commands and I’m overly satisfied with its capabilities.

I chose Emacs primarily from pairing with some other developers. I was blown
away by how fast they were able to do things in the environment. I really
wanted to be able to move that fast without my editor getting in the way. The
flexibility of customizing my environment with lisp is also an added benefit.
Plus with how heavyweight other editors are in terms of memory usage, Emacs
still works great on machines with less RAM.

------
veddox
1\. I often program in the commandline, or via an SSH connection. Emacs is
there, whether I have a GUI running or not.

2\. Emacs keyboard shortcuts mean I don't have to use a mouse at all - makes
typing and navigating so much quicker.

3\. It's one editor for all your files. No matter whether you're working on a
markdown, Lisp, Python, Julia, C document or whatever else, Emacs has you
covered. And that doesn't just mean syntax highlighting - there's interactive
interpreters for many scripting languages available.

The only time I find myself wanting a real IDE is when I'm working on a large
Java project: I sometimes go back to Eclipse for that. But thankfully, I
haven't had to do much work at all in Java in the last few years.

------
geoka9
Emacs, for the following reasons:

1) Key chords/features have become a second nature. I've tried using Idea when
working on legacy Scala/Java codebases and its Emacs compatibility mode caused
a lot of frustration: enough key bindings implemented to make me forget it's
not Emacs and then fall hard on my face when I tried using a more advanced
Emacs-ism without thinking.

2) Latency. Again, tried using Idea and couldn't get used to the feeling of it
being sluggish compared to Emacs. It's like listening to a low bitrate MP3 or
something.

------
k4ch0w
Vi is on every linux server.

Easy to move between words, sentences, pages.

Macros are amazing.

IDE's are really, really slow to load when you just want to edit one thing.

Sometimes the syntax highlighting errors that aren't there can be an eye sore,
ES6 syntax on Webstorm for example.

So many things seem unnecessary in an IDE, I won't ever need some tab or
button, so why clutter my screen with it? I would say it's also true for a lot
of the features you get. You probably don't need most of them, but there they
are distracting you.

------
samjanis
Really fast editing features. I have found there's no real winner between
Vi(m) or Emacs - I can use both although I'm more used to GVim.

Shortcuts in either editor allow quick editing compared to non Vi(m)/Emacs
editors.

Also, I have a finely tuned tool-chain outside of GVim that (so far) does what
I want better than what IDE's provide, depending on the language or target
platform.

(I still use IDE's with java, for example)

------
nyberg
There isn't really a better IDE for Idris currently along with it being part
of the full Guix experience. Most modern IDEs I've tried tend to either not be
supported on platforms I tend to use or come with many features I didn't
really ask for. That and they usually are a pain to configure.

If and emacs-like in configurability with less cruft comes around I'll
probably switch to it.

------
LinuxBender
I don't need any of the features of an IDE. If I were a developer, then for
certain I would be using one, but not all of us are developers.

~~~
ashton314
Intriguing... What do you do then?

~~~
LinuxBender
A bit of everything. Some would use the term, "Jack of all trades". Others
would just call me a PITA.

~~~
fredsanford
Do some call you The Gangster of Love? Maurice? Do you speak of the pompitus
of love?

------
zenithcobra
question with a question. Why does everyone still use bash?

~~~
billconan
at work, lots of scripts are in bash script. I tried using fish shell, but it
doesn't support bash script well.

~~~
zapzupnz
But so long as the bash scripts have the shebang, and all should, things
should work properly in theory with fish able to load bash when needed,
surely?

Or is that another in a long line of "yes, in theory, but…"s?

~~~
snazz
Or you can insulate yourself from bad scripts without the #! by just calling
bash then running your script. In my case, since I run so few bash scripts, I
use fish (and ksh on BSDs) and call sh when needed.

~~~
zapzupnz
That works when you call the scripts yourself, not so much it's scripts
calling other scripts.

