[Vim]vim Learning Notes--Multiple files open, toggle, close

Source: Internet
Author: User
Tags switches

one case is to open multiple files in the shell with Vim, and the other is to open multiple files in the VIM editor
open multiple files at the same timeVim File1 file2
Open the file and display the Vim-o file1 in the horizontal window file2

Open file and display Vim-o p1.sh vertically p2.sh


open a new file in VimThe original window opens the new file: Open files

Multi-window open: vs file path/filename Open file in new vertical split screen: SV file path/filename Open file in new horizontal split screen
Switch between files (one window, but multiple files are open) ctrl+6-next file: bn-Next file: bp-previous file
Multiple window switches are also turned on for files opened in multiple panes with (v) Split, this method only switches different files in the current pane. ctrl+w+ arrow key--Switch to front/bottom/up/Next pane ctrl+w+h/j/k/l--ctrl+ww--to the next pane in turn
Copying between multiple files: 1. Use visual mode in the first file, which is visual, then select the text you want to copy, execute the command "+y," or "*y" to copy the content to the Clipboard. Here can be three characters, and must be in the visual mode, and then select the code you want to copy, enter the above command, then the following in vim does not display the command you entered. 2. In another file, execute the command "+p, or" *p. Can be copied over, + refers to the meaning of the register, it seems to be the clipboard of the operating system, after copying, in other places, such as text files can be used in the CTRL + V. Here is also in the visual mode, do not need to enter a colon:, the command entered here is not visible.
Close file: Single file: Q You can turn off all: QA

This article is from the "Orangleliu Notebook" blog, reproduced please be sure to keep this source http://blog.csdn.net/orangleliu/article/details/41745975

Author Orangleliu using Attribution-NonCommercial-sharing protocol in the same way


[Vim]vim Learning Notes--Multiple files open, toggle, close

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.