You are not logged in.

#1 2024-08-01 13:15:37

leonixyz
Member
Registered: 2014-07-12
Posts: 64

Does VIM support python or not?

The wiki states that VIM has python support.

The PKGBUILD also seem to list python in the makedepends

But then I do not understand why the feature is marked with the minus sign:

$ vim --version | grep python
+cmdline_hist      +langmap           -python            +viminfo

and also from the editor, by executing :python

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

So what am I missing?

Offline

#2 2024-08-01 13:21:34

astralc
Member
Registered: 2022-09-17
Posts: 127

Re: Does VIM support python or not?

the python vim command is python 2, you need to use python3 command (also, you clearly not pasted the full output of vim --version | grep python)

Offline

#3 2024-08-01 17:14:12

BluePyTheDeer_
Member
Registered: 2024-05-23
Posts: 117

Re: Does VIM support python or not?

In my knowledge, every single regularly maintained text editor supports Python


I messed my Arch Linux installation, then fixed it smile
"Sometimes the best complexity is simplicity." - BluePy, 1856.

Offline

#4 2024-08-01 17:45:50

hypnotics
Member
Registered: 2024-08-01
Posts: 3

Re: Does VIM support python or not?

What are you trying to do with the command :python?
If you're trying to launch an instance of the python interpreter, use the command :!python
If you want to run the project within vim use the command :!python ./path-to-python-command
Also vim --version, only displays information about your vim instance and not the supported languages , vim supports syntax highlighting for all of these languages.
You can also invoke any shell command with the ! syntax, so :!foo would run the shell command foo.

Offline

#5 2024-08-01 20:23:13

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,835

Re: Does VIM support python or not?

plugin support, try

:python3  print('Hello, world!')

Offline

Board footer

Powered by FluxBB