gvim - vim upgrade problem
给我你的怀抱
给我你的怀抱 2017-05-16 16:41:10
0
4
678

To follow the youcompleteme plug-in, you need vim7.3.584 version support, and my gvim version is 7.3.547
When upgrading, I referred to this tutorial: http://www.cnblogs.com/scue/p/3234102.html

sudo apt-get install -y hgsvn libncurses5-dev libgnome2-dev libgnomeui-dev libgtk2.0-dev libatk1.0-dev libbonoboui2-dev libcairo2-dev libx11-dev libxpm-dev libxt-dev python-dev ruby-dev mercurial cscope exuberant-ctagssudo apt-get remove vim vim-runtime gvim #这一步可以不做 cd ~ hg clone https://code.google.com/p/vim/ cd vim ./configure --with-features=huge \ --enable-rubyinterp \ --enable-pythoninterp \ --enable-perlinterp \ --enable-gui=gtk2 --enable-cscope --prefix=/usr make VIMRUNTIMEDIR=/usr/share/vim/vim73 sudo make install sudo update-alternatives --install /usr/bin/editor editor /usr/bin/vim 1 sudo update-alternatives --set editor /usr/bin/vim sudo update-alternatives --install /usr/bin/vi vi /usr/bin/vim 1 sudo update-alternatives --set vi /usr/bin/vim

But after the upgrade, the version of gvim is still 7.3.547, and the version of vim is 7.4.265
I want to use youcompleteme plugin in gvim, not in vim.


The problem has been solved by itself. Please click on the solution:



Install the needed dependencies: $ sudo apt-get install ncurses-dev build-essential mercurial Clone the sources of Vim 7.4: $ hg clone https://vim.googlecode.com/hg/ vim Build Vim from sources: $ cd vim/src $ make distclean $ ./configure --with-features=huge --enable-pythoninterp --enable-rubyinterp $ make $ sudo make install Adjust the PATH: $ export PATH=/usr/local/bin:$PATH

Now the gvim version is the same version as vim.
But it’s not very clear. Are the above commands mainly used to modify the configuration information of gvim so that vim can be called directly?

给我你的怀抱
给我你的怀抱

reply all (4)
phpcn_u1582

But it’s not very clear. Are the above commands mainly used to modify the configuration information of gvim so that vim can be called directly?

No. What you did was recompile vim. In this way, gvim and vim are of course the same version

    过去多啦不再A梦

    Well, I think so. The source code of vim itself has support for gui, so when you execute it

    $ ./configure --with-features=huge --enable-pythoninterp --enable-rubyinterp

    This command has already been compiled into vim with gui support, and then the next step

    $ export PATH=/usr/local/bin:$PATH

    The function of this line is just to add the default installation location (path under /usr/local) before the $PATH variable, so that the newly installed vim will be searched before the vim installed in /usr by the package management, so that you Both vim and gvim are compiled and installed from the same source code, so of course they are the same version~
    You canwhich vim还有which gvimtake a look at where they are and what files they are, maybe this will give you a clearer idea of what happened in the above operations~

      阿神

      In the first half, you only updated vim, not gvim. Of course, gvim is still old:

      >>> ll /usr/bin/gvim lrwxrwxrwx 1 root root 22 3月 1 21:39 gvim -> /etc/alternatives/gvim >>> ll /etc/alternatives/gvim lrwxrwxrwx 1 root root 16 3月 1 21:39 /etc/alternatives/gvim -> /usr/bin/vim.gtk

      This part is managed by the system.

      It stands to reason that themake install之后,gvim会链接到vim的,可能是你的update-alternativescommand updates it.

      In the second half, you (as normal) installed vim (and gvim link) under/usr/local. This is the user/system administrator's place. The system package manager will not interfere, so it will be installed normally. (So I don’t know where you learned the messy installation method above.)

        世界只因有你

        It should be because the path has been modified. If you use which vim to look at it, you will know the path of the vim executable file called,

          Latest Downloads
          More>
          Web Effects
          Website Source Code
          Website Materials
          Front End Template
          About us Disclaimer Sitemap
          php.cn:Public welfare online PHP training,Help PHP learners grow quickly!