Collation of VIM common operations and configuration files (not to be continued, add at any time)

Source: Internet
Author: User

Just list my usual, richer and more comprehensive please do it yourself Google

Basic command:

u : Undo Step up Action

I: Insert

Search for words:

/word : Starts at the cursor position, looking down to a name named word the string

? Word: Starting at the cursor position, looking up a string named word

N: means "Repeat the previous search action", for example: just executed the /word search down word string, the n is pressed, you will continue to search down the next word string,? Word is the same

: s/abc/123/g is the current line substitution, replacing all ABC in the current line with 123

:%s/abc/123/gis to replace all the ABC in this textto replace with 123 , pay attention to replacing such as / , you need to use \ escape, for example with _p_/ replace ./ , the method is :%s/. \/_p_\/g

Copy, paste, delete

1 ) Move the cursor over the line to be copied, press yy(copy the current line)

2 ) Move the cursor to the location you want to copy, press P(paste to the specified line)

3 ) Move the cursor to the location you want to copy, press DD(delete the current line)

nerdtree plug-in use

nerdtree to enter : Nerdtree, press Q when closed. You can also join the shortcut key to open

1. Vim ~/.VIMRC

2. Join this line : Nnoremap <silent> <F5>:nerdtree<cr>

3 . pressing F5 will automatically expand the directory tree

Ctrl + W + W cursor automatically toggles in left-right window

o Expand a directory on the left, and then click Merge Directory

    t Open the selected file lang= >tab in the new Font-size:medium; " >/ bookmark and jump to the new tab

T Opens the selected file / bookmark in the New tab , but does not jump to the new tab

P jumps to the root node.

P jumps to the parent node.

Q close nerdtree window

标准模式下:    gT      tab    gt      后一个tab

Collation of VIM common operations and configuration files (not to be continued, add at any time)

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.