It is difficult to write without reference, unless you have used vim for a long time and have a good understanding of various parameters. But it’s not difficult to copy here and there to make up your own.
In addition to spf-13, I recommend terryma’s vimrc. The former is a very good and easy-to-use vimrc template, with clear structure, rich documentation, and the ability to customize. The latter vimrc is a single file (the vimrc of many experts such as Shougo is divided into many files, which is convenient for organization but difficult for novices to read and easy to find the clue), and the map part is arranged by key position, which is very Being creative, memorizing key positions is very important for novices. However, when terryma updated vimrc several times recently, the comments in it were out of date and did not correspond to the content. You can look at previous commits.
In short, the most important thing to refer to vimrc is that it is best for experts to write comments and check various set有解释到底是做什么。或者至少手头备一份vim的mancomparisons.
Let’s briefly talk about a few key points of writing vimrc:
Choose a plugin manager (Vundle, NeoBundle, vim-plug)
Choose some plug-ins (syntax highlighting, color matching, interface enhancement, editing function enhancement, more is not better, nor is more powerful better. For example, unite is very powerful, but it is difficult to play without certain experience)
Setting parameters (This is the most difficult part for novices. There are many default settings of vim that are not suitable for practical applications. Which ones need to be modified and how to modify them to suit my habits. I need to read more and try more. tpope master's vim-sensible is related to this)
Set key mapping (it is a personal habit, but it must be done step by step. When referring to the vimrc of experts, it is easy to think that this map is convenient and that map is also convenient, and set a bunch of them. But I haven’t remembered the default keys of vim clearly yet, so It’s easy to get confused)
Starting from scratch, you need a lot of time to read the documentation. I have written a series here and recommend you to read the philosophy of Vim. The third article talks about basic configuration, which can be used as a starting point: /a/1190000000446738
It is difficult to write without reference, unless you have used vim for a long time and have a good understanding of various parameters. But it’s not difficult to copy here and there to make up your own.
In addition to spf-13, I recommend terryma’s vimrc. The former is a very good and easy-to-use vimrc template, with clear structure, rich documentation, and the ability to customize. The latter vimrc is a single file (the vimrc of many experts such as Shougo is divided into many files, which is convenient for organization but difficult for novices to read and easy to find the clue), and the
map
part is arranged by key position, which is very Being creative, memorizing key positions is very important for novices. However, when terryma updated vimrc several times recently, the comments in it were out of date and did not correspond to the content. You can look at previous commits.In short, the most important thing to refer to vimrc is that it is best for experts to write comments and check various
set
有解释到底是做什么。或者至少手头备一份vim的man
comparisons.Let’s briefly talk about a few key points of writing vimrc:
unite
is very powerful, but it is difficult to play without certain experience)Starting from scratch, you need a lot of time to read the documentation. I have written a series here and recommend you to read the philosophy of Vim. The third article talks about basic configuration, which can be used as a starting point: /a/1190000000446738
Ask yourself "What do I want to do"
Check the document "How to do it"
Just do it!!