Vim is a very common editor on Linux, and many Linux distributions have VI (VIM) installed by default. VI (VIM) commands are numerous but if used flexibly it will greatly improve efficiency. VI is the abbreviation for "Visual Interface", Vim is VI
: 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
One, common commands1. "Sudo vim file name", edit the file as Administrator.2. ": q!" Force exit(PS: When you change the httpd.conf file, you will be prompted E45: ‘readonly‘ option is set (add ! to override) when you save ", must use": wq! " Save ..
Vim is known as very efficient text editing software. But mastering and efficient use is a difficult thing to do. Fast search and Replace in Vim is an important way to improve the efficiency of vim. Here are some of the things I've collated when I
Often use SECURECRT under Linux to modify some configuration files, use VI to open always a color, looking up compared to the big head.Because VI does not support highlighting, you need to use VIM.Install Vim:yum install-y vim (Ubuntu using
Content of this week's job:1. Copy the/etc/rc.d/rc.sysinit file to the/tmp directory and add # to the beginning of the line with at least one whitespace character in the/tmp/rc.sysinit file;2, copy/boot/grub/grub.conf to/tmp directory, delete the
Vim is really bad to get started, feel good annoying.In addition to Linux under the campus Wi-Fi is particularly slow, git clone has been prompted Fatal:unable to access ' Https://github.com/XXXXXXX/XXX. GIT ': GnuTLS recv error ( -54): Error in the
After Vim opens the file, press CTRL + V to enter "VISUAL BLOCK" mode650) this.width=650; "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ("/e/u261/lang/zh-cn/ Images/localimage.png ") no-repeat center;border:1px solid #ddd;"
/************************************************************************************** * Vim Vundle youcompleteme * Description: * Prior to the installation of Vim in the ycm out of the problem, can not be installed, this time to spend a little bit
1. Replace the contents of the current line:: s/from/to/ (S is substitude): s/from/to/ : Replaces the first from, in the current row, with a to. If the current row contains more than one from, only the first
Vim's work-characteristic customizationExtended mode: Current VIM process is validChange profile: Permanently validGlobal:/ETC/VIMRCPersonal: ~/.VIMRC (can be created on its own without this file)1, line numberSet Nu:set number Displays line
System Information: # Cat/etc/redhat-Releasecentos Linux Release7.2.1511(Core) # uname-Alinux Localhost.localdomain3.10.0-327.22.2. el7.x86_64 #1SMP Thu June at -: to: OneUtc .x86_64 x86_64 x86_64 gnu/linux# Cat/proc/Versionlinux version3.10.0-327.2
Failure phenomena:Use Vim to modify the file error, the system prompts the following:E37:no write since last change (add! To override)Cause of failure:The file is a read-only file and cannot be modified.Workaround:Use the command: w! to force the
1 Enter your own vim mkdir./bundile/vundle2 Execute git clone https://github.com/gmarik/vundle.git in vim peer./bundle/vundle download some plug-in files to the./bundle/vundle3 Writing your own VIM configuration set nocompatible "be improvedFileType
Progress bar principle: Data is growing from 0%~100%, but does not change lineImplementation code for the progress bar:650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/84/2E/wKiom1eHjzmQTBK-AABy_zCJji8892.png "title=" Stdout2.png "alt="
Some of the simplest configurations are those that can be written in the. VIMRC:
First, note that in the. vimrc file, you can use the "write off a line of configuration."
Set nocompatible "Turn off VI compatibility mode, where
1, borrowed from the k-vim of the Wklken great Godgit clone https://github.com/wklken/k-vim.git2, install the necessary packageYum Install-y python-devel.x86_64sudo yum groupinstall ' development Tools 'sudo yum install The_silver_searchersudo yum
1. Temporary modificationin the vi ,set tabstop=4 or Set ts=42. Permanent modificationVI--version Viewing the files to be modifiedif it is vim words, modify ~/.VIMRCif it is VI, modify ~/.EXRCPlus: Set tabstop=4Set nu//Display line numberSet
The 1.:s command to replace the string.Replace the current row the first Vivian for Sky:s/vivian/sky/G replaces the current line with all Vivian as Sky:n, $s replace the nth row to start with the first VI of each row in the last row Vian for sky:n, $
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