As a long-time fan of
linuxandvim, I feel like I’m being melted by the spirit of sharing. My.vimfolder used to be a mess. When I first metvundle, I was resistant: I had worked so hard to getyou-complete-meconfigured and didn’t want to lose my hard-won plugins to a package manager. But the appeal of linux is never chaos — it is clarity and order. I spent one morning wiring my.vimdirectory up withvundlepackage management. It really is a sexy tool: basically one command getsvimfully configured.
GITHUB
For the detailed configuration see corvofeng/MyVimConfig
The .vim directory structure
1 | . |
usage
I suggest symlinking specific files to your home directory, so editing one file stays in sync.
- First add
.vimrcand friends:
1 | ln -s ~/.vimrc ~/.vim/vimrc |
- Open
vim, enter command mode, and typeBundleInstallto install everything automatically. I assume you already have basicvimskills.
vundlerc
See the
vundlercfile. It is inevitably a bit messy — please bear with me. Many plugins I’ve only installed; I haven’t really used them deeply yet.
vimrc
Most lines in vimrc have comments; I’ll only paste the key
DIYparts. I hope you get something out of it and can customize your own config — what suits you is the best.
1 | source ~/.vim/vundlerc " first line of vim: read vundlerc |
gvimrc
My
gvimconfig defines some other options; many already have comments, so I won’t paste them all.
1 | set foldenable " folding in gvim |
Vim In Windows
Since I always work on Linux, Windows support may need improvement. For now I’ve kept a copy
of the Windows software set:
Install and copy the config file, and it’s ready to use.
Do Not Give Up
When I was a
linuxbeginner, learningvimwas hard. Never leaving the keyboard sounds cool, but it’s really hard to get used to at first. My learning method was: once you knowhjkl, start playing a game. My game was2048, found onchrome, combined withVimium, forcing myself to operate withhjkl. After about an hour of practice, I had basically learnedvimmovement.Low efficiency at the start is normal. But after using it more, the efficiency really is unmatched by other editors. This is not to say
vimis a god — many modernIDEs providevimplugins. TheJetBrainsandEclipseplugins, for example, are excellent and almost seamless. Once you really mastervim, you can be highly efficient in different development environments. I barely know theJetBrainsandEclipseshortcuts, yet I can move the cursor without a mouse.
The principle of much software is to be powerful rather than easy to use. If you want to work more efficiently, spending some time on editor configuration is never a bad thing.
LICENSE:
Copyright © 2016 corvo. Commercial use without permission is prohibited. Please credit the source when reposting.