Re: pythonx patch - :pyx command

2017-01-28 Fir de Conversatie Bram Moolenaar
Ken Takata wrote: > 2017/1/26 Thu 0:56:50 UTC+9 Ken Takata wrote: > > Hi Bram, > > > > 2017/1/25 Wed 1:49:14 UTC+9 Bram Moolenaar wrote: > > > Ken Takata wrote: > > > > > > > > Hmm, having a has() call have side effects is unexpected. I would > > > > > think > > > > > that has('pythonx') just

Re: pythonx patch - :pyx command

2017-01-27 Fir de Conversatie Ken Takata
Hi Bram, 2017/1/26 Thu 0:56:50 UTC+9 Ken Takata wrote: > Hi Bram, > > 2017/1/25 Wed 1:49:14 UTC+9 Bram Moolenaar wrote: > > Ken Takata wrote: > > > > > > Hmm, having a has() call have side effects is unexpected. I would think > > > > that has('pythonx') just returns 1 if python 2 or 3 is availa

Re: pythonx patch - :pyx command

2017-01-24 Fir de Conversatie Bram Moolenaar
Ken Takata wrote: > > > > > 2016/9/19 Mon 23:57:20 UTC+9 Kazunobu Kuriyama wrote: > > > > > > > 2016-09-19 23:21 GMT+09:00 Ken Takata : > > > > > > > > > > > > > > Hi, > > > > > > > > > > > > > > 2013/6/1 Sat 3:49:45 UTC+9 Bram Moolenaar wrote: > > > > > > > > Marc Weber wrote: > > > > > > > >

Re: pythonx patch - :pyx command

2017-01-23 Fir de Conversatie Ken Takata
Hi Bram, 2017/1/24 Tue 4:46:22 UTC+9 Bram Moolenaar wrote: > Ken Takata wrote: > > > > > 2016/9/19 Mon 23:57:20 UTC+9 Kazunobu Kuriyama wrote: > > > > > > 2016-09-19 23:21 GMT+09:00 Ken Takata : > > > > > > > > > > > > Hi, > > > > > > > > > > > > 2013/6/1 Sat 3:49:45 UTC+9 Bram Moolenaar wrote:

Re: pythonx patch - :pyx command

2017-01-23 Fir de Conversatie Bram Moolenaar
Ken Takata wrote: > > > 2016/9/19 Mon 23:57:20 UTC+9 Kazunobu Kuriyama wrote: > > > > > 2016-09-19 23:21 GMT+09:00 Ken Takata : > > > > > > > > > > Hi, > > > > > > > > > > 2013/6/1 Sat 3:49:45 UTC+9 Bram Moolenaar wrote: > > > > > > Marc Weber wrote: > > > > > > > > > > > > > There are two impo

Re: pythonx patch - :pyx command

2017-01-23 Fir de Conversatie Ken Takata
Hi Bram, 2017/1/23 Mon 1:22:52 UTC+9 Bram Moolenaar wrote: > Ken Takata wrote: > > > 2016/9/19 Mon 23:57:20 UTC+9 Kazunobu Kuriyama wrote: > > > > 2016-09-19 23:21 GMT+09:00 Ken Takata : > > > > > > > > Hi, > > > > > > > > 2013/6/1 Sat 3:49:45 UTC+9 Bram Moolenaar wrote: > > > > > Marc Weber wr

Re: pythonx patch - :pyx command

2017-01-22 Fir de Conversatie Bram Moolenaar
Ken Takata wrote: > 2016/9/19 Mon 23:57:20 UTC+9 Kazunobu Kuriyama wrote: > > > 2016-09-19 23:21 GMT+09:00 Ken Takata : > > > > > > Hi, > > > > > > 2013/6/1 Sat 3:49:45 UTC+9 Bram Moolenaar wrote: > > > > Marc Weber wrote: > > > > > > > > > There are two important problems with python support:

Re: pythonx patch - :pyx command

2017-01-06 Fir de Conversatie Ken Takata
Hi, 2016/9/19 Mon 23:57:20 UTC+9 Kazunobu Kuriyama wrote: > > 2016-09-19 23:21 GMT+09:00 Ken Takata : > > > > Hi, > > > > 2013/6/1 Sat 3:49:45 UTC+9 Bram Moolenaar wrote: > > > Marc Weber wrote: > > > > > > > There are two important problems with python support: > > > > 1) you still have to use

Re: pythonx patch - :pyx command

2016-09-19 Fir de Conversatie Kazunobu Kuriyama
2016-09-19 23:21 GMT+09:00 Ken Takata : > Hi, > > 2013/6/1 Sat 3:49:45 UTC+9 Bram Moolenaar wrote: > > Marc Weber wrote: > > > > > There are two important problems with python support: > > > 1) you still have to use .viml in order to load python > > > 2) when using python its you having to remembe

