in the Linux system, we often use the VI or VIM command to manipulate the text, sometimes, our script file error, will throw a line number of exceptions, and then we follow the prompts, reopen, our source to view, and this time, If your vim is not
You can use the: s command to replace a string in Vi/vim. The command has a number of different details of how to use the method, you can implement complex functions, record several here, convenient later query.: s/vivian/sky/replaces the current
I. Introduction of VIM ModeThe following introductory content is from the Wikipedia vimThere are many modes of vim from VI, this unique design is easy to confuse the beginner. Almost all editors have two modes of inserting and executing commands,
1. Under Vim paste a large piece of Python code, but from a line start all more back a tab, there are more than 100 lines, one by one, I manually adjusted, tired half dead.Solution:In Vim, it's best to go to paste mode before pasting the code, which
Vi/vim Basic Use MethodThis article describes the basic use of VI (VIM), but for the average user is basically enough! I/vim the difference is simple, they are multi-mode editor, the difference is that Vim is the upgrade version of VI, it is not
This article is from Svtter's blog, reproduced please retain this information
Write with VIM (1)
Vim's Next stepFor myself, it is also in this step.Now that you have a knowledge of vim, HJKL will, F can also be used, , may be
1.taglist Plugin DownloadWherever you go from, csdn Resources or vim websiteI downloaded it: taglist_46.zip2. Create a. Vim in the ~/directory.Put yesterday's. VIMRC into the. Vim DirectoryCD ~mv. Vimrc. Vimmv. Viminfo. Vim3. Unzip the
vi : visual interface Visual Interface Because we frequently write scripts and configure the server, we need a powerful text editor. Vim:vi improved vi enhanced Vim is a full-screen, modal editor with three modes of VIM mode: Edit mode
Resolves an issue with a "~" file that appears after saving the edited Gvim file, editing_VIMRC file, and then added "Set writebackup "Setting no backup File"To resolve a problem with the "~" file appearing in the Vim save edit file, locate the
tab and indent are not the same thing.tab is a character (tab) whose display width can be defined. You can change the mapping of the TAB key, set it to n spaces, and N is determined by the tab width. Indentation refers to a concept in vim that can
a/i: Before entering vim, press (a/i) into input mode (a appends the character after the cursor, I insert the character before the cursor)ESC: Enter command line modeCorrecting text when inserting:Ctrl+h: Character Delete key ctrl+u: Row Delete key
Original link: http://blog.csdn.net/love__coder/article/details/6739670
1. Cursor movement
Top: K
Under: J
Left: L "Letter L lowercase"
Right: H
Beginning of previous line:-"Minus"
The beginning of
1. Cursor movement
On
Under
Left: "Lowercase letter"
Right:
The beginning of the previous line: "Minus"
The beginning of the next line:
Beginning of line: "Number 0"
End of Line:
The
The common configuration of all users is in/ETC/VIMRC or/ECT/VIM/VIMRCZ, and there may be other configuration files, such as Vimrc.tiny, which are described in the specific scenario file.Vim configuration for a particular user in ~/.VIMRC
Vim
= = The line number of VIM, syntax display and other settings (configuration of. vimrc files) = =January 18, 2008 Friday 23:01When using vim for editing under a terminal, by default,The editing interface is not displaying line numbers,
Fedora vim cannot be highlighted, and Fedoravim cannot be highlighted.Installation version: Fedora 20By default, run the rpm command to check whether vim is installed.Try to install with # yum install vimPrompt conflict with current versionReason:
Common Operations in the Vim Editor
Press I to enter the editing mode
Wq! Force save and exit
Q! Do not save, force exit
! Mandatory
Direction key bit:
K
H j l
Ctrl + f move down one page
Ctrl + B move one page up
Starting with a line 0
$
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