Normal Mode (commands prefixed with :
may require ESC
beforehand)
Command | Description |
---|---|
:? |
Search for text. n for next result, SHIFT+n for previous result. |
:m <Number> |
Move the current line after line <NUMBER> . |
:q |
Quit/exit editor. :q! to exit if there are unsaved changes. |
:x |
Save changes and close. |
dd |
Delete current line. |
Insert Mode
Command | Description |
---|---|
CTRL+D |
Undent |
CTRL+T |
Indent |
" file type detection
filetype on
" syntax highlighting
syntax on
" lint numbers
set number
" highlight row
set cursorline
" indent spacing
set shiftwidth=2
set tabstop=2
" case insensitive search
set ignorecase
" but allow for specifically cased search
set smartcase
" highlight found words
set showmatch
" show mode
set showmode