In Linux, the Vim editor is the system's own text editor, but to modify a text file, it is not like Windows, more novice, into the VI editor, can not exit so that the forced shutdown, in fact, this vim (vi) is very simple.1. Enter the VIM editorVim
Reference Document: http://blog.csdn.net/ii1245712564/article/details/46960387First, comb the key knowledge for easy accessV (small v): Enter visualizationV (large V): Enter visual lineCtrl + V: Entering a visual blockThere are also some related
Command historyCommands with: and/begin with a history, you can first type: or/Then press the up and down arrows to select a history command.Start vimEnter the following command in the Command line windowVim starts vim directlyVim filename opens vim
(i) Vim editor
Text Editor: Plain text, ASCII text;unicode, no HTML, or metadata such as formatting tags in Word documents
Type of text editor
Line Editor: SED
Full Screen Editor: Nano,vi,vim
Vi:visual Interface
Vi (Visual Interface) is a text editor with a common text compiler that has ASCII encoding, Unicode encoding, and so on. Vim is VI improved: is the enhanced version of VI, Vim is a modal editor.There are 3 modes of VIM in the work:- edit mode: Also
Before https://www.ibm.com/developerworks/cn/linux/l-cn-vimcolumn/startsThe human brain's processing of words is flat, so we browse articles, find materials, or refactor code, either horizontally or vertically, or use search to make text as a whole.
VIM InstallationTo install vim under Unbuntu, enter the command:sudo apt-get install vimVim ConfigurationWhen using vim for editing under the terminal, by default, the editing interface is not displaying line numbers, syntax highlighting, smart
YYP Copy the current line to the next lineDDP cuts the current line to the next lineCW: Deletes the current word and enters insert modeXP: Swapping current and right charactersS: Delete the character of the cursor and enter insert modeI: Enter text
Last-line mode focuses on (this is the basis for learning the SED)1) Address delimitation: Start_pos[,end_pos]#: Specific # lines, e.g. 5 for line fifth.: When moving forward$: Last line#,#: Specifies the row range, the left is the start row#,#+:
Installing CtagsYum Install CtagsGenerate tags filecd/usr/-R.Configuring tags in vim#修改 the VIM configuration file. Or use vim ~//etc/vimrc# to add the following line to the VIM configuration file set tags+=/usr/include/tagsUse CTRL +] to jump to
Multi-line Comments:1. Enter command-line mode, press CTRL + V to enter Visual block mode, then press J, or K to select multiple lines to mark the lines that need comment2. Press the uppercase letter I, and then insert the comment, for example #3.
Now, you don't have to worry about these complicated processes, because we can make use of Vim's shortcut keys to enable us to operate vim as smoothly as possible. Now, let me introduce a few very useful (we know that Vim shortcuts have a lot, not
When we write the script, we always start to define the script header format according to the script writing specification, the time is not likely to feel the trouble is inefficient, here is to introduce a good idea to everyone.1 First we in VIM
Reference: Https://github.com/yangyangwithgnu/use_vim_as_ideHttps://github.com/Valloric/YouCompleteMeThere are several issues with the installation of the full install step in Https://github.com/Valloric/YouCompleteMe:(1) in executingCmake-g "Unix
One, permission mask:For directory: Permission Mask 0022Maximum permissions rwxrwxrwx 777 minus the permission mask three bits is the directory permission 755For files:Highest privilege rw rw RW 666 minus permission Mask 644command to modify a
Vim Editor basic commands (top)Three modes:Edit mode, input mode, last line modeDefault to edit modeMode conversion:Edit mode--Input mode:I:insert, enter at the cursor positionA:append, enter at the rear of the cursorO: Opens a new line below the
Vim EditorText editor, word processorAsciiNano, SEDVi:visual InterfaceVim:vi Improved:vi the basics plus some useful pluginsFull screen editor, modal editorVim mode:Edit mode (Command mode)Input modeLast-line modeMode conversion:Edit--Input:I: In
Multi-line comments and delete multiline comments in Vim-------------------------------------------------------------------------------1. Multi-line Comment:A. Press CTRL + V to enter the column mode;B. At the beginning of the line, select the lines
After creating a Python file with vim, such as pw.py, the file header will be filled in automatically, such as: 1 #!/usr/bin/env python 2 #-*-Coding:utf-8-*- 3 # Pw @ 2013-04-15 17:26:33Add the following code to the/ETC/VIM/VIMRC file:function
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.