Vim's 3 Modes of operation: Command mode, input mode, last line mode
Command format: # VIM [option] ... [FILE] ...
-O: Open multiple files in horizontal split screen
-O: Open multiple Files in portrait split screen
Ctrl+w+s: Horizontal Split to display individual files
Ctrl+w+v: Vertical Split to display individual files
Ctrl+w: Toggle Window
1. Command mode
*{H,J,K,L}: Jump * characters w,e,b: Move between words *{w,e,b}: Jump to multiple words ^: jump to the beginning of the first non-whitespace character 0: Absolute line End (,): Move between sentences {,}: Move between paragraphs *g: Skip to section * Line GG: First line G: Last line cc: delete the current line and enter.: Repeat the previous command
2, the last line mode
#: Line #: Current line $: Last line%: Full text, equivalent to 1, $c, d,y, etc. commands can be appended directly to the address range using W/path/to/somefile: Saves the selected range of content to a file r/path/from/ Somefile: Reads the contents of the specified file to the specified location s/find mode/replace content/gi Find mode: You can replace content with regular expressions: You cannot use a pattern, you can only use a reference g, a full line substitution, and I, a character case delimiter can be substituted with other characters, such as [em AIL Protected]@[email protected] equivalent to S/SRC/DEST/GV: The character passed by the cursor V: the cursor traversed the line multi-file mode:: Next:previous:last:first:wqall window Property Definition:: Set Nu Display line number: Set AI indent: set Ic:set showmatch bracket match: syntax on syntax highlighting: set Hlsearch search Highlighting profile: Global:/ETC/VIMRC User: ~/.VIMRC
Vim Tips Summary