About VI1. VI is a widely used text editing program in a variety of UNIX and Linux systems.2. VI is not a typesetting program, but a purely text-editing program.3. VI is a full screen text editor, it has no menus, only commands.4. VI is not
############# Buffer zone: E (: Open) Open the New Buffer: Ls (: buffers) list all buffers in the list/BS/BV/be (burexplore shortcut): Buffer 2 switch Buffer: Bnext/BN (CTRL 6) Next Buffer: Bprevious/BP top Buffer: Bfirst/BF first Buffer: Blast/BL
~ /. Vimrc // Vim environment script~ /. Viminfo // Vim logon information: Set nu: Set Nonu // set whether to cancel the row number : Set hlsearch: Set nohlsearch // hight light search // whether to whitelist: Set backup // whether to automatically
How to Use Vim to find and replace In VI/vim, you can use the: s command to replace the string. This command has many usage methods for different details, which can implement complex functions and record several types here for future query
"Configuration file for vimset modelines = 0" CVE-2007-2438 "normally we use vim-extensions. if you want true vi-compatibility "Remove change the following statementsset nocompatible" use Vim defaults instead of 100% VI compatibilityset backspace = 2
Recently I am reading the book "TCP/IP protocol strated volume2: The Implementation". Naturally, I need to download the source code of 4.4bsd-lite and study it together with books. When I used to learn vim, I knew that Vim could use the plug-in
I. From command to zookeeper Mode
A: append is inserted after the current word.I: insert Insert at the current positionO: insert open new line in a new row under the current rowA: append is inserted at the end of the current row.I: insert at the
Vim's learning curve is quite large (see the learning curve of various text editors). Therefore, if you see a lot of VIM command classification at the beginning, you will lose interest in this editor. The following article is translated from "Learn
Vim basic commands
Leave ViZZ: WQ: X Archive before leaving: W archive name into his archive: Q quit (will prompt if the archive is changed): Q! Quit editing and leave: WQ! Force archiving and exit
Leave Vi temporarily:! Temporarily execute the Unix
"Map compilation for a single file : Call do_onefilemake () function do_onefilemake () If expand (" %: P: H ")! = Getcwd () echohl warningmsg | echo "fail to make! This file is not in the current Dir! Press to redirect to the Dir of this file. "|
I. move the cursor
1. Shift left H, move right l, move down J, move up K
2. Flip down CTRL + F, flip up Ctrl + B
3. Flip down half page Ctrl + D, flip up half page Ctrl + u
4. Move to the end of the line $, move to the first 0 (number) of the line,
Install
In centos, we can directly use the yum command for installation.
Overall steps
Install cscope
Configure the vim configuration file
Generate a cssag. Out File
Use the cssag command to perform operations
Cssag Installation
Download on
Vim has powerful replacement and search functions. If you can use it skillfully, You can greatly improve your work efficiency.
Replace
Syntax: [ADDR] S/source string/destination string/[Option]
[ADDR] indicates the search range, for example:
"1, N":
Time: 2014.08.06
Location: dormitory
Bytes -------------------------------------------------------------------------------------
We decided to set up the vim environment tonight, mainly through various plug-ins, and then we can live a happy life.I.
The matching and replacement function of VIM is very fast and powerful, but it is hard to show the number of matches. It should be implemented around a bend:The key to % S/xxx // gn is the final N, which indicates only the number of matched records
Vim-) while confirming and searching for replacement
When performing simple global search replacement, you can use the following ex command:
: % S/which/what/g
It is easy to use
%
Each row (everyline)
S
Replace
How Xin Xing helps you with vim's third-section mobile technology that programmers need
First of all, it is worth mentioning that the pdf version of my vim tutorial has been completed. You can download it. Here is the download of csdn: csdn. If the
How to troubleshoot UTF-8 file garbled characters in VIM
1. Basic KnowledgeIn Vim, there are four encoding-related options: fileencodings, fileencoding, encoding, and termencoding. In actual use, any option error may cause garbled characters.
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.