I use vi quite frequently (Ubuntu/Centos Linux and Mac) for many of my editing needs in addition of couple of other editors (eclipse, intellij, etc). It becomes quite hard to read the manual every now and then when we use very few commands (probably 10-20 or so) on a daily basic. Here are some commands which I used very often.
[ESC] | Escape key |
[CTR] | Control key |
- XCode cheat sheet of all shortcuts and commands.
- Basic vi commands (cheat sheet) By admin. Vi is one of the most commonly used editor program and included by default with every UNIX and linux system. Vi basically operates in 3 modes, namely: vi mode – the mode vi starts in.
CheatSheet for Mac provides you a directory of hotkeys for Mac OS X devices. Hotkeys or keyboard shortcuts are a set of keys that you press together to prompt a software program to complete an action. Mac keyboard shortcuts are ingrained into its operating.
VI – Search
Normal search (Case sensitive)
Backward search (Case sensitive)
Case insensitive search
VI – Undo/Redo
Undo
Redo (can cancel an undo also)
VI – editing
Insert before a char
Append after a char
Delete current line
Delete multiple lines
- XCode cheat sheet of all shortcuts and commands.
- Basic vi commands (cheat sheet) By admin. Vi is one of the most commonly used editor program and included by default with every UNIX and linux system. Vi basically operates in 3 modes, namely: vi mode – the mode vi starts in.
CheatSheet for Mac provides you a directory of hotkeys for Mac OS X devices. Hotkeys or keyboard shortcuts are a set of keys that you press together to prompt a software program to complete an action. Mac keyboard shortcuts are ingrained into its operating.
VI – Search
Normal search (Case sensitive)
Backward search (Case sensitive)
Case insensitive search
VI – Undo/Redo
Undo
Redo (can cancel an undo also)
VI – editing
Insert before a char
Append after a char
Delete current line
Delete multiple lines
Delete 300 lines (or whatever is left till end) starting from current
Delete current word
Delete current word. If you are in the middle of the word then it deletes the word partially.
VI – saving, etc.
Save the file
Save file as
Quit without saving file
Reload file undoing all unsaved changes
VI – search replace and regular expressions (regex)
Simple global search replace
Simple global (all entries in a line) search replace for all lines from 1 to 10 (use $ for end)
Remove beginning spaces
Remove 2 beginning spaces from all lines from 10th to last line
Interactive global search replace
Simple interactive global search replace and get prompted for each replacement
Vi Cheat Sheet Wallpaper
Suggested posts:
Notes:
denotes the
Esc
key, anddenotes the
Enter
key.- The expression
means that youshould enter a command,
means that youshould enter a filename, and
means that youshould enter a character or number.
- The symbol
^
(caret) means that youshould hold down theCtrl
key while pressing theindicated letter.
Vi editor command keys:
Ex mode commands:
Options:
Vi Cheat Sheet Machine
At Indiana University, for personal or departmental Linux or Unix systems support, see Get help for Linux or Unix at IU. Most reliable subcompact suv 2020.