VIM Installation:
The code is as follows
Copy Code
# yum-y Install vim*
Vim usage
The choice of text, for the editor, is a very basic thing, is often used, summed up as follows:
V starts at the current
First, the preparatory work before installing VIM7.4
1
The code is as follows
Copy Code
Apt-get Update
Problem encountered:W: The key for the following ID does not have a public key available:8b48ad6246925553
After adding the following code to the. VIMRC, restart Vim to create 4 spaces by pressing TAB:Set ts=4 (Note: TS is the abbreviation for TabStop, set tab width 4 spaces)Set ExpandtabFor a saved file, you can use the following method to replace the
Moving the cursor in VIM is a big difference from other editors, but once you learn it, you'll quickly move through the text.Copy and pasteDD Deletes the cursor in the rowDW Delete one word (word)X Delete Current characterX Delete
The command is also called motion: Help!Filter commandsInformation Filtering (filter)!==>tell vim to performing a filter operation!5G, from the cursor down 5 lines to execute the filter program (tell the VIM to start filter under cursor and go down 5
The command is also called motion: Help!Filter commandsInformation Filtering (filter)!==>tell vim to performing a filter operation!5G, from the cursor down 5 lines to execute the filter program (tell the VIM to start filter under cursor and go down 5
"To determine whether it is under Windows or Linuxif (g:iswindows && G:isgui)Nmap CT:!ctags-r--exclude=.svnElseNmap CT:!find. /-name tags-exec RM-RF {} \;; Ctags-r--exclude=.svnendif--------------------------------------------------------------------
Vim General mode:(1) Press the X key to delete the contents of the bank (backward delete)(2) press SHIFT + X to delete the previous contents of the bank (delete forward)(3) Press the number n and then press the X key to remove the N characters
First, move the cursor1, left shift H, right shift L, Move down J, move up K2. Page Down CTRL + F, PAGE up Ctrl + B3. Turn down half a page Ctrl + D, turn up half a page Ctrl + U4, move to the end of the line $, move to the beginning of 0 (number),
1. Http://stackoverflow.com/questions/7797068/copying-a-word-and-pasting-over-a-word VIWP- Visually select a word, and paste over it by something in the clip. 2. How to Copy/delete Word under cursor in Vim http://www.littletechtips.com/2011/
Vim commands a lot, it is difficult to remember the whole, so combined with my usual practice, often to use the command has been marked with red body word. If there are any errors, please note.?three different statesCommand: Any input will be used
for beginners who are just starting out with the Vi/vim text editor, how do I exit the Vi/vim text editor without saving changes? When you use the Linux vi/vim text editor to edit a configuration file under Linux, when you are finished, you can save
The configuration file is/ETC/VIMRC, and the following modifications can be added directly below the configuration file.
Automatically add comments, vim write. sh and. py files when you press F4 in command mode, you can add annotations
The simplest way to move the cursor in VIM is to use the arrow keys, but the more efficient way to do this is to use shortcut keys, as shown in the table below.Shortcut keys function Description h
Position commandCommand functionH Move one character to the leftJ Move down one lineK Move up one lineL Move one character to the right$ move to end of line0 Move to the beginning of the lineH move to upper screenM moves to the center of
: s/str1/str2/Replacement Current Line the first str1 is str2: S/str1/str2/g replaces all str1 in the current line as str2: M,ns/str1/str2/replaces the first str1 of each row in the beginning of the nth row to the last row str2: M,ns/str1/str2/g
Originally did not want to write, then think about the benefit of the people who need it, because really admire a key to the author. I know a lot of people can configure their own vim plug-in, but it is estimated that it will play anything for a
git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundleTouch ~/.VIMRCThen paste the attached file into the ~/.VIMRC.Vim has just entered the error, we can press ENTER.Then enter: Plugininstall can be installed, installation process such
Using the VIM editor for the first time in Ubuntu is a great way to install in Win7, where you encounter minor problems, and the detailed installation process and the problems you encounter are described below.1-InstallationFirst discover that there
As follows:Because UTF8 encoding is set, vim always garbled when displaying the error message of the VC compiler.Check the quick fix help and find a ready-made solution:"Compiler information transcoding The code is as follows:Copy code 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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service