vim-2

vim configuration file
mkdir ~ / .vim
cd ~ / .vim
vim vim vimrc // Create a personal profile

vim and key maps set:
noremap JK j // the function key mapped to key k
map S: w // S (shift + s) is set to save the file
map Q: q // Q (shift + q) to exit the
syntax on // syntax highlighting format
set number // display line number
set cursorline // the line where the cursor displayed row line
set wrap // line string exceeds wrap screen
set showcmd // display command input
set wildmenu // tab auto-completion

Copy:
cursor to the beginning to be copied, v enters --visio-- mode, h / j / k / l to move the cursor to the end position, y replication
: <line number>, <line number> Copy <line number>
Example: 1,5 copy 10 copies the first to row 5, line 10 and adhered to

Paste:
Copy, press the pasted current cursor p

Delete:
dd delete line
<number> dd delete lines starting from the line
D to remove the cursor from the last character
at the beginning of the cursor is moved to delete, v enters --visual-- mode, h / j / k / l moved cursor to the end position, d delete

Undo: u

Split Screen:
: left split-screen
: vsplit vertically split screen
ctrl + w cut screen + h / j / k / l selection switching window
: quit Close the current window
: only close the other windows, leaving only the current window

: Shell back to the command line
shell in the back exit vim
:! Execute commands in vim
: r! Execute commands in vim and print the results

Guess you like

Origin www.cnblogs.com/mydrizzle/p/12562421.html