Using the VIM Editor:VI is working in the character terminal environment of the full-screen editor, by the command to achieve the corresponding editing and operation functions, vi Editor can use three different modes of operation:Command mode: Start
RPM-IVH Software Name-version information-.rpm (install software)RPM-Q software name (see if the software is installed)RPM-E Software name (uninstall the switch)Because RPM has dependencies and Yum just solves this problemCreate/Modify text files
Multi-line Delete and copy method one: Single row Delete,: 1 (row to delete) d multi-row deletion,: 1,10d method Two: The cursor line, DD cursor line of n rows, Ndd Method 1: The cursor is placed on line 6th, input: 2YY cursor placed on line 9th,
Insert
I insert before the cursor
A after the cursor is inserted
Turn over a full page at a time
Turn up page ctrl+f "F" meaning forward
Scroll down full page ctrl+b "b" meaning backward
Turn half a page at a time
VIM commands are divided into two kinds, one is vim own, the other is ex, the ex command needs to enter a colon, the last return to execute, compared to the VIM command, the scope of the ex command more extensive, but also more powerful, the
1. Download Nginx.vimDownload page: http://www.vim.org/scripts/script.php?script_id=18862, Installation Nginx.vimPlace the Nginx.vim in the ~/.vim/syntax/directory,3, Configuration Nginx.vimThen add the following line in the ~/.vim/filetype.vim:Au
Vim commandYY: The line where the cursor is copied4YY: 4 rows starting at the beginning of the row where the copy is locatedP: PasteDD: The line where the cursor is clipped2DD: Cut cursor line down 2 linesDW: Cut a wordD: The contents of the current
Vim: Set Number: Set NonumberN Move Command key8l move eight characters to the right3j Move Down three rows3g: Move to the beginning of the third line10$: Move down to 10 rows and navigate to the end of the line: N1,N2S/WORD1/WORD2/GCReplace the
1. Regular expressions(1) Extension: Unlike grep, egrep or grep-e do not need to be added \ Escaped(2) Character matching.: Matches any single character[]| [^]: matches any single character outside the specified range |(3) Number of matches*: Any
A. Mobile: h,j,k,l: Left, bottom, top, right. W: The first word of the next word. W: Next word (without punctuation). E: The ending of the next word. E: Punctuation is not included. B: The word head of the previous word. B: Punctuation is
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
Vi/vim:Edit Mode insert modeSet line number: Set Nu:set NonuLine number move: GG G ng/:nMobile: H, J, K, L 0 $ H, M, LSearch:/"Characters searched" n Next n ignored case: Set ICCopy yy/y Nyy/nyCut dd ndd Paste p/pReplace:R R + ESCFull-text
When Vim starts, the user directory is loaded by default. VIMRC configuration file, if it does not exist, the system configuration file is loaded/ETC/VIM/VIMRC~/.VIMRC file Configuration#避免中文乱码Set fileencodings=utf-8, ucs-bom,gb18030,gbk,gb2312,cp936
The vi Editor, the full name of visual interface, can perform numerous text operations such as output, delete, find, replace, and so on. VI is not a typesetting program, it is not possible to arrange fonts, formatting, paragraphs, and other
Problem:Ubuntu does not have Vim installed by default and appears:[email protected]: ~$ vim test.cThe program ' Vim ' can is found in the following packages:* VIM* Vim-gnome* Vim-tiny* Vim-athena* VIM-GTK* Vim-noxTry:sudo apt-get Install
Reference https://www.fprintf.net/vimCheatSheet.html1. Exit Operation:: Q Exits when the contents of the file are not changed, and exits if there is a change in content: q! Force quit does not save: CQ forced exit does not save: Wq Save and exit: wq!
Vim has three kinds of Visual mode. In Character-wise Visual mode, we can select anything from a single character up to a range of characters within a line or Spanning multiple lines. This was suitable for working at the level of individual words or
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#,#+:
Reference links---------------------http://www.linuxidc.com/Linux/2015-12/126458.htmOnly normal mode can be toggled with edit mode, command line mode, edit mode and command line mode.One: General modeMove cursorLeft h←Right l→On k↑Lower j↓30j: Move
The configuration file for Vim is/ETC/VIMRC, or the configuration file is created in the ~/directory:Touch. VIMRCHighlight settings in general, Vim for the recognition of the program is automatically set highlighting, if not can be added in the.
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