vim-config

This article belongs to the third part of the vim series:

1 vim basics

Basic operation of vim

https://blog.csdn.net/u012906122/article/details/103662316

2 Advanced use of vi/vim

Advanced vim, plug-in configuration

https://blog.csdn.net/u012906122/article/details/111460432

3 vim-config

Software package written according to [vi/vim use advanced]

https://blog.csdn.net/u012906122/article/details/111460468

 
 
Vim is an editing tool in the linux system. A good configuration of vim can greatly improve our work efficiency. When using vim we often need their own configuration vimrc, install plug-ins required. This series of configuration is relatively cumbersome, and many people are daunted, so they gradually give up vim. I recently saw a blog about [vi/vim use advanced] blog, which is very convenient to use after learning. But the disadvantage is that there are many plug-ins and shortcut keys that are difficult to remember. Once the computer environment is changed, it needs to be reconfigured. To this end, I made the vim configuration in [vi/vim use advanced] into a software package (vim-config) hosted on Github. In different environments, you only need ./install.sh to configure vim with one click. At the same time, the shortcut key configuration of each chapter has been recorded in README.md, which is convenient for query and use.
 
vim-config:
 
Advanced use of vi/vim :
vim-config mainly refers to the following chapters of [vi/vim use advanced]:
3 * Advanced use of vi/vim: vimrc preliminary
4 * Advanced use of vi/vim: save project related configuration
5 * Advanced use of vi/vim: Use tag files
6 * Advanced use of vi/vim: use taglist plugin
7 * Advanced use of vi/vim: file browsing and buffer browsing
8 * Advanced use of vi/vim: lookupfile plugin
9 * Advanced use of vi/vim: Enable file type detection
10 * Advanced use of vi/vim: squandered flowers gradually become charming – syntax highlighting
11 * Advanced use of vi/vim: a tool for programmers – cscope
13 * Advanced use of vi/vim: smart completion
14 * Advanced use of vi/vim: automatic completion
15 * Advanced use of vi/vim: Refers to free movement, moving like flying (1)
 
vim-config instructions:
[1] Installation
./install.sh
 
[2] Uninstall
./uninstall.sh
 
[3] vimrc preliminary
,ee A new window opens~/.vimrc
.vimrc is configured to automatically reload once .vimrc is modified
 
[4] Save project related configuration
set path:
gf open the file to be searched
ctrl + ^ return
ctrl + w + f split the window horizontally to open the file to be searched
:find xxx Search xxx file under path
filereadable saves the vim configuration of the test project
 
[5] Use tag file
ctags -R *
vim -t test1 find test1 function
ctrl +] forward
ctrl + t back
 
[6] Use taglist plugin
Taglist window shortcut keys:
Enter Enter to jump to the position defined by the tag
o Display the function corresponding to the tag in a new window
Space displays the function prototype corresponding to the tag
s Change the sorting method
x taglist window zoom in and zoom out
 
[7] File browsing and winmanager
(1) File browsing
,fe file browsing
Shortcut keys for file browsing window:
Enter Enter key to enter, ctrl+^ to return
c switch the current directory of vim
d Create directory
D Delete directory or file
R rename a directory or file
(2)winmanager
,wm open/close winmanager window
ctrl + w + f to switch to the upper left window, then ctrl + n to switch between BufExplorer and FileExplorer
ctrl + w + b switch to the lower left window
ctrl + w + w switch window
 
[8] Lookupfile plug-in query
F5 Open/close the lookupfile window
Enter to open the first match
ctrl + n Select from the drop-down list
ctrl + p select upwards in the drop-down list
,lk Find files in the current directory (default)
,ll find files in the specified directory
 
[9] File type detection
ctrl + d auto indent
ctrl + t auto indent
 
[10] Syntax highlighting
,hl highlight the selected word
,hh Cancel the highlighted word
,hr highlight words matching regular expression
 
[11] cscope
,fs Find C language symbols, that is, find the place where function names, macros, enumeration values, etc. appear
,fg finds the location defined by functions, macros, enumerations, etc., similar to the functions provided by ctags
,fd Find the function called by this function
,fc Find the function that calls this function
,ft finds all occurrences of the specified string
,fp finds egrep mode, but the search speed is much faster and ft has duplicates
,ff Find and open the file, easy to open the header file
 
[13] Smart completion
C: ctrl + x, ctrl + o C currently needs ctrl+x, ctrl+o after entering "test"
C++: Automatic C++ input "Gass g;g." after automatic completion
 
[14] Auto completion
TAB TAB automatic completion
 
[15] Move
Move in the file gg, G, ctrl+g
Move to the specified character fx,Fx,3fx,tx,Tx,3tx
Relative cursor scrolling zt,zz,zb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Guess you like

Origin blog.csdn.net/u012906122/article/details/111460468