Category Archives: vim

Learned new command in VIM

What I learn to use VIM today

Split A File
to split vim windows, in command mode:
:split filename
to navigate between windows

Copy A Block of Text
to copy a block of text:
go to the first line to copy, then type,
BTW a in ma can be anything from b,c,d,e,….etc
then to the last line of the block to copy
Then go to the line to paste

To Replace Text
to replace text foo to bar in a line, go to the line type

to replace all foo to bar text, in a file

the g is to replace all occurrence, of foo

This is courtesy of