The gvim settings are all messed up after upgrading to Ubuntu 11.04

gvimubuntu 11.04

my gvim settings are all messed up after upgrading to 11.04. When I try to launch gvim I get errors like:

Error detected while processing /home/laptop/.vimrc:
line    1:
E185: Cannot find color scheme railscasts
line   30:
E518: Unknown option: 0{,0},

all my color scheme's and plugins reside under


I think before 11.04 my .vimrc was not in /home/laptop/.vimrc

what can I do to fix the issue with .vimrc so that it loads and picks up everything from my .vimrc. This .vimrc is same as before but I think just the location got changed or something. I feel crippled without gvim and can't get any work done.

Best Answer

First off, your .vimrc file should be in the $HOME directory of whatever user you log in as. Apparently you are now logging in as user 'laptop'. Only you know what user name you used before. Decide which user name you're going to use and put your .vimrc in /home/<user>/.vimrc, where you should replace <user> by your chosen user name.

Next, the reason you lost your customizations is that you apparently put them in /usr/share/vim/vim72. Never do that. Always put your customizations either in /usr/share/vim/vimfiles if they are to be shared among all users on your system or in $HOME/.vim if they are to be used by only you.

One reason for not putting your customizations in /usr/share/vim/vim72 is that any files you change may be overwritten when you update to a new release in the Vim 7.2 series. Another reason is the one you are probably experiencing now. The current version of Vim is 7.3, so your Ubuntu 11.04 upgrade probably installed Vim's runtime files into /usr/share/vim/vim73 and your new version of Vim is looking there, not in /usr/share/vim/vim72.

If you know the names of the files you installed into /usr/share/vim/vim72, simply move them into /usr/share/vim/vimfiles or $HOME/.vim. That should fix your colorscheme problem.

I don't know what might be causing the "unknown option" error. What does line 30 of your .vimrc contain?

Related Question