jeudi 15 janvier 2015

vim edit a file with a user-vimrc but still load all previous initializations


Checking the man page for vim says it's -u switch that lets me choose a different vimrc file



-u {vimrc} Use the commands in the file {vimrc} for initializations. All the other initializations
are skipped. Use this to edit a special kind of files. It can also be used to skip all
initializations by giving the name "NONE". See ":help initialization" within vim for more
details.


But, i would like to retain the default configurations and just add few more setting from my user-vimrc file. Command i use is


$ vim -u user.vimrc *file-to-edit*


Any way to achieve this?


To be more specific of what I am losing with current behaviour:


Without my vimrc, I get a default colorscheme and when i give my user.vimrc, the colorscheme is being switched off. I am not able to track how to set the colorscheme which is given by default. There is no default .vimrc.


Note: I am on a shared env, so i don't want to create a .vimrc. I will just source my vimrc which will be available only for me.



Aucun commentaire:

Enregistrer un commentaire