Hacker News new | comments | show | ask | jobs | submit login
Ask HN: What text editor do you use and why is it your editor of choice?
31 points by fvargas on Nov 25, 2016 | hide | past | web | favorite | 53 comments

Vim. There are vim like modal editing plugins in most IDE's but I use vim specifically for 2 reasons.

1. The windowing. None of the editors/IDE's with full gui front ends handle windowing as well as vim (and emacs). Just this morning a was stuck in visual studio trying to track down an issue, swapping files everywhere and forgetting what I was trying to find by the time I got there. I opened up vim and could have it all in one screen, simplifying my mental load. It's also great for day to day things, like having a multiple views and a controller open at once in an MVC app.

2. Scriptability. Vim script is the php of editor languages, it's very easy to get started and/or write some quick and dirty scripts. Most of my day to day pain points are scripted behind a couple of key strokes. Also like php unfortunately, it's warts become noticeable on larger plugins.

What flavor of Vim do you use? e.g. terminal Vim, Neovim, GVim, etc.

Gvim, though I think I'm going to transition to terminal vim (via cygwin) at work. There's a lot of tedious manual stuff around here that gnu tools help tremendously with (think log files everywhere) and I'd like to be able to interact with them better from vim.

Sublime Text for local work, because of:

  - Its speed
  - Standard system shortcuts
  - Its many great features (minimap, multi-cursors, etc.)
  - Packages that extends the core functionality even further
  - Python extension API, which is pretty easy to use
  - It not being a huge battery drain and a resource hog
Vi(m) on remote hosts, as its very powerful and always available.

I use vi because: a) it is the standard editor on UNIX systems. b) I haven't invested the time to learn emacs yet. :-)

As a sysadmin, I have to deal with many types of UNIX systems, and it's nice to work with something's that's standard that's likely to be there, no matter how old or new the system.

I even teach vi professionally (http://www.verticalsysadmin.com/vi.htm) and people enjoy how powerful vi is.

Modern vi (vim) has some many nice enhancements as well.

- Random text editing? Sublime text. Fast, multi platform, native, great plugins, and I've paid for it, else I might have used Atom ;-)

- HTML/JS Coding? VS Code - not native but still pretty fast and has many things that make developing wonderful such as Intellisense and Git integration.

- Remote config editing? Vi or Vim, it is fast and it is always there for you.

- CLJS or Clojure tinkering? LightTable, with its immediate feedback is great for trying out Clojure ideas.

- The power of the old gods + a bit of finger speed and sanity? Spacemacs. It combines the speed of Vim with the power of an Emacs Lisp environment, plus has many amazing plugins (looking at you, org-mode), and also works on a remote host.

- On Windows? Well, Notepad++ is not bad. It can deal with pretty large files better than many other editors.

Emacs for all coding, and general writing. I like it because I've grown very comfortable with it over the years, and the extensive library of lisp allows me to do nearly anything.

(Years ago I wrote a Registry Editor for NTEmacs! Much Lisp is available at https://emacswiki.org/ )

The only exception is writing email for which I use vim. Mostly this is because I use a text-based mail-client (which I wrote) over SSH. So having a daemon-process doesn't make quite as much sense. Vim allows me to easily reply/compose to emails with spell-checking, and that's about the only thing I've turned on.

It's interesting to hear that you regularly use both emacs and vim. Do you ever mix up keybindings when typing? I'd think the cognitive load that such switching entails would make it more worth putting that time into mastering a single editor rather than using both.

Can you elaborate on how you got into such a system and how it's worked out for you?

Honestly? No. The bindings for different editors are different, so for forward paragraph I use "}" in Vim and "M-}" in Emacs. But I just don't think about it. I guess the visual look is enough to make me know what to type.

When it comes to email the "editing" is pretty minimal anyway, I'm mostly deleting bits of quoted text and inserting my reply, or composing from a blank template.

As for how I started many years ago I used to pay for a shell hosting site, and they gave me PINE the mail-client which was console-based. I've stuck with console mail clients ever since. So much more efficient than graphical mail handling, and I guess at the same time I started having Linux desktops and used Emacs for development. I did use emacs at some point for mails, but found it slow to start-up. So I kept using vim when I eventually switched to using the mutt mail-client.

At this point I'd say I'm very very familiar with emacs, both with the internals (C & Lisp) and as a user. By contrast I'm pretty good with Vim. I do keep learning new things about both, but I don't expect I'll ever master either!

Use emacsclient on the server to trigger emacs on your desktop to edit your mail message:


1st: Sublime Text. Multi-cursor editing built-in, fast, uses same shortcuts as all other GUI apps.

2nd: vim. Powerful, available everywhere, only real drawbacks to me are lack of native multi-cursor, and that all of the cool vim features don't carry over to all of the other programs I deal with text in.

Dad taught me Vi, now I use Vim.

I work in the sciences and incidentally, a number of my colleagues say they use either Vim or emacs because that's what their PhD advisor used.

100% vim in a terminal (with gnu screen, naturally). it tends to be installed on just about every machine I am called upon to admin or work on. I even do day to day development in a term window because I like that when I shell into a server at 3am to fix something, it feels The Same As Always. I keep a fairly complex vimrc up on a public repo so I can have my config anywhere at a moment's notice.

I think I only chose vi over emacs (those were the only real options when I learned) purely because I couldn't figure out where the 'meta' key was. first big breakthrough was getting really good at jumping around files without a mouse. second big breakthrough was mastering multi window mode and keeping lots of buffers open like an IDE.

it might just be junk psychology, but I hate every IDE I have tried in 20 years because I can't tolerate the non-instant startup or the code not getting 100% of screen real estate.

1. nano. standard in many distributions, easy to work with, I don't have to go through the complex commitment to muscle memory that modes require.

2. geany. larger projects demand something a little more, and geany provides just that. light enough that I can keep it running almost 24/7 and feature-full enough to support large projects with dozens of files.

No complex commitment necessary. You'll be faster with vim in less than two days. You'll never look back.

alias nano='vim'

there's no actual evidence for this. the only upside is your historical bias, but thanks anyway.

Then I suggest you disprove my hypothesis.

Emacs with Evil-mode. Because Emacs is an awesome platform, which gives me the power of Lisp, and Vi is an awesome editor.

Evil-mode has been on my "I should check that out some day"-list for quite a while now. ;-)

I guess I should check that out some day. (Maybe over the christmas holidays...)

I use a hex editor and write in raw Unicode.

Obligatory xkcd: http://xkcd.com/378/

Emacs - it feels so natural that I have an unfortunate tendency to automatically use Emacs keypresses in other editors unless I consciously interrupt my thinking to use whatever they require.

On Windows I always drop Notepad++ in as a direct replacement for the truly execrable Windows Notepad.

> Emacs - it feels so natural that I have an unfortunate tendency to automatically use Emacs keypresses in other editors

When I switched from vim to emacs, it took me about two weeks to stop hitting Esc-Colon-W-Enter every couple of keystrokes. ;-)

