Vim is a text editor
- Efficiency
- It's everywhere (all of your PCloud or on premise servers)
- Steep learning curve
- Normal Mode
- Used to navigate a file
- Switch to normal mode by pressing the
Escapekey - Navigate using
h,j,k,lkeys (left, down, up, right)
- Insert Mode
- Used to insert or delete text from the current position
- Switch to insert mode by pressing
i,a,I, orA
- Command Line Mode
- Used to execute commands
- Switch to command line mode by pressing
:
- Visual Mode
- Used to highlight text
- Switch to visual mode by pressing
v,V, or<CTRL-v>
- To open a file with vim
$ vim file.txt - To save (write) the file, return to Normal Mode and type
:w - To exit (quit) Vim, return to Normal Mode and type
:q - To exit (quit) Vim without saving the file type
:q!
ggmove to top of fileGmove to bottom of file<CTRL-u>move up half a page<CTRL-d>move down half a page- You can prefix a movement command with a number to repeat the movement that
many times. Ex.
10jmoves down 10 lines
dddeletes current lineyycopies line to register>>to indent line<<to de-indent line.repeats the last change in Normal mode
ci)dt#
$ vimvtutor- To get help on something, return to Normal mode and type
:help <KEY>
- dotfiles & plugins
- Vimium
- Vim + tmux