Vim Tips 1 — Visual Block Change
I’ve been enjoying sharing my tips with you all on Twitter lately, so I’ve decided that I’ll try and post more visual, video-based, Vim Tips on a regular basis … I’d say daily, but I don’t want to commit just yet :)
Same Change; Multiple Lines
Do you ever need to change / insert text on the same position on more than one line? It’s pretty common when writing code.With Vim, we can accomplish this task with Visual Block editing.
Here’s an example:
# My init.vim (vimrc, but Neovim)
Lets assume I want to change these six
my new phrase, for the giggles, right?
# Enter Visual Block
# Make your selection
# Or 5j2l ... if you hate your arrow keys :)
# Chose your action, for us C (Change)
# Insert new word / phrase
my new phrase
# Change whole block