Coding Knowledge Center
VIM
Copy and Paste (to file) |
shift-V; arrow down/up; yy; :e ~/BUFF/x; p; :w; :bp
Copy and paste text to a buffer file, then go back to previous file.
Delete (lines) |
:1,100d
Delete lines 1 to 100.
Delete (lines) |
100dd
Delete current line and 99 lines after it.
Delete (lines) |
dG
Delete from current line to end of file.
Display (filename + lines) |
ctrl-g
Display filename and total number of lines in file.
Display (filename) |
:f
Display current file name.
Display (line numbers) |
:set number
Turn line numbers on.
Read (file) |
:r ~/BUFF/x
Read in another file's contents.
Set tab stop |
:set tabstop=4
Set tabs to 4 spaces.
Shortcuts (num off) |
nmap <C-m> :set nonumber<CR>
Set shortcut to toggle number count off.
Shortcuts (num on) |
nmap <C-n> :set number<CR>
Set shortcut to toggle number count on.
Syntax Highlighting |
:syntax off
Turn syntax highlighting off.