VI command tips

i – insert mode

j – move down, k – move up, h – move left, l – move right

/(phrase) – search for a phrase

n – repeat search, moving forward,  N – repeat search, moving backward

ctrl+F – move forward (one full screen), ctrl+B – move back (one full screen)

ctrl+D – scroll forward (half of a screen), ctrl+U – scroll back (half of a screen)

1G – move to first line of file, G – move to last line of file

a – insert text to the right of the cursor

:q! – quit w/o changes

:wq – write quit

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.