-2

These the output of the commands to check which version of Vim I am using on Devain Jessie and Debian Sid

I have checked my systems -

Output of debian jessie

:python import sys; print(sys.version)

2.7.9 (default, Jun 29 2016, 13:11:10)
[GCC 4.9.2]

   VIM - Vi IMproved    

    version 7.4.576     
by Bram Moolenaar et al.

apt-cache policy vim

vim:                                                                      
  Installed: 2:7.4.488-7+deb8u2                                           
  Candidate: 2:7.4.488-7+deb8u2                                           
  Version table:                                                          
 *** 2:7.4.488-7+deb8u2 0                                                 
        500 http://security.debian.org/ jessie/updates/main amd64 Packages
        100 /var/lib/dpkg/status                                          
     2:7.4.488-7+deb8u1 0                                                 
        500 http://ftp.uni-erlangen.de/debian/ jessie/main amd64 Packages 

Output of debian sid

:python import sys; print(sys.version)

E319: Sorry, the command is not available in this version

apt-cache policy vim

vim:
  Installed: 2:8.0.0197-3
  Candidate: 2:8.0.0197-4
  Version table:
     2:8.0.0197-4 500
        500 http://ftp.uni-erlangen.de/debian unstable/main amd64 Packages
 *** 2:8.0.0197-3 100
        100 /var/lib/dpkg/status

start up screen

VIM - Vi IMproved   

 version 8.0.378    
by Bram Moolenaar et al.

Why does the apt-cache policy output usually different from the version reported by Vim?

Is there a version Vim already built into Vim 8, or does it require an additional build with python?

  • why the downvotes? – vfclists Jun 10 '17 at 13:34
3

As described in /usr/share/doc/vim/NEWS.Debian.gz, the Debian packages have switched to building against Python3 for Stretch. If you upgraded a system to Stretch and didn't see this message, then I highly recommend installing the apt-listchanges package, so you are informed of important changes like this in the future.

If you notice, when you ran :python it said E319: Sorry, the command is not available in this version.

Your command would need to change to

:python3 import sys; print(sys.version)

Also, the vim package itself doesn't have any of the language bindings enabled. You need either vim-nox or one of the packages providing gvim.

As far as why :intro shows a larger version than the package version, I had backported some upstream patches to fix various bugs before Jessie was released. You'll see these if you run :version. The version reported by :intro is just the highest patch number that's been included.

  • I asked this question in another forum because installing all of YouCompleteMe was causing vim to start slowly. It starts quickly now after installing vim-nox. Does installing vim-nox require YouCompleteMe to be recompiled or should it work transparently? – vfclists May 5 '17 at 5:10
  • After applying installing vim-nox running :python3 import sys; print(sys.version) results in 3.5.3 (default, Jan 19 2017, 14:11:04) [GCC 6.3.0 20170118] – vfclists May 5 '17 at 5:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.