- Published on
10 Vim Tricks Every Programmer Should Know
- Authors
- Name
- Abdullah Diaa
- @AbdullahDiaa
Are you a programmer looking to improve your productivity with Vim? Look no further! In this post, we'll explore 10 Vim tricks that every programmer should know.
- Quickly switch between multiple files with
:bn
and:bp
. - Use
:set nu
to display line numbers in your file. - Indent a block of code with
>>
and unindent with<<
. - Search for a word in your file with
/word
, and usen
andN
to navigate to the next and previous occurrence of the word. - Replace a word in your file with
:%s/old_word/new_word/g
. - Use
CTRL-A
andCTRL-X
to increment and decrement numbers in your file. - Save and quit Vim with
:wq
. - Quickly undo and redo changes with
u
andCTRL-R
. - Use
:!command
to execute shell commands from within Vim. - Customize Vim to your liking with the
.vimrc
file.
Try out these Vim tricks and see how they can improve your coding experience. Happy hacking!