In the conclusion the author says "It may not replace an IDE if you’re coding in Java or C++, especially if you’re using Frameworks and auto-complete is helping you."<p>You don't have to make that choice and can have "the best of both worlds": For the last few years I've not been using Vim itself, but Vim bindings in VSCode and Intellj. I enjoy the trade-off of this this approach because it<p>- is trivial to set up (in stark contrast to configuring a untouched Vim/Nvim install from the ground up)<p>- gives me simple access to powerful extensions<p>- allows me to use modern editor/IDE features (find usage, refactor) without forgoing "the essence of Vim", rapid code editing through the combination of motions & commands
<i>>To navigate a file on Vim, use the letters h,j,k, and l.These commands are called motions, as they move the cursor. The keys h and l will move your cursor horizontally (one character at a time), while j and k move vertically (one line at a time). If you put your hand on them, the layout sorta makes sense.</i><p>The way the author explains it above (mechanical) is the way I was initially taught over 20 years ago. However, it wasn't effective for my learning style because it felt <i>random and incoherent</i>. So _why_ does 'h' key move left? And _why_ do I have to press 'i' for "insert" mode when I didn't have to do that in Notepad/MSWord? My UNIX instructor <i>couldn't answer those questions</i>. He just said, "I dunno, it's just the way it is." As a sysadmin, I memorized it but it was a very unsatisfying way to learn vi.<p>My brain is most receptive to learning when it knows the <i>underlying philosophy</i> of why things are designed the way they are. Previous comment with some links.[0]<p>Once one knows the design intentions behind vi, the learning feels much less random.<p>[0] <a href="https://news.ycombinator.com/item?id=20605840" rel="nofollow">https://news.ycombinator.com/item?id=20605840</a>
I started by typing vim into the terminal and then followed the instructions.<p>All you basically need to do at the beginning is press F1 as instructed and just read. There's a very nice tutorial included with vim. :)
What's better than Vim? Vim and Emacs: <a href="http://spacemacs.org/" rel="nofollow">http://spacemacs.org/</a> (use the dev branch)
IMO, the most important Vim keystrokes for editing code are:<p>* %, which lets you hop back and forth between ()/{} pairs. Extremely useful when working with, say, Flutter.<p>* F/f/T/t (and ;/,), which let you jump to a specific character in the line, ahead or behind. This greatly sped me up, as I no longer needed to count out "okay, hop 16 characters to the left."<p>Also, another important thing is that Vim makes <i>editing</i> fast, not necessarily <i>writing</i>. There's not really much you can do to make writing faster in the first place, as you eventually have to type anything you write at least once in some form. But for editing, boy, is it great.<p>EDIT: Attempt to fix god-awful formatting
A major use case this articles misses is having to manipulate files on a remote server.<p>When you’re SSH’ing into your server, VIM is incredibly efficient to make quick edits.
Nice introduction to Vim!<p>Using bash/zsh extensively, and Vim a few times a day, I have been wondering if people treat bash/zsh and Vim as two different worlds when it comes to keybindings, or is it common to use Vi/m keybindings in bash/zsh/other shells? Would love to hear some input on this! :-)
I have to routinely use VIM for SSH related in command lines and am pretty comfortable but in no way does it compare to VSCode with the small exception use case that happens to be quite common of hop-in and hop-out of quick changes. Vim shines there. It is just so light weight and quick for that.
Btw, I just started reading SICP. How can I use Vim with Lisp code instead of Emacs? Because I did see people telling across the web that I should use Emacs for lisp code.
vim is definitely a great tool especially when you are editing/developing/viewing scripts within Linux. However, as soon as you start writing anything beyond one-file scripts, better move over to proper IDE, IMHO.