[VIM] vim usage tips and vim usage tips
This series is the Reading Notes and summary of Practical Vim, which mainly includes the following aspects:
1. How VIM solves the problem -- Constructing repeated modifications
1.1 Basic operation unit-character, word, row, paragraph
1.2. Repeated
2. VIM mode 2.1 Normal Mode
2.2 Insert Mode
2.3 visual mode
2.4 Command Line Mode
3. Mobile, faster, more powerful, 3.1 basic mobile
3.2 line jump, search jump, matching jump (%) (ctags Function Definition jump)
3.3 word-based movement
3.4 inter-file redirection (see vim File Management)
4. VIM file management 4.1 buffer list
4.2 window Cutting
4.3 netrw File Management
4.4 inter-file redirection
4.5 VIM to the background
5. VIM register 6. perform operations anytime, anywhere
6.1 auto-increment and auto-Increment
6.2 arithmetic operations
7. search and replace
7.1 search
7.2 replace
8. vimrc9. other common skills
For linux beginners, vim is not very easy to use. You can give some common operation methods to introduce the advantages of vim, or recommend other useful editors.
Vim is extended from vi. It includes all vi usage and adds many new usages. For example, it displays different colors for comments and parameters, and can also be used in other cases. there are a lot of sp or block selection, etc, I suggest you learn vi first. The reason is simple. vi is supported in all nuix and linux versions without installation.
In addition to vi and vim, there are also Emacs, KVIM, Arachnophilia, Bluefish, Komodo Edit, NEdit, Gedit, Kate, and Quanta Plus editors, which can be selected based on your preferences.
We will use all of VIM's to check them out.
Use vim with the-B parameter to open the binary file to be edited. For example:
Vim-B./a. out
Then, run the following command in command line mode to switch to the binary editor mode:
: %! Xxd
Then you can edit and modify the file. After the modification is complete, run the following command in command mode to exit the binary editor mode:
: %! Xxd-r
Finally, run the following command to save and exit:
: Wq