You are not logged in.

#1 2015-08-15 14:49:10

j2lapoin
Banned
Registered: 2013-06-28
Posts: 102

vim and python2 and 3 [SOLVED]

I'm learning python thru "learn pyhon the hard way". It use Vim, and I was wandering if I could do the same thing. Instead of gedit, I would like to use vim for my code in python 2 and 3.  I google it but found nothing.

Last edited by j2lapoin (2015-08-15 15:07:35)

Offline

#2 2015-08-15 14:54:07

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: vim and python2 and 3 [SOLVED]

https://www.archlinux.org/packages/extra/i686/vim/ depends on python2 and https://www.archlinux.org/packages/extr … m-python3/ uses python3.
What exactly is the problem with writing python code in vim?

Offline

#3 2015-08-15 15:00:11

j2lapoin
Banned
Registered: 2013-06-28
Posts: 102

Re: vim and python2 and 3 [SOLVED]

I just want to be  able to code python2 and python3 in a gui like gvim. I saw gvim-python3 in the aur but i got to think it's only for python3. not for python2. I mean, if i want to code in Python2, should I just used a plain vim?

Last edited by j2lapoin (2015-08-15 15:01:17)

Offline

#4 2015-08-15 15:02:52

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: vim and python2 and 3 [SOLVED]

You can have only one version of python supported by vim/gvim.

Offline

#5 2015-08-15 15:06:51

j2lapoin
Banned
Registered: 2013-06-28
Posts: 102

Re: vim and python2 and 3 [SOLVED]

okay that answer my question, I might just stick to python2 until I finish the book.

Offline

#6 2015-08-15 15:11:56

j2lapoin
Banned
Registered: 2013-06-28
Posts: 102

Re: vim and python2 and 3 [SOLVED]

Offline

#7 2015-08-15 15:14:23

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: vim and python2 and 3 [SOLVED]

Offline

#8 2015-08-15 15:18:53

j2lapoin
Banned
Registered: 2013-06-28
Posts: 102

Re: vim and python2 and 3 [SOLVED]

==> ERROR: install file (gvim.install) does not exist or is not a regular file.

Offline

#9 2015-08-15 15:48:45

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: vim and python2 and 3 [SOLVED]

Offline

#10 2015-08-15 16:59:06

Alber
Member
From: Spain - España
Registered: 2011-11-11
Posts: 227

Re: vim and python2 and 3 [SOLVED]

Sorry.
I may be wrong.
But I think "Python support" is for writing extensions for vim/gvim. This extensions can be Python 2 or Python 3.

If you want execute a python script from vim/gvim you can do:

:!python2 %

or (python 3)

:!python %

Because not all of us are native English speakers, try no to use slang or abbreviations, thank you.

Offline

#11 2015-08-15 17:03:02

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: vim and python2 and 3 [SOLVED]

Yup.
You can have both python 2 and python 3 installed on your Arch at the same time and you can write code for either version in vim, vi, nano and whatever editor you want.

Offline

Board footer

Powered by FluxBB