Vit Editor has three modes
- default: the opened editor is by default, and does not allow to add text
- insert
- visual
VIM Shortcuts cheatsheet examples
The following list of Vim shortcuts and cheat sheet examples
Command | Description |
---|---|
Cursor Shortcut | |
h | go to left |
j | go to down |
h | go to up |
l | go to right |
Search pattern examples | |
/searchpattern | Search given pattern forward |
?searchpattern | Search given pattern backward |
n | next match of search result |
N | previous match of search result |
* | Select the Next word for matched pattern |
# | Select the Previous word for the matched pattern |
Quit Editor Command examples | |
:w | Saves the file, Does not exist |
:wq | Saves the file, exit the file |
:q | exit opened file, Does not quit if any changes |
:q! | exit opened the file and discard changes made |
| String case Conversion example commands| |Shift + j| Converted multiple selected lines into a single line| |Shift + u| Convert string lower case to upper case| |Shift + ~| Convert string into lowercase|