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
1. Edit File/USR/SHARE/VIM/VIMRCsudo vi/usr/share/vim/vimrc2, insert the following line under set backspace=2Set AI "Auto Indentingset ruler" show the cursor positionset hlsearch "Highli ght the last searched Termset history=1000 "Keep + lines of
The shortcut keys I use Command mode : Wq or ZZ Save file and exit : Q Do not save file exit : Set Nu Sets line number :/Down Find :? Look up :%s/old/new/g replaces all old characters in text : N1,n2 s/s1/s2/g The S1 character from the N1 to the N2
Vim: Full screen editor, modal editor
Vim mode: Edit mode (Command mode) input mode last line mode
Mode conversion:
Edit-Input: I is converted to input mode before the character of the current cursor. A is converted to input mode after the
Plugin 8th:tpope/vim-commentaryHelp me comment A code, I tested IT support C++,vim. So it would support a lot of Lang.How to use:Use gcc to comment out a line (takes a count),GC to comment out the target of a motion (for example, GCap-comment out
Vim is divided into three modes, normal,insert,visual.Switch between modes:Esc:insert cut to normalShortcut key switching:I: Insert character before cursorI: Insert character at the beginning of the current lineO: Automatically insert a row on the
The repetition of VIM techniques
Type of vim repetition
Duplicate text changes
In-line Find duplicates
Full-text lookup duplicates
Text repeat substitution
Duplicate macro Recording
The repetition of VIM techniquesWhen
For a new vim like me, the first thing that bothers me most is how I can't get out of vim. It is said: Q or: q! or: QW can quit, but how to not go out. Then I found a word:Recording. Actually this is entered into the record key state. You enter this
s) The movement of the cursorH Cursor moves to the beginning of the top line of the screenM Cursor moves to the beginning of the middle line of the screenL Cursor moves to the end of the last line of the screen0 cursor moves to the beginning of the
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 '
http://blog.csdn.net/sharp_allen/article/details/27075133 ReprintSaid so much, in fact, there is less than a word, notepad-like editor, in each operating system has an editor, in Linux, such as Gedit Editor, very convenient. You can open this editor
Simple and practical, not much, no perfection.Open multiple files at the same time vim file1 file2 file3In the same window, switch between different files: bn-to-next file: BP--and previous fileSeparates the current window horizontally:
"Introduction to Plugins"Supertab enables the tab shortcut key to have a quicker contextual hint function. An auto-complete plugin"Plug-in Installation"(1) Installing with bundlesAdd the following command in the ~/.VIMRC' Supertab 'Then the command
I posted my use of vim configuration and plug-in configuration, these things can only be a script stack, no discussion of efficient code reading development.Let's write the frequently used commands, and start with the Configure F-Series shortcut
Vim Installation PluginRelease data:2015.03.28Transferred from: VimchinaThe functionality of VIM itself is already very powerful, usually without the need to install additional plugins. Carefully study Vim's own functions and corresponding
this morning, To see the Great God programming with Vim, The screen is intuitive, very fast, the operation only needs to be implemented with the command symbol. So it can be inferred that the command of Vim is complex, then the learning process
The Vim plugin is a. Vim script file that defines functions, mappings, grammar rules, and commands that can be used to manipulate windows, buffers, and rows. Typically a plug-in contains command definitions and event hooks. When using Python to
Vim learning notes, vim1. Double-click the letter d and delete the row where the cursor is located.2. vim + filename open the file and locate the cursor at the beginning of the last lineVim + n filename cursor positioned on line nVim +/xxx filename:
Vim (multiline comment and delete multiline comment ).--- All in ESC mode:1. Comments in multiple lines in vim.(1) press Ctrl + v to enter the column mode;(2) select to end at the specified position at the beginning of the line to be commented. (Use
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.