Frequently Used VI shortcut keys

Source: Internet
Author: User

CTRL + W + J (K, H, L) Move the window, note that it is in upper case

: Only close all other windows

: Sh in Windows and Linux

Exit with: Sh to enter shell, return to VIM

When ctags-r shell is used, the Tag file is generated in a large directory.

CTRL +] = Shift + y jump to the cursor tag Definition

CTRL + W +] the file defined for the variable at the cursor position is opened, and the cursor jumps there, because my shift + W equals Ctrl + W

So it is equivalent to Shift + W +]

CTRL + T = Shift + t jump back tag

: Tag same_is <tab> press enter to automatically jump to the same_isbn definition.

: Stag same_isbn open this tag in the new window

:., $ S/string1/string2/G String replacement

WM fileexploer

TL taglist

Exit QA all

Save all wqa files and exit

Zo fold

Zo

ZC

ZC

ZF

ZD

Move the GD cursor to the local variable definition and highlight all, just like searching

GF open the file where the cursor is located in this window

CTRL + O jump back, very common

CTRL + W f open the file with the cursor in the new window

CTRL + C ESC

XP cursor character and the next character exchange position

Place all rows of the DDP cursor IN THE NEXT SESSION

* It is equivalent to GD, but the cursor does not reach the variable definition.

X Delete cursor characters

D. Delete the entire line after the cursor.

CC deletes and edits a row

R replaces the character of the cursor

Dd deletes a row

C. Delete the line after the cursor and edit it.

DAW deletes a word.

F'x' returns a character to the row.

% Jump to matching brackets

M 'X' sets the flag to jump to the flag

Marks

Delm!

NG

Gg

G

W

.

No tab, only split

Tab new. Open another file in the current directory and add it to another bookmarks.

GT, GT

=

Gg = G

= {

Sfind

U

CTRL + R

CTRL + G display file name: F must be combined with PWD to view the absolute path

 

F4 gray

F7 white

Hi clear + set BG = light white default

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.