Vim Tips Summary

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.