Global find substitution:%s/stext/rtext/gLike what::%s/text/txt/g is to replace all the text into txt. How does vim collectively indent a piece of code or vice versa?
Very simple, by V into the visual mode, select the code to indent, press > Indent
Vim skills of the four modes _ ordinary mode to see the ordinary mode of not loving ordinary mode below the tough operation what is the operator what is the action command misoperation How to do that operation more cost-effective ordinary mode of
First, vim command:1. Label command: Tabe fn Edit the file fn in a new tab pageGT Switch to next tab pageGT Switch to previous tab page: TABR Switch to First label page: tabl switch to the Last tab page: TABM [n] Moves the current tab to the Nth
The fourth lesson basic copy, paste operation
Cut and paste
When a piece of text is deleted with command D or x, the deleted text is automatically saved to a special clipboard by VIM. You can then use the P command (put) to paste it behind the
1. Set the line numberVIM Displays the line number when it is opened by default, so that you can display the line number manually in command mode without having to edit it each time.To create a configuration file for a. vimrc.When Vim is started,
By default, Vim uses a built-in register instead of an X Window's clipboard
Enable system Clipboard SupportYou can use vim --version | grep clipboard the view, if the Clipboard is displayed before the tag, - but not + the marker, indicating that
Key operation:Note: Ctrl + V enters column edit mode, moves the cursor down or up, marks the beginning of the line that needs comment, then presses the uppercase I, then inserts the comment, such as "#", and then presses ESC, which is all
1. Open multiple WindowsThe commands for opening several windows are the following:Horizontal cutting window: new+ window name (file name after saving): split+ window name, can also be abbreviated as: sp+ window namePortrait cutting window Name:
Original Blog Address: https://www.cnblogs.com/BaiYiShaoNian/p/4831022.htmlShell Common Commands Summary:1. ls command: List filesLs-a list all files and folders in the current directoryLS A * lists all files starting with the A letter in the
Then the previous article continues to explain some simple text editing commands in the VI editor. This article is mainly the deletion of text, copying, moving and other commands.Delete text:As mentioned in the previous article, the Delete command ("
I am open virtual machine under Ubuntu, installed dual system and unloading, Ubuntu default is not included editor vim and compiler GCC. If you are a newly installed Ubuntu computer, we will implement our first program in the future.1. Preparatory
The followingArticleThe use of the vim editor is summarized and comprehensive.Vim Study Notes
1. Display row number informationInstant commands: Set nuPermanent commandEcho "Set Nu"> ~ /. Vimrc
2. Two documents for one window operation: SP
Problem scenario: When using vim, we occasionally encounter the inexplicable freezing of vim. Nothing is input on the interface. Even Ctrl + C and CTRL + d do not respond. Solution: After investigation, CTRL + S is the shortcut key for locking the
If the current locale is UTF-8, use Vim to open a gb2312 encoded file, which is garbled. Open it with gedit, but it is displayed normally. Isn't Vim as good as gedit? The small issue of recognition encoding should be a piece of cake for vim. The
With VIM + cssag/ctags, You can implement the source insight function and conveniently view the source code for analysis.Key words: vim, cssag, ctags, tags 1. check whether Vim supports cscope $ Vim -- version | grep cs1_2. compile Vim (--
Vim configuration file location:/Etc/Vim/vimrc ~ /. Vimrc
Steps for creating an ide
, Ta, NN Testing
Use large ide
, Da generation documentation description, DD generation function description
, JD jump function, O closes other windows, BF
C compilation process
Step 1: Use VI to compile the. C code file
Step 2: gcc-G. C-o. Debug
Step 3 GDB
Step 4 file. Debug
List
Start debugging
Or GCC. C directly generates an executable file named A. Out.
./A. Out.
Run the VI command (for details
Reprinted from http://edyfox.codecarver.org/html/vim_fileencodings_detection.html
In vim, there are four encoding-related options: fileencodings, fileencoding, encoding, and termencoding. In actual use, any option error may cause garbled characters.
Original article: http://hi.baidu.com/flost_li/blog/item/acbccd2355952d47935807d0.html
Usage:
1: Use vim-D file1 file2 to directly open two files for comparisonOr: Use Vim file1 to open the first file, and then use vert diffsplit file2 to open the
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.