LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Install two versions of VIM (https://www.linuxquestions.org/questions/linux-software-2/install-two-versions-of-vim-815819/)

deibertine 06-23-2010 12:09 AM

Install two versions of VIM
 
Is it possible to install two versions of vim (6.3 and 7.2)?

Currently have 6.3 installed and was wondering if I can install 7.2 on a diff directory...

I have CentOS 4.8

Please advise.

barunparichha 06-23-2010 05:37 AM

yes, you can have two versions of vim.

download vim source tar for version 1 and while compiling use "./configure --prefix=/home/vim1". So now your first version after being comiled would be in /home/vim1.

Similarly while compiling version 2 use "./configure --prefix=/home/vim2". So after sucessful compilation and build, version 2 would be in /home/vim2.

export your PATH variable to either /home/vim1 or /home/vim2 asper your requirement.

----
But I dont know why you need multiple version of vim at the same time.

deibertine 06-24-2010 10:20 AM

Quote:

Originally Posted by barunparichha (Post 4012475)
yes, you can have two versions of vim.

download vim source tar for version 1 and while compiling use "./configure --prefix=/home/vim1". So now your first version after being comiled would be in /home/vim1.

Similarly while compiling version 2 use "./configure --prefix=/home/vim2". So after sucessful compilation and build, version 2 would be in /home/vim2.

export your PATH variable to either /home/vim1 or /home/vim2 asper your requirement.

----
But I dont know why you need multiple version of vim at the same time.

Thanks for this post, really appreciate it!
One thing I have a question on is when you said "export your PATH variable to either /home/vim1 or /home/vim2 asper your requirement..."

Let's say I installed vim ver2 under /etc/vim72, do I export like this?
export PATH=$PATH:/etc/vim72
And when I launch:
$ vim
It will bring the vim version I want to launch?
I'd like vim 7.2 to launch everytime I do vim.
Cheers.
DB

jefro 06-24-2010 03:53 PM

I'd make an alias I think unless I misunderstand your question.

deibertine 06-24-2010 04:03 PM

Quote:

Originally Posted by jefro (Post 4013998)
I'd make an alias I think unless I misunderstand your question.

So where do i set the alias to point to which path?

deibertine 06-28-2010 01:55 PM

Quote:

Originally Posted by barunparichha (Post 4012475)
yes, you can have two versions of vim.

download vim source tar for version 1 and while compiling use "./configure --prefix=/home/vim1". So now your first version after being comiled would be in /home/vim1.

Similarly while compiling version 2 use "./configure --prefix=/home/vim2". So after sucessful compilation and build, version 2 would be in /home/vim2.

export your PATH variable to either /home/vim1 or /home/vim2 asper your requirement.

----
But I dont know why you need multiple version of vim at the same time.

So I got that prefix .configure install in but when I make the package, it gives me this:

/usr/bin/ld: skipping incompatible /usr/X11R6/lib/libXm.so when searching for -lXm
/usr/bin/ld: skipping incompatible /usr/X11R6/lib/libXm.a when searching for -lXm
/usr/bin/ld: skipping incompatible /usr/X11R6/lib/libXm.so when searching for -lXm
/usr/bin/ld: skipping incompatible /usr/X11R6/lib/libXm.a when searching for -lXm
/usr/bin/ld: cannot find -lXm
collect2: ld returned 1 exit status
make[1]: *** [vim] Error 1
make[1]: Leaving directory `/downloads/vim72/vim72/src'
make: *** [first] Error 2


All times are GMT -5. The time now is 03:25 AM.