Re: pythonx patch - :pyx command

2016-09-19 Fir de Conversatie Ken Takata
Hi, 2013/6/1 Sat 3:49:45 UTC+9 Bram Moolenaar wrote: > Marc Weber wrote: > > > There are two important problems with python support: > > 1) you still have to use .viml in order to load python > > 2) when using python its you having to remember which python to use despite > > most codes may work

Re: pythonx patch - :pyx command

2013-06-04 Fir de Conversatie Marc Weber
Excerpts from ZyX ZyX's message of Wed Jun 05 00:00:31 +0200 2013: > This is the intention. Not building something into vim leads to creating > bicycles by plugin authors. And I never saw anybody using functions defined > in vim runtime files (except for vimball support in VAM). There must be a > r

Re: pythonx patch - :pyx command

2013-06-04 Fir de Conversatie ZyX ZyX
On Jun 5, 2013 1:22 AM, "Marc Weber" wrote: > > You've been missing documenting default settings .. > > > Does not run ``&pythoninstallprg`` if bang was specified. > May be counter intuitive. ! usually means "force it". > I understand the idea "make things work by default". > But i think it sh

Re: pythonx patch - :pyx command

2013-06-04 Fir de Conversatie Marc Weber
You've been missing documenting default settings .. > Does not run ``&pythoninstallprg`` if bang was specified. May be counter intuitive. ! usually means "force it". I understand the idea "make things work by default". But i think it should be the user having the choice anyway. > > - where i

Re: pythonx patch - :pyx command

2013-06-04 Fir de Conversatie ZyX
вторник, 4 июня 2013 г., 10:59:06 UTC+4 пользователь MarcWeber написал: > Excerpts from ZyX ZyX's message of Tue Jun 04 05:55:18 +0200 2013: > > I am no longer seeing why automatic sourcing of any python file from any > > directory should exist in case loadpyplugin() is implemented. > > It would b

Re: pythonx patch - :pyx command

2013-06-03 Fir de Conversatie Marc Weber
Excerpts from ZyX ZyX's message of Tue Jun 04 05:55:18 +0200 2013: > I am no longer seeing why automatic sourcing of any python file from any > directory should exist in case loadpyplugin() is implemented. It would be nice if you could include your idea about that function in your gist: https://gi

Re: pythonx patch - :pyx command

2013-06-03 Fir de Conversatie ZyX ZyX
On Jun 4, 2013 3:26 AM, "Marc Weber" wrote: > > Excerpts from ZyX ZyX's message of Mon Jun 03 23:11:58 +0200 2013: > > The discussion has now gone into the direction when I will be against > > automatic sourcing of anything related to python. > Wow.. peace. I don't want to be offensive. And its ha

Re: pythonx patch - :pyx command

2013-06-03 Fir de Conversatie Marc Weber
Excerpts from ZyX ZyX's message of Mon Jun 03 23:11:58 +0200 2013: > The discussion has now gone into the direction when I will be against > automatic sourcing of anything related to python. Wow.. peace. I don't want to be offensive. And its hard to follow this argument. "this direction" is not ver

Re: pythonx patch - :pyx command

2013-06-03 Fir de Conversatie ZyX ZyX
On Jun 4, 2013 12:54 AM, "Marc Weber" wrote: > > I still vote for the module solution, because you can import it into global > namespace for debugging and testing. > > While writing plugins being able to > > :py import my-module > :py my-module.do_thing(foo) > > is important to me. > > Using

Re: pythonx patch - :pyx command

2013-06-03 Fir de Conversatie ZyX ZyX
On Jun 4, 2013 12:38 AM, "Marc Weber" wrote: > > Excerpts from ZyX ZyX's message of Mon Jun 03 13:28:10 +0200 2013: > > What for? > Stupid simple plugins which want to have minimal state such as > "incermental counter" ? ?! How my proposal is against this? When you create a python function that u

Re: pythonx patch - :pyx command

2013-06-03 Fir de Conversatie Marc Weber
I still vote for the module solution, because you can import it into global namespace for debugging and testing. While writing plugins being able to :py import my-module :py my-module.do_thing(foo) is important to me. Using execfile('file',{},{}) access to the namespace is lost which wo

Re: pythonx patch - :pyx command

2013-06-03 Fir de Conversatie Marc Weber
Excerpts from ZyX ZyX's message of Mon Jun 03 13:28:10 +0200 2013: > What for? Stupid simple plugins which want to have minimal state such as "incermental counter" ? I don't know yet. You're right, you could create a new module and import that just to keep state. Anyway. Current interface is:

Re: pythonx patch - :pyx command

2013-06-03 Fir de Conversatie ZyX ZyX
On Jun 3, 2013 9:55 AM, "Marc Weber" wrote: > > Excerpts from ZyX's message of Sun Jun 02 12:58:10 +0200 2013: > > execfile(filename, {}, {}) > Would you pass a permanent individual global state dictionary like this? > > if not "foo.py" in module_globals: > module_globals["foo.py"] = {}

