Skip to content

Instantly share code, notes, and snippets.

@cortesben
Last active September 6, 2023 14:24
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cortesben/129fe1ed16f97c5b65e86795c7aa9762 to your computer and use it in GitHub Desktop.
Save cortesben/129fe1ed16f97c5b65e86795c7aa9762 to your computer and use it in GitHub Desktop.
A simple VIM guide

#VIM Simple VIM commands Use as a refernace for basic commands in VIM/VI https://vimgifs.com/

Commands Description
esc toggle between command mode or edit mode
shift : enter command mode
********** ***********
: + w or : + write save or write command
: + q or : + quit exit or :quit
: + wq exit and save changes
: + q! exit without saving changes
********** ***********
K move up a file
J move down a file
L move right a letter
H move left a letter
W move up a word
B move back a word
I insert mode lets you start typing and takes you out of naviation
V Visual mode lets you select blocks
shift v Visual line mode
y in visual mode press y to copy
p paste the code in normal mode
** in command mode
note Commands are built in up in three parts ACTION LOCATION CONTEXT
dd delete line
shift + d delete line leave white space
c + w delete word and go into insert mode
d + 5 + w delete 5 words put into insert mode
c + 3 + j change 3 lines down put into insert mode
c + i + t deletes text then puts you into insert mode
c + i + { delets text then puts you into insert mode in a block
side node these commands can be combined to do many things as the examples above show
Commands Description
configure VIM -
:syntax on Syntax highlighting
:syntax off Syntax disabled
:set number Added line count
:set nonumber Remove line numbers
:set relativenumber Sets number relative to where your cursor is
:set norelativenumber Remove relative line numbers
:help option-list shows all options you can set for VIM




#NANO save and exit NANO

Commands Description
Ctrl+O saves file
esc+M mac format
Ctrl+X exit Nano
@peter279k
Copy link

The #VIM Simple VIM commands Use as a refernace for basic commands in VIM/VI https://vimgifs.com/ text should have the white space after the # text.

It has the same issue for #NANO save and exit NANO.

The # title will be worked fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment