I have tried to learn vim, and I am on the fence about which editor to use. I have tried Atom, Eclipse, Emacs, etc. VSCode just came out and Facebook has its Nuclide editor on the shelf. People hold vim as a pinnacle of editing technology.<p>Can you show me with a short screencast why vim is superior? And, why it is worth spending the time to learn, not only mentally and visually, but also mechanically with my hands.<p>Thanks.
You first need to learn the differences between these editors, and determine what you expect from an editor.<p>It's pointless to compare vim, atom, and eclipse in the same thought process because they're completely different tools for different tasks.<p>> ... as to why vim is superior<p>Vim is not superior categorically. If you expect your editor to autocomplete Java code for you and fill in imports and look up methods for you, and have extra features that aren't even connected to editing, Eclipse is tremendously better. But Eclipse is a different tool. It's a full IDE.<p>Atom is a gui-based editor.<p>Vim is a cli-based editor.<p>I've been seeing people left and right comparing editors as if there were some definitive lockdown about to happen that binds you to a single editor. Use whatever you like and what gets your job done. You can also use more than one for more than one task.<p>I use vim when I'm editing files via ssh remotely, Sublime when I'm editing local files, and VS Pro when I'm working with .NET at work, because these are, respectively, <i>my tools of choice for these tasks</i>.<p><i>None are "better" or "worse". They're just different.</i>
I've seen a lot of comments saying this answer on stackoverflow opened their eyes to using Vim: <a href="http://stackoverflow.com/questions/1218390/what-is-your-most-productive-shortcut-with-vim#answer-1220118" rel="nofollow">http://stackoverflow.com/questions/1218390/what-is-your-most...</a>
A ton of hyperbole, but an enjoyable read - <a href="https://www.norfolkwinters.com/vim-creep/" rel="nofollow">https://www.norfolkwinters.com/vim-creep/</a><p>Interviews of vim programmers - <a href="http://howivim.com/" rel="nofollow">http://howivim.com/</a><p>Gary Bernhardt's screencast on - <a href="https://www.destroyallsoftware.com/screencasts" rel="nofollow">https://www.destroyallsoftware.com/screencasts</a>
Check out this video game: <a href="http://vim-adventures.com/" rel="nofollow">http://vim-adventures.com/</a><p>Play through the first few levels and it becomes apparent why people like vim; you can move around a text file incredibly quickly, a mouse is slow and dumb by comparison.
I think Derek Wyatt's screencasts[1] are precisely what you're looking for. You won't be able to help but pick up a few things along the way.<p>1: <a href="https://vimeo.com/user1690209" rel="nofollow">https://vimeo.com/user1690209</a>
Somewhat related, I started out using Emacs and have since moved to using vim. I'm at the point where I feel semi-proficient in it, and I've started playing around with .vimrc, pathogen-based addons, as well as other stuff like ctags a bit, and based on my experience so far this extensibility and customization is what makes the text editor so powerful compared to other ones (although I can't really speak for Emacs since I didn't get as far with it).<p>That being said, I've recently started picking up an interest in lisp (currently slowly making my way through sicp), and I've seen indications that Emacs is somehow more suited to lisp development than vim. As a result, I've actually been considering switching back again, despite emacs pinky, although I'm still on the fence about this.<p>If anybody here has some knowledge about what Emacs offers in terms of lisp development that vim doesn't (or vice versa) and/or has some good references, I would be very interested to know.
Casey switched to a modal editor for the handmade hero livestream (because of RSI issues). It's not vim, but it's similar since it's modal. He's only just switched about a month ago, but he's already pretty quick, though not as fast as he was with emacs. You can compare old episodes to current ones to see someone editing with a vim-like editor and emacs one.<p>I've personally gone through phases of using vim, emacs, notepad++, Visual Studio, and (currently) SublimeText and xcode. My opinion is that the editor is never the "bottleneck" with programming speed, so just use whatever is the most comfortable for you. One nice thing about vi/vim is that some variant of it is installed almost everywhere so you're always likely to have a usable editor available if you learn it.
I would recommend Shortcut Foo (<a href="https://www.shortcutfoo.com/app" rel="nofollow">https://www.shortcutfoo.com/app</a>) to people who want to learn vim. It offers shortcut training (pun-intended) to many other editors (Sublime, Eclipse, etc.) and languages too.
> Can you show me how fast coding is in vim?<p>The tongue in cheek answer: My ability to code quickly is held back by my ability to create code structures in my mind, not type code into an editor.<p>I appreciate vim not because it's faster, but because I don't have to think about using a mouse, and I can just have a conversation with the editor.<p>"Correct inside these parenthesis" ci(<p>"Insert the text 'func Something() error {'"<p>"Delete three lines and paste them above the current line" 3ddP<p>"Goto the definition" gd<p>"Go back" C-o<p>"Write to disk and quit" :wq
You don't have to choose one. I use vi a lot, but when I want to do something complicated I often switch to emacs.<p>It is easy for me, and not a lot of typing. I log on a server, and type vi program.py. Now I am in normal mode at the top of the file. If I want to go to line 80 I type 8-0-return. If I want to search for a list called dataList below that I type /dataList and return. If I want to go to the bottom of the file I type G. If I want to go back to the top of the file I type 1G. It is economic with how much typing you need to do. It loads up quickly. It also uses the same commands as ed in case you're on a dumb terminal, although that tends to be rare nowadays.<p>If I'm doing a lot of multi-window stuff, or cutting and pasting from the middle of a line to the middle of another line 3000 lines down or something complex I use Emacs. For example, emacs has a command 'keep-lines' where only lines matching a regex get kept (or flush-lines where all lines matching a regex get deleted). Vi can do more complex stuff but I usually just switch to emacs when things get complicated.<p>Speaking of speed - if you look at the old e-mails and Usenet posts and such from Bill Joy on the net, you may notice he did not capitalize any letters when he wrote. That saved him the time of having to hit the shift key.
If you work with UNIX / Linux servers a lot, or really at all, it's a good idea to be comfortable with basic vi usage - vim being Vi IMproved, with some features that we've all become comfortable with.<p>You will find a version of vi on almost any UNIX-ish system you're likely to find running. It's an incredibly robust and battle-tested editor which can help you out of tight situations.<p>Nano isn't so bad and is fairly common now, but its' predecessor, Pico, was absolutely terrible for editing code. Pico was originally the editor bundled with the Pine e-mail client, and it had a nasty habit of chopping lines of text at 80 characters wide. I once used Pico to edit a hundreds-of-lines-long apache config, bungled the whole thing, and had to manually reconstruct it with vi.<p>At the time, I was a fairly new employee in my first tech job as support for a Linux distributor in the 90s and our build engineer fairly quickly informed me that it was time I learn vi.<p>Any system with vim installed on it - including a fresh Mac - will have vimtutor, which I highly recommend everyone spend a half hour with. When I taught Linux admin courses, I had everyone run through this at lunch on the first day to help them avoid the professional embarrassment I had. ;)<p>[Edit: and I second what everyone else says about it not necessarily being a supreme development experience. I use a Mac with, over the years, TextMate, Sublime, Light Table, and now Atom. Some people make a convincing argument that Emacs is a supreme dev environment, but I've never quite picked it up]
Vim user for ~10 years ... I find Vim more productive for writing prose than coding, since oftentimes the limiting factor when coding isn't pure typing/editing speed. And, as other posters have mentioned, good IDEs nowadays have a lot of integrated support for the entire software lifecycle and not just for pounding out code as fast as possible.
I don't have time to make a screencast but, I don't see a huge difference between VIM/Emacs to be honest. Most devs seem to like Emacs more for the easy complexity I suppose.<p>For modern development I wouldn't compare vim (a text editor) to Eclipse (an IDE). I'd say learn vim if you think you might ever find yourself in a shell needing to do things. No Xwindows and maybe not even emacs. I personally use vim for everything I do but, that's because I've used it for 21 years now. The second reason is I develop by always taking the easiest path (kiss theory) and generally don't need an IDE for most things. The third reason is that I started developing carpel tunnel in my right hand using the mouse and decided to not use a mouse as much as possible.
Honestly, I switched because of RSI. Other editors require a lot of chording. Hell, just look up the term "emacs finger". Some might claim that's because of poor control key positioning, but repurposing capslock is frequently not an option and doesn't totally alleviate the problem.<p>Switching to Vim completely eliminated those issues for me.<p>As a happy bonus I gained access to a lot of Vim tricks... Normal mode is basically a weird programming language, which makes it enormously powerful, particularly for repetitive tasks. And Vim macros are magical as a consequence.<p>Which is why when using VS or IntelliJ I adopt Vim emulation plugin of some kind. None are perfect but most are sufficient to allow me to continue to use my Vim muscle memory in more integrated environments.
I would suggest that Vim is about more than speed, it is about flow. Think about the difference between ctrl-c and navigating to the menu to copy with your mouse. One just feels more fluid and requires less thinking. Games use extensive keybindings for the same reason.<p>Vim in particular is a philosophy of keybindings. It has a syntax and a logic to it. For example `daw` will delete a word. To delete a sentence you would `das`. Guess what you would use to delete a paragraph? Once you "grock" vim logic you can perform more complex actions without much cognitive overhead and with your fingers on the home row. Writing in Vim gives me a feeling of mastery and fluidity with the machine I have not felt since my competitive gaming days.
My main reason to why stuff gets done faster when I'm in vim is because I am in the terminal anyway. Compared to one virtual desktop with a browser if you're doing web, one with some editor, and one with a terminal to run some build tools and more, you'd have to jump around much more.<p>Another good reason to go with vim is that it will probably be around when other editors may become abandoned. Sure it's good with many editors to pick from, but most of us go for the latest shiny thing and it's always a learning curve even going between Sublime and Atom.<p>It's free, you can install it on anything. It's not the crazy commands that makes it fast really.
Watch Gary Bernhardt at <a href="https://www.destroyallsoftware.com/screencasts" rel="nofollow">https://www.destroyallsoftware.com/screencasts</a>
and judge for yourself.
I use vim not because I think I can type faster in it, but because I have used so many editors in so many different platforms over my career, and I realized that I could settle for just one that I can trust will be around (and be very effective, and available on any platform I choose to use) for as long as I'm alive.
> Can you show me how fast coding is in vim?<p>I would literally like to see how fast coding in vim is. Can anyone point me to a screen capture of editing in vim? I've always been skeptical how editing without a mouse could be fast.<p>Edit: I just noticed that he <i>is</i> asking for a screencast. Why is everyone ignoring that request?
Programming is about typing less, writing small and smart code that is hard to break and requires thinking.
I never understood why fast editing in vim matters for good programming. You can pretty much do copy paste, replace or refactor using any other editors.
Anyone following this thread might be interested in watching a few episodes of Emacs Rocks! It's pretty entertaining, and humbling about my own use of any text editor.<p><a href="http://emacsrocks.com/" rel="nofollow">http://emacsrocks.com/</a>
The advantage of Vim is not faster but more abstract way to manipulate text. It build a language of text operation in higher level, which make you faster.
Image picture editor which has only concept pixel, but not sharp, mask, layer...
I don't think it really matters which editor you use. Just pick one, and be proficient with it.<p>All of the editors you've mentioned are very good at what they do, some might be better in certain areas than others.
I used to use vim for everything and about a year ago switched to using Sublime Text with a vim plugin. I get some nice IDE features with all the power tools that come with vim. Highly recommend.