I'm a newbie to programming. I like to learn vim. Is there any guide to learn from the basics to pro?
- Thanks in advance
Edit: Found the answer I was looking for. Thanks for sharing your advices with me. Much love โฅ๏ธโฅ๏ธ
I'm a newbie to programming. I like to learn vim. Is there any guide to learn from the basics to pro?
Edit: Found the answer I was looking for. Thanks for sharing your advices with me. Much love โฅ๏ธโฅ๏ธ
For further actions, you may consider blocking this person and/or reporting abuse
Brian -
Sospeter Mong'are -
Aditya Rawas -
Atsushi Suzuki -
Top comments (24)
Use vim as your main editor even though it's going to slow you down a lot. Learn while using it. Following tutorials is ok, but it doesn't help if you just keep on learning. You might not even need everything and it's ok to not know a lot of things.
Obvious advice: make sure to not give up. If it's too much, take a break. I stopped using vim couple of times, but in the end, I managed to use it as my main editor.
the best advice for sho. use it as main editor. also ignore distractions at first. it takes time to learn a few things and it is ok to ignore plugins and other things at the beginning. you are also be considerably slower for a while, but after you master it your productivity boost is going to pay off in my opinion
This is in fact the best advice. I did it and after two days of work I feel pretty much confortable to keep using it.
Thanks for sharing man
Thanks a lot man for the advice. A good point "learn while using it".
My advice would be to not focus too much on learning everything. Focus on a simple thing, like movement (vim-adventures.com/), and navigating between insert / visual modes. Vim doesn't need to be any more daunting than this to start with.
From the super basics, you can then just ask yourself what you are doing that feels inefficient. For example, pressing j lots of times over and over to move down, or k lots of times to move up. Then look for a shorter way to do this (i.e. Ctrl + u, Ctrl + d respectively).
Keep doing this iterative improvement and before you know it you'll look like a wizard to anyone else.
Thanks man.
Sure I'll look in that.
โฅ๏ธโฅ๏ธ
Speaking of games that can help you to learn vim, there's also PacVim.
Thank you. I'll have a look
Most important things to force yourself to do:
:s
command and q-macros whenever possible.Also, if you catch yourself doing something wrong, don't just think "I'll do it the vim way next time", actually undo your changes and do it right to train yourself.
Once these basics become reflexes, you'll find yourself looking for alternatives to do things faster. Starting to use
w
andb
will be a natural step and the more:s
you use the more comfortable you will be with regular expressions.I invite you to read a post I wrote exactly for people looking to get in!
dev.to/omerxx/vim-from-foe-to-frie...
You can added to that another post that may help you get to know commands on the keyboard: dev.to/prodopsio/vim-a-to-z-litera...
And I have some more on the topic but the first one should take you far enough :)
Can't agree enough with the "don't aim to be the perfect vim user" point. There are many gatekeepers within the vim community, sadly.
Once you learn the basic navigation, watching other people use vim really helps a lot. When you see vim or emacs gurus working on their projects, you will see them doing all kinds of weird tricks that you would never learn if you just read the manual. After you find neat tricks to learn, you can always google for the instructions.
Roger that. Thanks ๐๐
I personally switched to github.com/martanne/vis or plain vi(1). For any scripting problems, I just use the standard tools, sed(1), awk(1), tr(1), cut(1) or write a shell script. For a few years I thought it was my fault I didnt't get vim's "advanced" features, now I think vim is leaning towards the "bloat" side. My tools are very well suited for "modern" web development. I'd recommend learning the standard UNIX tools rather than vimscript.
I would say use vim with very minimal configuration, maybe a little syntax highlight and line numbers enabled. Disable arrows so that you are not tempted to use them in normal mode. Use it and have the vim cheat sheet ready for when you need to learn a new movement. Vim tutor is a great place to start.
Here are a few tips:
dev.to/kodaman2/20-vim-shortcuts-t...
I've been using Vim for 22 years, and continue to learn new things. Whenever you think there should be a better way to do something in Vim, their probably is; check Vim tips wiki first.
Thanks man
The other tips here are great - I'd like to add that you should also focus on learning mainly what you need. For example, start with the basic motion keys, and as you progress, and say, need to navigate to a matching brace, look that up. Next, if you need another movement or function, look that up as you go.
Personally, I found this helped me avoid getting overwhelmed, and it's fun to continuously learn new things.