FS#66202 - [gvim] Python support exists... except for python files!

Attached to Project: Arch Linux
Opened by Óscar Pereira (gauthma) - Friday, 10 April 2020, 12:19 GMT
Last edited by Levente Polyak (anthraxx) - Monday, 26 April 2021, 21:36 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Levente Polyak (anthraxx)
Architecture x86_64
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description: Python support exists in gvim, for all (as far as I can tell) files, *except* python files. See the steps to reproduce below.


Additional info:
* does NOT affect vim-runtime-8.1.2102-1 and/or gvim-8.1.2102-1 (29 September 2019).
* seems to affect every version after that, up to the latest one: gvim-8.2.0510-1 and vim-runtime-8.2.0510-1

Steps to reproduce: open a .py python file in gvim, and type :echo has('pyhton'). The result is 0. Now open any other kind of file, say a file named foobar, and do the same. The output is now 1. I noticed this when using the plugin gundo, which requires python, and works fine, except for python files! Now how's that for an Easter egg?? :-)
This task depends upon

Closed by  Levente Polyak (anthraxx)
Monday, 26 April 2021, 21:36 GMT
Reason for closing:  Not a bug
Comment by Levente Polyak (anthraxx) - Sunday, 12 April 2020, 13:13 GMT
That's certainly something you want to report upstream as i don't see a packaging error here.
PS: its called :echo has('python') and not pyhton

PPS: for me all looks fine, i believe the plugin is missing appropriate checks. Try :echo has('python3') which should return 1.
Comment by Óscar Pereira (gauthma) - Sunday, 12 April 2020, 17:44 GMT
> PS: its called :echo has('python') and not pyhton

Yes, typo! Mea culpa!

> Try :echo has('python3') which should return 1.

In versions gvim-8.2.0510-1 and vim-runtime-8.2.0510-1 (ie the latest atm) that command returns 1 for .py files, but 0 for .tex files! Confused, I now am. Vim features are either enabled or not, I think; they shouldn't come and go depending on file types...

> That's certainly something you want to report upstream as i don't see a packaging error here.

Will do, and inform of the reply back here.
Comment by Levente Polyak (anthraxx) - Monday, 13 April 2020, 09:46 GMT
the difference is python2 and python3 and it indicates which plugins or filetypes may have triggered to load which of the plugins. I'm quite convinced this is not an issue at all, but the plugin code's as its lacking the check for both.

Loading...