What's more annoying, though, is that on macOS, most (all?) text input widgets support a few emacs key shortcuts (Ctrl-A, Ctrl-E, ...), while at work I have to use Windows - it gets confusing sometimes. ;-)

Previously, I used Vim. Now I use Emacs via Spacemacs. I honestly probably can't give a reason for changing. I wanted to check out Org and Magit. I also got tired of maintaining and hacking my .vimrc, endlessly tweaking it to never feel complete, polished, or content. My configuration is now well tested and changes are decided on by a large community of users. I've messed with Sublime and even bought a license, but don't feel like it's a good idea to commit myself to learning it and would rather use that time to be better with something like Emacs or Vim that have stood the test of time.


    When being on the road (battery) & working on HPC machines.
    With a nice dotfile kit (https://github.com/rscircus/dotfiles)
    inside tmux.

    When being plugged in somewhere. Also with a nice synced
    setup (https://github.com/atom-community/sync-settings).
Atom is nice to the eye. I.e., Markdown Preview, Minimap, etc..., however, it's just a huge battery drain and therefore I usually prefer Vim. I'd dare to say, that Vim is still more powerful, as the contact to the terminal (and its powers [1]) is very good.

And it's just plain FAST!

    [1]: ripgrep, git, fzf, ctags, piping stuff through this and that, etc...

I have been an emacs user for about ten years now.

When I started programming, I used emacs, then switched to vim. I used vim for a couple of years, and I have fond memories of it. I think the occasion to switch back to emacs was my attempt to become familiar with Lisp, but I am not entirely sure any more.

But eventually I re-discovered emacs and its customizability and extensibility. The fact that you can run a shell, a Lisp/Python/Ruby-REPL or an SQL session in an emacs buffer helped.

Also, emacs comes with a builtin Unix-ish shell written in elisp, which is nice on Windows.

For quickly editing a file (usually some config file) I still use vi sometimes, although it is becoming less common since I discovered emacs' server mode.


I used to use Visual studio code earlier, it took way too much energy and RAM. My MBP ran for around 6-7 hrs with it, with Geany it runs for 9+ hrs. Written in C and it is minimalist.

VS Code on Node, go or random projects because I like the extension system and it's very light, simple and free. Used to use Atom but that crashed all the time and was slow.

For big PHP projects PhpStorm because it does everything

Some of the factors I value in an editor are customization, modality, efficiency, performance, and battery drain.

- Eclipse -- I used Eclipse when I used to do a lot of Java programming. I hardly ever write Java anymore and my editor-oriented values have since also evolved. Pros: Works well out of the box. Many features for easily and efficiently writing and testing code. Cons: I'm not a fan of the bloated IDE environment. Speed is not a strong point. I don't recall it being very customizable.

- Sublime Text -- All around solid editor and works well without any configuration. Pros: Looks and feels nice. Strong plugin ecosystem. Fairly customizable? Cons: For a while there was no development and the project seemed abandoned. I believe this has improved and there is at least more active development.

- Atom -- Looks and feels great to use. Pros: Active development and strong plugin ecosystem. Very customizable. Also let's you get things done without configuration. Low learning curve. Cons: Sometimes slow and can drain your battery (Compared with other commenters, I haven't found slowness or battery drain to be that major of issues)

- Vim (terminal) -- Hard to beat efficiency. Pros: Super customizable. Highly efficient text editing. Use from the terminal provides power (i.e. convenience) when work takes places predominantly in a terminal. Available on nearly all *nix systems. Convenient for editing files on a server. Easily git clone your config to a new system and you're good to go. Doesn't pose an issue for battery. Cons: Learning curve. Not so out of the box friendly (unlike most of the other editors I mention). I often see people using vanilla (or near vanilla) Vim without realizing how much they're missing out on the plugin ecosystem. Requires investment in order to get the most power out of it.

- Visual Studio -- Used VS while writing C# for a few months. Pros: Works well out of the box. Very helpful code completion. Lots of features I didn't use but some might find useful such as managing a git repo through the GUI. Extensible. Cons: Felt unnecessarily bloated (for my tastes). Slow startup. Cluttered GUI. Not very customizable (though I didn't try too hard).

Text editors I'm curious about are Spacemacs, Neovim and VS Code.

Textmate for projects at home. I use it because it's a decent editor for Mac and I used it a lot in my previous job.

Notepad++ and Vim at work. I am forced to use Windows and enjoy a lightweight editor over and IDE. Notepad++ is light but has decent support for plugins and code highlighting. I use Vim on Linux servers for remote editing and good highlighting. I've used Vim for like 20 years but never spent much time learning much more than the basics (insert, delete, regex search/replace, line numbers, and write/quit).

I like Vim for editing markdown (I write books on Leanpub, and use Deckset for my lecture presentations, so this is serious work). I'm still learning it but I enjoy learning how to customize it. My advice: google and implement one change at a time, rather than trying to add ten different features to your .vimrc all at once.

For coding Python, I prefer PyCharm from JetBrains. In time I may get Vim to do everything a real IDE does, but time is money and I can't wait.

I use Atom cause I can use thousands of extensions that make coding faster and sometimes easier. I sometimes use Brackets cause I can see instantly what I'm doing

At work I use Windows and use Notepad to keep track of random notes (not a great solution actually, since I end up with dozens of unsaved notepad windows). Coding is all in Visual Studio, except maybe Atom for some smaller scripts.

At home I run Fedora and use Visual Studio Code for random notes and code snippets. I work on a PHP personal project at home so for that I use PHPStorm.

Definitely try Notepad++ as a replacement for notepad.exe. It will even autosave your unsaved notes. And it has tabs.

I actually have Notepad++ installed and for some reason just keep opening up Notepad instead. Old habits die hard! I have now pinned it to my taskbar and will try to force myself to use it instead.

Maybe you can replace the shortcut[s] for notebad with notepad++, maybe the .exe file itself even.

Config files, one line edits, etc.:

* Vi (its everywhere) * Nano (its good enough for 80% of what I do, and fast, and nearly everywhere)

For scheme things:

* Dr. Racket. Its amazing. * Emacs. Its a grumpy old fart, but there isn't really anything better on the cli. * A million nREPLs with file system access to dump their own environment to file.

For project sized things:

On Windows, Notepad++.

Anything else, Sublime Text, because of its speed.

I stopped using emacs the moment I started using a mac, I kept erasing text pressing CMD-x instead of ALT-x, and other such annoyances. To date, if I have to use IRC, I open Emacs and use erc. For everything else I keep switching every few months between Atom, Sublime Text 3 (purchased) and VS Code.

Vim (or, PHP Storm using VIM plugin - although it isn't as powerful as normal vim), just because it is much faster to use/navigate/edit (and available on any machine).

I prefer vim in a proper gui though (as opposed to in a terminal app), its just a bit easier sometimes to use a mouse...

Jedit - the most underrated editor, its extremely customizable and has great set of plugins

I've moved completely from Vim to Spacemacs. I can't see myself going back to plain Vim any time soon. The emulation via evil is very good, and the layers provided are generally immediately usable with consistent keybindings.

vs code due to its Go support

I have found that vs code takes too much of battery and RAM, thus I started using Geany, my battery backup has drastically improved. http://geany.org

Vim on Cygwin & notepad++ on work. NeoVim and a few times Kate on my PC.

I work usually on windows with Eclipse + Vrapper (Eclipse poor Vi emulation plugin). But every time that I can, I try to use Vim to edit files.

Intellij Idea + IdeaVim plugin.

Navigating between files was so comfortable that I started reading lots of code than before. We can literally see the increase in productivity.

I am honestly surprised at the lack of flames in this thread.

Random small files: vim.

Java projects: the IDE mandated by the customer.

Anything else: emacs.

For texts and articles: Scrivener

For tinkering around: VS Studio Code

IntelliJ IDEA with the vim plugin. This gives me great code completion, auto imports, go to definition etc. And the ergonomics of vim.

I have text editor commitment issues; I change editors somewhere between bi-weekly and bi-monthly. Some of the reasons why I switch to and fro:

- Visual Studio Code—pull factors: Better performance than Atom. Solid language support for Python, and excellent for JS and TypeScript, and the Language Server Protocol means that the UI is identical no matter which language you use. Looks good. Push factors: Not as customisable as other editors, especially visually. Startup time still leaves me wanting.

- Atom—pull factors: Infinitely customisable; basically the Emacs of the 21st century. Looks good. Push factors: Git integration is nowhere near as good as VSC (ironic considering its authors), and I've yet to find a Git plugin I really like. While it's not unusable, the performance isn't the best.

- Sublime Text—pull factors: Performance. The ST dock icon often doesn't even get to finish its first bounce animation before it's ready to go, and it can handle large files amazingly. Push factors: Stagnation, both in the editor and the plugin ecosystem, compared to Atom and VSC. (It seems like this has been improving a bit lately.)

- Chocolat—pull factors: Really beautiful, native Cocoa UI. Buffer list in the sidebar instead of tabs and command-click for split windows is really neat, and I wish more editors worked this way. (VSC and ST can both be configured to get half-way there, but they both conceptually differ with Chocolat on how splits work, and I prefer Chocolat's approach.) Push factors: Less extensible, and worse plugin ecosystem, than anything else on this list. (You can't even provide a third-party autocompletion engine.) Not cross-platform, so I can't use it on my Linux box at work. Configuration is through a GUI only, so difficult to keep under source control and sync across machines. No complete-as-you-type. Hasn't had a release since June. Actual text editor widget seems kinda janky sometimes.

- Vim—pull factors: Modal editing. (All of the others have Vim-emulation plugins or a Vim mode, but they have varying levels of usefulness. Chocolat's can't even easily do key remappings last I checked.) Rich plugin ecosystem. Push factors: Vimscript somehow manages to be the only language more puzzling and hideous than Bourne/Bash shell scripts, although to its merit it doesn't have a keyword called 'esac'. GUI mode is essentially an in-process terminal emulator.

There's a few more I'd like to try, like Brackets, Coda (I love the idea of having terminal emulator tabs in your text editor! I'm not sure if I like how web-focused it is though), and CodeRunner; and a few more I've tried before but not stuck with for any length of time, like TextMate and BBEdit. I also used PyCharm at work for about six months, but stopped when the VSC Python extension started getting good and haven't gone back since. But those are the ones that I've actually used in earnest for a decent length of time and still regularly switch between.

Visual Studio Code. Love it. Flexible, fast, no bloat and handles Python and other languages well.

emacs and joe on nox shells.

Why? It can do everything. For 25 years ongoing

Sublime with vim mode.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact