Learning Basic VI commands and shortcuts


 It might useful for Linux beginners.


Command Mode
 Default mode of vim
 Move by character: Arrow Keys, h, j, k, l
 Move by word: w, b
 Move by sentence: ), (
 Move by paragraph: }, {
 Jump to line x: xG
 Jump to end: G

Insert mode
 i begins insert mode at the cursor
 A append to end of line
 I insert at beginning of line
 o insert new a line (below)
 O insert new line (above

Ex Mode
o :w writes (saves) the file to disk
o :wq writes and quits
o :q! quits, even if changes are lost

Manipulating Text
    change (c)
    cut (d)
    yank (y)
    paste (p) without target
   
Line in Action

    Line as in action
    Letter l
    Word w
    Sentence ahead )
    Sentence behind (
    Paragraph above {
    Paragraph below }

Undoing Changes (Command Mode)

    u undo most recent change.
    U undo all changes to the current line since the cursor landed on the line.
    Ctrl-r redo last "undone" change

Multiple windows

    Multiple documents in multiple windows
    Ctrl-w, s splits the screen horizontally
    Ctrl-w, v splits the screen vertically
    Ctrl-w, Arrow moves between windows
    :q close the current window
    Ex-mode instructions always affect the current window

Also read :

Tips to create super strong passwords easely
Change your password right now - Heartbleed
Write one liner Batch Script to Take Your File Backup
7 Types of Dangerous Virus
2 Software to Keep Your Passwords Safe and Secure



Comments