[Tutor] Enable Python feature in vim editor

Alex Kleider alexkleider at gmail.com
Sun Nov 28 21:10:46 EST 2021


Interesting (re python3 'in vim')
I'm running Debian (current stable release- #11 I believe it is, and
'my vim' (vi is installed by default but to get vim requires apt install
vim) seems to have it included...
(p10) alex at X1:~/Notes/Py$ vim --version | grep python
+comments          +libcall           -python            +visualextra
+conceal           +linebreak         +python3           +viminfo
.........


On Sun, Nov 28, 2021 at 3:25 PM Cameron Simpson <cs at cskk.id.au> wrote:

> On 24Nov2021 22:45, Kaushal Shriyan <kaushalshriyan at gmail.com> wrote:
> >I am running CentOS Linux release 7.9.2009 (Core) and have enabled
> >below
> >entry in .vimrc file
> >
> >$cat .vimrc
> >set shiftwidth=2
> >set shiftround
> >set tabstop=4
> >set softtabstop=4
> >set noexpandtab
> >set number
> >set ruler
> >set noautoindent
> >set nosmartindent
> >set noincsearch
> >syntax enable
> >$
> >
> >when i do vim testpythonscript.py I am facing the below Pymode error
> >
> >$vim testpythonscript.py
> >
> >[Pymode]: error: Pymode requires vim compiled with +python3 (exclusively).
> >Most of features will be disabled.
>
> This means that the vim you're invoking does not have the "python3"
> feature compiled into it. Indeed, in the `vim --version` output you
> include there is this:
>
>     $vim --version
>     VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Dec 15 2020 16:44:08)
>     Included patches: 1-207, 209-629
>     Modified by <bugzilla at redhat.com>
>     Compiled by <bugzilla at redhat.com>
>     Huge version without GUI.  Features included (+) or not (-):
>     [...]
>     +cryptv          +linebreak       +python/dyn      +viminfo
>     +cscope          +lispindent      -python3         +vreplace
>     [...]
>
> So you can see that "python3" has been omitted from that build.
>
> Do a "yum search vim" and see if there is a vim variant with "python3"
> included (I haven't got a Centos host available to me). You could try
> replacing the installed vim with the python3 enabled vim if that is
> available.
>
> Cheers,
> Cameron Simpson <cs at cskk.id.au>
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> https://mail.python.org/mailman/listinfo/tutor
>


More information about the Tutor mailing list