VIM
Vim is a keyboard-only text editor. Its used when making commit messages during git merges. To use Vim:
- Create a vim file
vim filename
- Move around the file with the arrow keys or
h, j ,k, l
- Switch between visual, insert, or normal mode with keys
v
,i
, andesc
Modes
v
visual mode read filei
insert mode edit filex
delete charactersdd
delete entire lineu
undo
esc
command/normal mode - use file commands
Commands
:set number
add numbers to vim ui:2
navigates to line 2:!node
run with node:help
see commands:q
quit — changes haven\’t been made:q!
quit and discard changes:w
save changes:wq
write the changes (save) and quit