Showing posts with label Vim. Show all posts
Showing posts with label Vim. Show all posts

Helpful Resources for Vim: #1 OpenVim

OpenVim

OpenVim Tutorial, according to me, might be the best hands-on approach to vim, though a bit restrictive. It has got great layout and pretty great introduction to the basic vim shortcuts.
There's an editor screen which shows the tutorial and where you type and use commands, then there's the keyboard that flashes the key you're supposed to press, and finally the sections to skip chapters or to practice again.
Tutorial can feel somewhat restrictive as other than the keys you're supposed to press, you can't use any other commands, not even keep on practicing the same thing till you get it. You either start the chapter anew or switch to the practice mode.

Also there's this practice mode on the website where you get an editor screen and a helpful sidebar of context-aware actions to see the list of rightful changes.



Relative line numbers in Vim for calculation free fast movement

I've seen on someone's Vim having dynamic line numbers. You can just switch to another line by looking at its line number and using that with either j or k.

So, after googling a bit, I came upon these settings-

" To show normal line numbers
set number

" To show relative line numbers
set relativenumber

Just add one of the above snippet to your .vimrc and you're good to go.

But,  if you want to toggle between them, 

Relative line numbers in Vim for super-fast movement
Jeff Kreeftmeijer - Relative line numbers in Vim for super-fast movement