1 , how to change the automatically indented characters from the default eight to four: Set tabstop=42 , copy the/etc/grub2.cfg configuration file to the/tmp directory, and use the Find and replace command to delete the beginning blank character in
CTRL + V into visual mode
Move the cursor up or down, Select the beginning of multiple lines
When you are finished, press the I key in the upper case, and you will be prompted to enter the "Insert" mode below , entering the annotation you want
Part I: General mode available button description, cursor movement, copy paste, search substitution, etc.
How to move the cursor
h or LEFT ARROW key (←)
The cursor moves one character to the left
J or
SECURECRT will send your original text intact to the server in the style of the string. So when the vim on your server is set to Autoindent, in I mode, it will then indent the strings that are transmitted by SECURECRT. If you copy text that already
/etc/vimrcRpm-qa|grep vim This command, how VIM has been properly installed, will display the names of the above three packagesInstall allYum-y Install vim*Control+p/control+n Code Auto-completionYum Install Automake1. Multi-line Comment: 1. First
Global substitutionFormat:":%s/to replace character/replace with new character/g":%s/old/new/gSpecify line substitutionFormat: ": Starting line, terminating line s/to replace character/replace with new character/g": 1,5 s/old/new/g
Multi-file
The following command is limited to Noramal mode: Enter normal mode (bee mode, because in some cases, only according to this bee to determine whether in normal mode) ': Go to mark, jump to mark , ' x moves the cursor to marker x ~: Case conversion,
Note: #表示数字, . Represents the current row, $ represents the last line, +# the down # line, and $-1 the penultimate lineSet line number last row mode set Nu/numberFirst, before opening the file[Email protected] tmp]# vim + inittabVim + filename Opens
Article reference: Http://vim.wikia.com/wiki/In_line_copy_and_paste_to_system_clipboard.Add the following to the. VIMRC under ~/."On Osxvmap y:call system (" Pbcopy ", Getreg (" \ ")) nmap : Call SetReg (" \ "", System (" Pbpaste ")) p' On Ubuntu '
Reprint Address: http://blog.51yip.com/linux/1140.htmlWhen I was in touch with Linux, I used the nano text editor, and personally felt that his greatest advantage was convenience and speed. Open files, modify files, to exit are very fast and simple.
Advanced some of the editor, will contain the macro function, Vim is certainly not missing, the use of macros in Vim is very convenient:: QX starts recording macro and registers the result in register XQ Exit Record mode@x playing macro commands
Tip28Use Line Numbers as an AddressIf we enter an Ex command consisting only of a number, then Vim would interpret that as an address and move our cursor to T He specified line.Specify a Range of Lines by Visual SelectionInstead of addressing a
vi/vim Find and replace using method VI/You can use the: s command to replace a string in 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
Sublime Text 31. Install Sublime Text 3Download Install: HTTP://WWW.SUBLIMETEXT.COM/3Package Control Installation:https://sublime.wbond.net/installation2. How to install plug-ins After installing in the 1th step, press Ctrl+shift+p, enter Insta in
Requirements Description1. If you change all Chinese names in English to "fan Jianqiang" to "Qiangjian fan"2. Turn all the "Change World,change mind! "Replace" change mind, change world! ”3. Swap the age column and ID column for the following sample
1. Download Ctags and unzip to any directory, such as D:/ctags(: http://sourceforge.net/projects/ctags/files/)2.cmd jump to the Include directory and execute the command d:/ctags/ctags-r--c++-kinds=+p--fields=+ias--extra=+q(You can also add d:/ctags
Although there are gvim, I still prefer the console (which can be understood as the blogger's paranoia has developed to a certain stage).Windows comes with a console that sucks, especially if the Win7 I'm using doesn't have full-screen functionality.
Common vi/vim commands
Vi/vim commands are complex and powerful. Here we will introduce some commonly used commands that can meet general needs.
Move the cursor:-Shift left: h-Move Down: j-Move up: k-Shift right: l-Flip: ctrl f, ctrl B
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