LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Getting VIm back to the way it was after a fresh install (http://www.linuxquestions.org/questions/linux-newbie-8/getting-vim-back-to-the-way-it-was-after-a-fresh-install-934298/)

JohanB 03-13-2012 06:50 PM

Getting VIm back to the way it was after a fresh install
 
Hi all!

I'm afraid I've messed my VIm installation on Ubuntu 11.10 up pretty badly. I've tried to uninstall and purge VIM, gVIM and then to reinstall them, but this did not have the desired effect. I have also tried to re-install vim-runtime, but also without success. (Tab completion of filenames used to work in gVIM, but no longer does. There was also a vim-current [I think] directory in /usr/share/vim, which is no longer there.)

Is there any way I can get the VIm setup on my computer exactly the way it would have been after a fresh install?

Your help is much appreciated!

Tinkster 03-13-2012 07:31 PM

The big question will be whether or not you made changes to ~/.vim*

If it's a user-setting reinstalling, purging, etc won't make a bit of
a difference to vim.


Cheers,
Tink

JohanB 03-13-2012 08:16 PM

Quote:

Originally Posted by Tinkster (Post 4626129)
The big question will be whether or not you made changes to ~/.vim*

If it's a user-setting reinstalling, purging, etc won't make a bit of
a difference to vim.


Cheers,
Tink

Hi Tink,
Ubuntu stores vim settings in /usr/share/vim. I was carefull to make backups of this. Are you saying I should be able to copy this back from where it came, and everything should be fine?
It's been a long night, I'll try that tomorrow night and give feedback.
Regards,
JB

chrism01 03-13-2012 08:25 PM

Actually he's referring to
Code:

~/.vim*
which refers to your home dir ('~') and hidden files (those begin with '.')
Use
Code:

ls -a
a = all to see them.
Your personal settings (as opposed to global defaults which is what you talk about) are typically stored in a file called
Code:

.vimrc
in your home dir.

HTH
http://www.vim.org/

Tinkster 03-13-2012 09:36 PM

Thx chrism01 ;}



Cheers,
Tink

chrism01 03-13-2012 09:40 PM

no worries ;)

JohanB 03-14-2012 02:43 AM

Quote:

Originally Posted by chrism01 (Post 4626159)
Actually he's referring to
Code:

~/.vim*
which refers to your home dir ('~') and hidden files (those begin with '.')
Use
Code:

ls -a
a = all to see them.
Your personal settings (as opposed to global defaults which is what you talk about) are typically stored in a file called
Code:

.vimrc
in your home dir.

HTH
http://www.vim.org/

My apologies for the misunderstanding - I should have had some sleep before I replied. I think I may still have the file, but I'll make sure tonight.
Would it be at all possible to use something like http://www.ubuntuupdates.org/package.../main/base/vim to get everything back to a clean slate? I downloaded the deb packages yesterday evening, but I could not open it with the Ubuntu Software Manager.

Thanks for all the help!
Regards,
JB

Tinkster 03-14-2012 02:03 PM

Quote:

Originally Posted by JohanB (Post 4626339)
My apologies for the misunderstanding - I should have had some sleep before I replied. I think I may still have the file, but I'll make sure tonight.
Would it be at all possible to use something like http://www.ubuntuupdates.org/package.../main/base/vim to get everything back to a clean slate? I downloaded the deb packages yesterday evening, but I could not open it with the Ubuntu Software Manager.

Thanks for all the help!
Regards,
JB

Not if you modified your private vim setup in your home.

theNbomr 03-14-2012 05:30 PM

vim gets used by all users on the system, but each user has his personal settings in the .vimrc in each $HOME directory. If you have that file, try renaming it, or deleting it. In the absence of any such file, the default vim behavior will occur.
--- rod.

JohanB 03-17-2012 09:11 AM

Thanks for all the replies, guys.
I installed a couple of packages, as detailed in the link below, and everything seems to be working as expected, more or less.

I'm going to spend some time figuring out how to put my vim config in github, and begin using pathogen, to avoid this situation.

http://askubuntu.com/questions/4672/...ck#answer-5789


All times are GMT -5. The time now is 06:51 AM.