4 ms·
Ask HN: Convince me to learn Emacs/Vim
I've always used IDEs and GUI editors for coding: Zend Studio, Visual Studio, Eclipse or even Dreamweaver (believe it or not, it's very handy when it comes to CSS/HTML auto-completion, validation, cross-browser compatibility and boring stuff like DTDs). Lately, I've been trying to convince myself to learn Emacs or Vim since it seems to be the cool editor for hackers. Yet, I am still unsure whether learning those tools will really make me more productive in the future or just make me look cool... So, I'd like your opinion on how those editors are superior and if they are really worth learning. Have you seen an increase in productivity after learning to use them? How do they compare to fully featured IDEs? If that can help, I do mostly web development (PHP and Rails).
- hippich 16y agohackers run backconnect shells.. how do you run your Zend Studio, Eclipse, Visual Studio through telnet/ssh? =) ps: joking (almost). But it seems very good tool working thourhg ssh for me =)
- frossie 16y agoWell I don't particularly feel the need to convince you, but I can tell you some of the advantages that Emacs has for me: completely mouse-free operation (important to me for ergonomic reasons), available freely everywhere I want to work (give me emacs and firefox and I could do 99% of my work), one-stop shop for any language or platform (I use it as my email reader, my usenet reader, for documents and for code in any language under the sun), trivial to use remotely over ssh, without X, etc. But dude, whatever works for you is fine.
- noonespecial 16y agoOne cannot be convinced to use vi or emacs, one arrives at this inevitable conclusion at the end of a journey. Eventually one tires of the Sisyphean mouse, keyboard, mouse, keyboard loop and thinks "there must be a better way". This is the beginning of enlightenment.
- olalonde 16y agoThis didn't help at all!
- pmccool 16y agoI'm a vi guy. IME the big virtue of vi and it's various clones (vim, etc) is that it's easy to install and likely to already be there. Vim is pretty feature-rich too. I don't know that it's worth learning unless you work in a UNIX environment. I myself use it in Windows precisely because I can't be bothered learning another, different-but-no-better text editor. Is it worth learning from scratch if you live in Windows? I honestly don't know. In UNIX, of course, the historical reason for knowing vi (and ed, its line-editor cousin) was ubiquity. It's less of an issue these days - the odds of vi being your only choice are, I daresay, slim. The downside is that its UI is ancient and wierd. If I had to make a recommendation, it would be to learn the very basics. It won't take long and it might come in handy one day.
- silentbicycle 16y agoYes, but vi's UI is ancient and weird for the same reason APL's is - because it gets the job done.
- pmccool 16y agoIt's ancient and wierd because it gets the job done even if all you have is a teletype. It's very rare nowadays that you need something that can work in that sort of situation.
- noonespecial 16y agoI work on systems over vsat on a regular basis. 750ms rtt at times. Vim is a godsend. I find myself wishing for a good fast 60's style teletype at times.
- pmccool 16y agoHave you considered ed? I dimly recall trying a line editor over a slow-slow link and being pleasantly surprised at the difference it made...
- silentbicycle 16y ago
- stratospark 16y agoWhat do you think about all of those other IDEs? Did you learn anything from using them? I'm sure you found things you liked and other things that you hated. The key is, did you take something away from the experience that you can apply to future coding work? I can't convince you to learn Emacs or Vim, but I can convince you that you'll learn. If you stick with one of them for a while, you'll learn a lot, and maybe in time you'll be as productive as (or more than) you were in the other editors. There's reasons why people swear by these old editors... are you curious enough to learn why?
- silentbicycle 16y agoIf you "mostly [do] web development", it may never matter. Using Emacs or Vim because they're cool is not likely to last. If you want to look cool, use something shiny, not a goddamned text editor designed by bearded people in the seventies. Do they have substance? Yes. Will that substance ever matter to you? Hard to tell. If you're in the business of making things happen with structured text, though, they're proven tools. Personally, I appreciate the mouselessness and sheer integration of Emacs, though vi's terse/modal approach also has major advantages. If you're as curious and patient as I am, I'd suggest learning both. (And then Acme/Wily.) You gotta be in it for the long haul, though - learning vi is a hassle upfront, and Emacs's design trade-offs are predicated on it being your workbench for years to come.
- grayrest 16y agoYou use vi/emacs when you care enough to not want to learn yet another editor.
- jchonphoenix 16y agoEventually one completely tires of meta key chaining and reaches a state of zen. This is a truly enlightened being. A master of vim.
- rwl 16y agoNobody has yet mentioned one of the main reasons to use Emacs (or Vi; substitute below as necessary): it's easily extended. Find yourself doing the same thing to your code over and over? Want to use a language that doesn't have syntax highlighting yet? Need to communicate with an external process? Write it up in Emacs Lisp. I don't (currently) write code for a living, and I have never spent much time using or learning an IDE. My untutored impression, however, is that even when they are extensible, it's more of an afterthought than a truly integrated part of the design. Emacs, by contrast, is mostly written in Emacs Lisp. You have access to all the same features that the people who designed Emacs used to implement its vast capabilities. You aren't limited to the set of features that the IDE designer predicted you might need.
- rsaarelm 16y agoLook into org-mode and the stuff you can do with it: http://orgmode.org/ http://orgmode.org/ http://doc.norang.ca/org-mode.html http://doc.norang.ca/org-mode.html http://orgmode.org/talks/index.html http://orgmode.org/talks/index.html Then realize that you need to pick up Emacs to use it.
- jules 16y agoI used to use Emacs and Vim and switched to IDEs. I'm not going back. Don't waste your time.
- elg0nz 16y agoWell it depends on whether you are editing or writing code. If you are writing code you just need easy navigation, code folding and basic search. When you are editing code or config files you need a whole array of different features: 1. Regular Expression matching (And substitution) 2. Edit in place (Specially with space sensitive configs) 3. Key shortcuts (You could copy paste a code 30 times or just "yank and paste repeat 30" with 3 vim commands) 4. Scripting. Whether you like to do emacs-lisp-magic or just raw vim, sometimes you just need to script your code. 5. GDB (Most IDEs take care of this, but emacs/vim + gdb works great for command line dev). 6. Vi is included in any Unix or Unix like environment and can be usable even from the slowest SSH or Telnet session (Once or twice I have had to edit config files over my smartphone and restart the servers, vi visual edit commands are a godsend when you don't have a mouse). So if you are just an "Developer" hacker, it's ok to just use IDEs but for me any respectable "Sysadmin" hacker does need to know this stuff.Plus in my book any Dev must at least know how to setup a LAMP server without a GUI, though I know some PHP kiddies won't agree.
- vikram 16y agoIf you are happy with the IDEs then just use them. Having learned both vim and emacs over the past few years. I learned emacs so that I could use slime with lisp. Vim so that I could edit stuff on any server. Emacs has a big learning curve, vim is a bit easier to get into. If you use a mac you can try textmate, I've heard good things about it. On the vim side macvim, gvim are pretty good.