Multi-column windowYou can divide the current window horizontally into two columns by using the following command
: NewCreate a new column blank window
: SplitDisplays the current file in two columns
Similarly, you can use the following command
1. Multi-line Comment: A. Press CTRL + V to enter the column mode; B. At the beginning of the line, select the lines that need comment; C. Press "I" to enter insert mode;D. Then enter the comment symbol ("//", "#", etc.); E. Press the "ESC" key. 2.
General Mode : Enter the "vim file name" in the Linux terminal to enter the general mode , but cannot enter the text.edit Mode : Press I in general mode will enter the editing mode , you can write the program, press ESC to return to the general
Paste a self-used vim configuration file, the personal feeling that these configurations are not bloated, for the operation is basically enough.Set Shortmess=atiSyntax enableSyntax on "SET syntax highlightingSet NuSet rulerSet autoindent "Setting
Vi:linux text editor, all Linux distribution will be taken by default.Vim:vi's enhanced version, it can automatically call the program's syntax judgment based on the file's suffix or the information at the beginning of the file to determine the
About VIMVim has the following modes:1) Normal mode, the default editing mode, the following if no special instructions, the mentioned commands are directly in normal mode input, any other mode can be on the keyboard Esc key back to normal mode.2)
Linux-vim useAt present, the work environment is basically transferred to the Linux platform (ubuntu-16.04 x64), but it is inconvenient to view the code under the Linux platform. In fact, is accustomed to sourceinsight, and do not want to through
The VI editor has 3 modes: Command mode, input mode, and last line mode. It is important to master these three models:Command mode: VI starts after the default entry is the command mode, any mode, press the [ESC] key can return to the command mode.
Vim operation1. Insert command
Command
Operation
I
Insert before cursor position
I
line where the cursor is located, beginning with insertion
A
Insert after cursor position
after installing the Vim editor on a Linux system, it was found that Vim's page settings were not used, no line numbers were displayed, no automatic indentation, and the background of the page was not very nice, but the Vim editor was configurable
Sometimes many files, want to know the current file name, shortcut key: CTRL + G canIf you feel that it is not enough, then modify the vim configuration:Vi/etc/vim/vimrcAdd the following to the last side: Let &titlestring = expand ( %:p " ) if
Vim EditorText editor, word processor ASCIIFull screen editor, modal editorVim modeEdit mode (Command mode)Input modeLast-line modeMode Conversion:Edit-InputI: Convert to input mode in front of all characters in the current cursorA: After all the
VI into VIM, the following # number indicates the numberFullselectedThe correct answer is:GgvgExplain the above command a little bit.GG lets the cursor move to the first line,VimOnly valid, VI invalidV is entering visual (visual) modeG cursor moves
VI(VIM) is a very common editor on Linux, and many Linux distributions have VI (VIM) installed by default. VI (VIM) commands are numerous but if used flexibly it will greatly improve efficiency. VI is the abbreviation for "Visual Interface", Vim is
Failure: When using vim to edit the Nginx configuration file, there has been a SWP file already exists:When you use Vim to edit a file, a SWP file is generated. Filename.swpThe file will be deleted automatically at the end of the normal edit exit.If
Http://www.cnblogs.com/fakis/archive/2011/04/14/2016213.html1. Folding ModeAvailable options to set the folding method:Set fdm=xxx in the Vim configuration fileYou can call the VIM command directly in the file using comments */* Vim:set fdm=xxx:
1. Enter the following command to start VI: (1) VI: Do not specify a file name, you will need to specify a filename when saving it. (2) VI file name: The file can be either existing or new. (3) vi +n file name: Enter VI, the cursor
NERD Tree Directory plugin
• Introduction to PluginsNERD Tree is a vim TreeView File Explorer plugin. NERD tree allows you to navigate through your file system in vim and open the desired file or directory.• Plug-in installation? Download Nerd
[1][email protected]:~$[email protected]: User name @ computer name ~: Home directory $: prompt [2] open terminal ctrl+shift+n: Open as current directory ctrl+alt+t: Open terminal default home directory [3] ls browse directory
Generally, editing software provides the "cut window or freeze window" function, so that one or more files are displayed in multiple windows. Vim also has this function.The following is a summary of the multi-window operations in Vim.I. Opening and
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