Set up vimrc

来源:互联网 发布:杨文理知乎 编辑:程序博客网 时间:2024/06/16 07:47

To support  listing functions in the vim, and cscope in vim, you need to install a optimized vimrc first

via:

https://github.com/amix/vimrc

git clone https://github.com/amix/vimrc.git ~/.vim_runtimesh ~/.vim_runtime/install_awesome_vimrc.sh

then you can put your vim file in ~/.vim/plugin and they will be automatically loaded, no?

Then you have to put

source ~/.vim/plugin/your_plugin.vim to export them.

here's my plugin:

 source ~/.vim/plugin/taglist.vim
source ~/.vim/plugin/cscope_maps.vim

And then you can use cscope find s and type :TlistOpen to view the function list now.

The function list plugin is at:

https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=2&cad=rja&uact=8&ved=0ahUKEwioytewiYzSAhWirVQKHShGDb8QFgghMAE&url=http%3A%2F%2Fwww.vim.org%2Fscript.php%3Fscript_id%3D273&usg=AFQjCNHdkb51TSwAlY6R0iaMxMc1dgQing&sig2=KPoONBOKZfO6O2AhUk2gZA&bvm=bv.146786187,d.cGc


Actually one of the most beautiful vim colorscheme is included in

https://github.com/amix/vimrc.git
which is located at:

.vim_runtime/sources_forked/peaksea/colors/peaksea.vim

you can copy it to ~/.vim/colors/ and add the following command to vimrc:

 set background=dark
 colorscheme peaksea
after you install the basic vimrc via sh install_basic_vimrc.sh

Or sometimes the plugin has many files besides a single vim file, say, the plugin is composed as

a git repo, you can add plugin  management plugin by using pathogen.vim

With the help of pathogen.vim, you can do it more easily:

https://github.com/tpope/vim-pathogen

Install to ~/.vim/autoload/pathogen.vim. Or copy and paste:

mkdir -p ~/.vim/autoload ~/.vim/bundle && \curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim

Add this to your vimrc:

execute pathogen#infect()

If you're brand new to Vim and lacking a vimrc, vim ~/.vimrc and pastein the following super-minimal example:

execute pathogen#infect()syntax onfiletype plugin indent on

Now any plugins you wish to install can be extracted to a subdirectoryunder ~/.vim/bundle, and they will be added to the 'runtimepath'.Observe:

cd ~/.vim/bundle && \git clone https://github.com/tpope/vim-sensible.git

0 0
原创粉丝点击