Re: pythonx patch - :pyx command

2013-06-02 Fir de Conversatie Marc Weber
Excerpts from ZyX's message of Sun Jun 02 12:58:10 +0200 2013: > execfile(filename, {}, {}) Would you pass a permanent individual global state dictionary like this? if not "foo.py" in module_globals: module_globals["foo.py"] = {} execfile("foo.py", module_globals["foo.py"], {}) Then a

Re: pythonx patch - :pyx command

2013-06-02 Fir de Conversatie ZyX
воскресенье, 2 июня 2013 г., 2:51:35 UTC+4 пользователь MarcWeber написал: > @ZyX: I totally agree on plugin/ being a bad choice. And I also agree > that the patch is not perfect. I had to get it out due to Brams deadline > (Friday) - because otherwise much worse things could have happened - > peop

Re: pythonx patch - :pyx command

2013-06-01 Fir de Conversatie Marc Weber
@ZyX: I totally agree on plugin/ being a bad choice. And I also agree that the patch is not perfect. I had to get it out due to Brams deadline (Friday) - because otherwise much worse things could have happened - people starting to use if py2 then .. else .. code which you cannot get rid of. I also

Re: pythonx patch - :pyx command

2013-06-01 Fir de Conversatie ZyX ZyX
On Jun 1, 2013 7:43 AM, "Marc Weber" wrote: > > ZyX: Usually you're rigth with what you're saying. > So please help find the best forum to place your "style guides" about > "how to write unobstrusive perfect python based vim plugins". > > You all know that I've introduced this wiki: > http://vim-w

Re: pythonx patch - :pyx command

2013-06-01 Fir de Conversatie Andy Kittner
On Sat, Jun 01, 2013 at 05:44:17AM +0200, Marc Weber wrote: j And third, you must not use the same code as :pyfile. It is already bad that somebody may think that creating large file sourced using :pyfile is a good idea: it is never a good idea because file executed via :pyfile is executed as a

Re: pythonx patch - :pyx command

2013-05-31 Fir de Conversatie Marc Weber
ZyX: Usually you're rigth with what you're saying. So please help find the best forum to place your "style guides" about "how to write unobstrusive perfect python based vim plugins". You all know that I've introduced this wiki: http://vim-wiki.mawercer.de/ I think such (and making such official)

Re: pythonx patch - :pyx command

2013-05-31 Fir de Conversatie Marc Weber
Excerpts from Bram Moolenaar's message of Fri May 31 20:49:45 +0200 2013: > Then :pyx would really work. Is that possible without getting errors > for some code that works only in one versin? Example taken from UltiSnips: ./py-code/UltiSnips/compatibility.py ./py-code/UltiSnips/compatibility

Re: pythonx patch - :pyx command

2013-05-31 Fir de Conversatie ZyX
> Not everything is compatible between Python 2 and 3 though. Is there a > way to do: > > if python3: > do-it-this-way > else: > do-it-that-way > > Then :pyx would really work. Is that possible without getting errors > for some code that works only in one versin?

Re: pythonx patch - :pyx command

2013-05-31 Fir de Conversatie ZyX
пятница, 31 мая 2013 г., 20:17:45 UTC+4 пользователь MarcWeber написал: > There are two important problems with python support: > > 1) you still have to use .viml in order to load python > 2) when using python its you having to remember which python to use despite > most codes may work with pyth

Re: pythonx patch - :pyx command

2013-05-31 Fir de Conversatie Bram Moolenaar
Marc Weber wrote: > There are two important problems with python support: > 1) you still have to use .viml in order to load python > 2) when using python its you having to remember which python to use despite > most codes may work with python and python3 interpreter. > Using the same (only on

Re: pythonx patch - :pyx command

2013-05-31 Fir de Conversatie Marc Weber
Excerpts from James McCoy's message of Fri May 31 18:39:13 +0200 2013: > This is only true if you don't support older versions of Python 2.x. Such a > suggestion was already discussed in this thread: > http://thread.gmane.org/gmane.editors.vim.devel/38261 I didn't see a clear winner. We have py an

Re: pythonx patch - :pyx command

2013-05-31 Fir de Conversatie James McCoy
On May 31, 2013 12:17 PM, "Marc Weber" wrote: > > There are two important problems with python support: > 1) you still have to use .viml in order to load python > 2) when using python its you having to remember which python to use despite > most codes may work with python and python3 interpreter

pythonx patch - :pyx command

2013-05-31 Fir de Conversatie Marc Weber
There are two important problems with python support: 1) you still have to use .viml in order to load python 2) when using python its you having to remember which python to use despite most codes may work with python and python3 interpreter. Using the same (only one) interpreter is very importa