HACKER Q&A
📣 daschaa

What is a good guide for learning Vim


Hey! For some time now I often have to edit files in the terminal and I would like to learn how to use VIM. What good resources are there to learn VIM? I have no experience with it and would appreciate suggestions.

I would prefer any kind of interactive learning stuff, since I'm a very lazy reader. But this is just a preference of mine - I would be willing to read stuff aswell ;-)

Thanks in advance!


  👤 fm2606 Accepted Answer ✓
What has worked for me was to just learn a few basic functions. Save/load a file, cut-n-paste, move to line # and search. Just enough to be productive. Then I google as I needed something like search and replace, search and replace over selected line numbers, etc.

My VIM skills are still very basic and vanilla and I've used it as my main editor for a couple of years now.

My .vimrc is setup and I copy that to whatever computer I'm working on. I pretty much "stole" my setup from others.


👤 uf00lme
Vim ships with a tutorial, https://github.com/vim/vim/blob/master/runtime/doc/vimtutor....

‘Vimtutor’ on *nix or in windows land it should be a bat file somewhere in install directory.


👤 walderf
i'm still learning it, well neovim, and have a long way to go. i was an avid blind hater for 23+ years, and pico, until nano, was he the first compile and install on each machine. i admit not learning it sooner was a huge mistake, so kudos to you for deciding to take the plunge. it's literally a game changer and personally i can't wait till i know more in depth.

anyways, my advice is to just keep using it, no matter what! funny thing, the first couple of days i could not stop typing "nano " due to muscle memory so i finally aliased it to "nvim" and also created "pico" as a link to nano's binary, just in case. well, it took maybe 3 days for me to find myself in nano and trying to control it with vim commands. that was the day i removed nano from my systems and made nvim my editor of choice!

what's helped me the most on advanced features is every once in a while learn a few new key presses. i reference these [1] two [2] cheat sheets every so often and i pick 2 or 3 commands and write them on a note pad in front of me. i reference the notepad a few times until i retain the command, which is pretty hard sometimes, but so worth it.

[1]: https://devhints.io/vim

[2]: https://vim.rtorr.com/


👤 martinni
The way I did was to install vim mode in VSCode. Because running head first in vim without any plugin would slow down any serious dev work that needs to be done. Every addon you add has it's own learning curve. So at least with vscode you're in a familiar environment and you can still get work done.

👤 manofmanysmiles
https://yannesposito.com/Scratch/en/blog/Learn-Vim-Progressi...

This article got me from scared of of VIM to feeling crippled without it.


👤 asicsp
I have a list of Vim learning resources here, including interactive sites: https://learnbyexample.github.io/curated_resources/vim.html

👤 seren
In an interactive way, it might be installed on your system, you can try to type "vimtutor" in the command line, this is small interactive introduction.

👤 loloquwowndueo
How about a game? Doesn’t get more interactive than that.

https://vim-adventures.com/


👤 caseyscottmckay
Practical Vim is great.

👤 pawelduda
shortcutfoo if you like spaced repetition