Bash & vi

Source: Internet
Author: User

More efficient use.

Select full text

Ggvg

File Header: GG, end: G

Redo:

CTRL + R

Fold code/Open fold:

ZF for folding

Zo, turn on and fold ZC, and turn off the fold

Jump to matching {or:

%

Mark the current word: # Or *

Jump to the next place: n (# marked forward, * marked backward)

Shift + N (opposite to N)

GENERAL: # mark, Shift + N next place.

Tag, compared to the/Buf search,/Buf will match the Buf content such as buffer by N. By marking with #, only the Buf words are matched.

Ctags Plugin:

1. Generate the tags file: ctags-r-c ++-kinds = + px-fields = + IAS-extra = + q

2. Jump to function, variable definition, declaration location: Ctrl +] (local variables do not generate tags)

Cross-file jump, G Ctrl +]

3. Return to the jump position: Ctrl + O/T

4. Open the function definition file and jump to the corresponding line: vim-T my_function

To solve this problem, you can only jump to the root directory of ctags. If the subdirectory prompts that the tags file cannot be found:

Edit ~ /. Vimrc, add: Set tags = tags;

1. Batch convert windows line tail characters to Unix format (/R/N to/N)

Sed-I's/\ r // 'filename1 filename2...

Or

Find DIR/-name "*. *" | xargs sed-I's/\ r //'

Bash & vi

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.