Vim multi-text editing

Source: Internet
Author: User

: Edit otherfilename "edit another file, but you need to save the original file in advance"

: Hide edit otherfilename "edit another file, you do not need to save the original file in advance"

Vim one. C Two. c Three. c "specifies multiple files to be edited at startup. N jumps to the next file.

CTRL-^ "Jump to the file you just edited"

'"" Returns the location of the time mark of the last time the file was left"

'. "Returns the last modification to the file"

Vim-r file open the file in read-only mode

 

: Split a window into two, you can open newfile in the new window through split newfile, you can use the CTRL-W to switch the current window, use ctrl-W + or-to change the window size. Use: close to close the window. Use: only to close other Windows except the current window"

: New "open a new window and start editing a new buffer"

: Vsplit "Creating a new window to the left of the current window" (Note: split is horizontally open)

: Vnew "used to vertically separate windows and open a new blank Buffer Zone"

: Set scrollbind "set multi-window synchronous scrolling"

: Set noscrollbind "cancel multi-window synchronous scrolling"

 

CTRL-W J "switch the window to the window below"

CTRL-W K "switch the window to the window above"

CTRL-W H "switch window to left window"

CTRL-W l "switching window to right window"

CTRL-W t "switching window to top window"

CTRL-W B "switching window to bottom window"

 

CTRL-W K "move up window"

CTRL-W J "Move Down window"

CTRL-W H "move to left window"

CTRL-W l "Move to the right window" (Note: here the change is regular, consistent with the direction key)

 

: Qall "Exit all windows"

: Wall "Save all windows"

: Wqall "Save and exit all windows"

: Qall! "Force exit all windows"

 

Expanded window Ctrl-W + expanded window

Zoom out Ctrl-w-zoom out current edit window

 

Vim-O (uppercase) filename1, 2, 3... "opens a window for each file, horizontally arranged"

Vim-O (lower case) filename1, 2, 3... "opens a window for each file, vertically arranged"

Vimdiff filename1 filename2. .. "display Differences Between Files"

Zo "show cascade display"

ZC "Hide stacked display"

] C "direct forward to the next difference"

[C "direct backward positioning to the next difference"

: Diffupdate "re-compare two files"

 

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.