Re: How can I define a command that can be completed with both var and options?

2010-11-09 Thread Ingo Karkat
On 09-Nov-2010 08:37, Christophe-Marie Duquesne wrote: > On Mon, Nov 8, 2010 at 4:33 PM, Christophe-Marie Duquesne > Did I post this question in the right mailing list? I assumed vim > scripts were part of vim development... Vim scripting "how-to" issues belong to vim_use. However, I think your co

Re: How can I define a command that can be completed with both var and options?

2010-11-09 Thread Christophe-Marie Duquesne
On Tue, Nov 9, 2010 at 9:15 AM, Ingo Karkat wrote: > Vim scripting "how-to" issues belong to vim_use. That is good to know, thank you. > It would help if you could provide further motivation for your need. Why do > you > need this combination? Is this a use case that (many) other script writers

Re: Patch 7.3.050

2010-11-09 Thread Alexey I. Froloff
On Sat, Nov 6, 2010 at 14:09, Bram Moolenaar wrote: > You do have -lncurses, which provides the missing symbols.  I guess the > --as-needed feature is broken in this compiler. Those symbols lives in libtinfo (at least on my system). Try ./configure ... --with-tlib=tinfo ... -- Regards, Sir Raor

Re: Null reference when $PATH is empty.

2010-11-09 Thread James Vega
On Mon, Nov 08, 2010 at 08:08:17PM -0800, mattn wrote: > vim crash when $PATH is empty. > below is a patch. check please. > > - Yasuhiro Matsumoto > > diff -r 1ccc1ace9e5b src/ex_getln.c > --- a/src/ex_getln.c Wed Nov 03 22:32:24 2010 +0100 > +++ b/src/ex_getln.c Tue Nov 09 13:02:54 2010 +0900

Re: provide random number generating functions for vimscript

2010-11-09 Thread Ben Fritz
On Nov 8, 12:08 pm, Bram Moolenaar wrote: > > Generating the float random number from an int looks strange. > Is that really needed?  The computations look like we are dropping some > bits. > I haven't looked at the patch, but I have learned recently that some pseudo-random algorithms generate

Re: provide random number generating functions for vimscript

2010-11-09 Thread Ben Fritz
On Nov 8, 7:50 pm, "xuh...@gmail.com" wrote: > > I don't know why we have to reset the seed to a known value. > It is nice, especially for testing purposes, to be able to always have the SAME sequence of "random" numbers. For example, if you write a test case that runs a piece of code with rand

RE: [PATCH] provide random number generating functions for vimscript

2010-11-09 Thread H Xu
OK, the attachment is the latest patch which I add a srand function to set seed. -Original Message- From: Bram Moolenaar Sent: 2010/11/09 02:08:27 To: H Xu Cc: vim_dev@googlegroups.com Subject: Re: [PATCH] provide random number generating functions for vimscript Hong Xu wrote: > The

[patch] Py_SetPythonHome for Python2 and Python3

2010-11-09 Thread Roland Puntaier
Hi James, Hi Bram, I recently sent a patch for Python3, because it was not possible to import modules, if Python3 was installed in /usr/local. I have now extended the patch for Python2. Py_Initialize() had come back with a sys.path for /usr instead of /usr/local. @James: Py_GetPrefix wou

Re: Patch 7.3.050

2010-11-09 Thread Bram Moolenaar
Alexey Froloff wrote: > On Sat, Nov 6, 2010 at 14:09, Bram Moolenaar wrote: > > You do have -lncurses, which provides the missing symbols. I guess the > > --as-needed feature is broken in this compiler. > Those symbols lives in libtinfo (at least on my system). > > Try ./configure ... --with-t

clear buffer content via py3

2010-11-09 Thread winterTTr
I recently use py3 in vim and try to accomplish some function. I remember that in py( which means python2 ), we can clear the current buffer by : :py vim.current.buffer[:] = [] OR: :py del vim.current.buffer[:] But in py3 now, the former code return a error message, and i can't find other way to

Re: Vim cannot find xxd utility

2010-11-09 Thread Tony Mechelynck
On 08/11/10 21:52, Ben Fritz wrote: I am unable to use the xxd utility in Vim 7.3.35 on Windows XP (installed via the "Cream without Vim" installer). Reinstalling does not help. Rolling back to version 7.3.27 works fine. From :help win32-PATH: The directory of the Vim executable is appended t

Re: Patch 7.3.050

2010-11-09 Thread Alexey I. Froloff
On Wed, Nov 10, 2010 at 01:25, Bram Moolenaar wrote: > The change to --as-needed should not require any configure argument > changes.  If it built OK before it should still build OK. libncurses is linked against libtinfo, but vim doesn't use any symbols from libncurses. -lncurses must be changed

Re: Patch 7.3.050

2010-11-09 Thread Alexey I. Froloff
On Wed, Nov 10, 2010 at 10:48, Alexey I. Froloff wrote: > libncurses is linked against libtinfo, but vim doesn't use any symbols from > libncurses.  -lncurses must be changed to -ltinfo, this is how --as-needed > works. Another possible solution: $ cat /usr/lib/libncursesw.so /* GNU ld script */