I recently took the time to modify the vimrc configuration, and found that my previous configuration of vim was too rough, and I regretted it (because the process of modifying vimrc was very painful)
I initially divided them into this:
.vimrc contains the main basic configuration
.vimrc.bundles put plug-ins
.vimrc.funcsPut some functions
Use source
to connect between each file
In order to prevent the nightmare of post-maintenance from happening now, I think there must be a better practice. What is it?
Refers to the directory structure of spf-vim, which has certain reference significance. However, due to its "community-driven" nature, it has this consideration and may not necessarily be suitable for me (the maintainer is me, the user is me, Quite personalized)
It is difficult to reach a conclusion on this issue. VIM itself supports many different configuration file organization methods. Everyone has different needs, so the required methods are also different. You can search for VIM or vimrc on github, then sort by stars, look at the file organization methods of the top-ranked repos, and then summarize the method that suits you.
A few general suggestions:
Each configuration file is divided into certain logical blocks, and comments and brackets for folding are added between each logical block
autocmd Remember to group, remember to clear each group before adding it
Decide the complexity of how the configuration files are organized based on your needs, don’t spend all your time on configuration
Learn to copy configurations from various channels and then change them to a form that suits you
You will regret dividing so many files. Unless you learn from a master and use git to post your configuration on the Internet, it is much easier to just use a file.
I don’t have a computer around me, so I can take screenshots of the configuration on the VPS on my mobile phone