-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.

4 Answers
4

The .vimrc is just a Vimscript file like any other. You can source it via

$ vim --cmd "source path/to/user.vimrc" *file-to-edit*

With this, it will come first. There's also the -S {file} command-line argument, which would source it at the end (which makes this unsuitable for plugin initializations, but would work if you just have some mappings and settings).

Your user.vimrc may have options to reset the existing color scheme or the user.vimrc colorscheme is based on a colorscheme which may not be existing in that system. You could share your user.vimrc for others to check.

Look for keywords like NONE, reset and clear in the user.vimrc and make sure that they are not turning off the entire colorscheme.