Re: Does any one know how to build a msys+mintty compatible vim (like vim in GitBash) ?

2016-09-22 Fir de Conversatie Ken Takata
Hi,

2016/9/23 Fri 13:00:40 UTC+9 skywind3000 wrote:
> Ken Takata wrote:
> > Hi,
> > 
> > 2016/9/23 Fri 4:46:48 UTC+9 skywind3000 wrote:
> > > Yesterday, I started vim in GitBash (msys+mintty) by chance on windows.
> > > and found that vim worked very well in mintty, and mintty is far more 
> > > better than cmd.exe.
> > > 
> > > Trying to build vim from msys, and only find a cmd.exe compatible version 
> > > which can not run properly under mintty.
> > > 
> > > Does any body know how can GitBash/msys developers build it ?
> > > what building parameters did they use ?
> > 
> > Git for Windows (a.k.a. GitBash) uses msys2 and msys2 is a fork of Cygwin.
> > So, basically you can build Vim as the same way with Cygwin. However GitBash
> > doesn't have GCC by default. You need to install "Git for Windows SDK" to 
> > build
> > a program for GitBash.
> > 
> > Regards,
> > Ken Takata
> 
> Thanks, is there any instructions to build on msys2 ?
> this one (https://gist.github.com/rpuntaie/8510218) seems out of date
> 
> I tried to build from msys2, and get an error when I try to execute it .
> 
> Linwei@weilin0 MINGW32 ~/software/vim/src
> $ ./vim
> Vim: Error: This version of Vim does not run in a Cygwin terminal

The instruction cannot be applied to your case.
You built Win32 (native) vim.exe using MSYS2/MinGW, but actually you need is
MSYS2 version of vim.exe which is linked with msys-2.0.dll. They are totally
different things.

If you use the official version of MSYS2, you should open "MSYS2 Shell" 
shortcut,
then install necessary packages using pacman. (gcc, make, ncurses-devel,
gettext-devel, libiconv-devel, etc.)
If you use GitBash, you should install "Git for Windows SDK". (I haven't tried
this though.)
Then you should build Vim as normal Unix (or Cygwin).
E.g.:
cd src
./configure; make

Regards,
Ken Takata

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Does any one know how to build a msys+mintty compatible vim (like vim in GitBash) ?

2016-09-22 Fir de Conversatie skywind3000
Ken Takata wrote:
> Hi,
> 
> 2016/9/23 Fri 4:46:48 UTC+9 skywind3000 wrote:
> > Yesterday, I started vim in GitBash (msys+mintty) by chance on windows.
> > and found that vim worked very well in mintty, and mintty is far more 
> > better than cmd.exe.
> > 
> > Trying to build vim from msys, and only find a cmd.exe compatible version 
> > which can not run properly under mintty.
> > 
> > Does any body know how can GitBash/msys developers build it ?
> > what building parameters did they use ?
> 
> Git for Windows (a.k.a. GitBash) uses msys2 and msys2 is a fork of Cygwin.
> So, basically you can build Vim as the same way with Cygwin. However GitBash
> doesn't have GCC by default. You need to install "Git for Windows SDK" to 
> build
> a program for GitBash.
> 
> Regards,
> Ken Takata

Thanks, is there any instructions to build on msys2 ?
this one (https://gist.github.com/rpuntaie/8510218) seems out of date

I tried to build from msys2, and get an error when I try to execute it .

Linwei@weilin0 MINGW32 ~/software/vim/src
$ ./vim
Vim: Error: This version of Vim does not run in a Cygwin terminal

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Does any one know how to build a msys+mintty compatible vim (like vim in GitBash) ?

2016-09-22 Fir de Conversatie Ken Takata
Hi,

2016/9/23 Fri 4:46:48 UTC+9 skywind3000 wrote:
> Yesterday, I started vim in GitBash (msys+mintty) by chance on windows.
> and found that vim worked very well in mintty, and mintty is far more better 
> than cmd.exe.
> 
> Trying to build vim from msys, and only find a cmd.exe compatible version 
> which can not run properly under mintty.
> 
> Does any body know how can GitBash/msys developers build it ?
> what building parameters did they use ?

Git for Windows (a.k.a. GitBash) uses msys2 and msys2 is a fork of Cygwin.
So, basically you can build Vim as the same way with Cygwin. However GitBash
doesn't have GCC by default. You need to install "Git for Windows SDK" to build
a program for GitBash.

Regards,
Ken Takata

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: setpos() behaves erratically at times

2016-09-22 Fir de Conversatie Axel Bender
A line like this (the parens are in the right position):

--- cut here ---
When you're trying to think about how to define a new operator- () 
movement, you can think of it like this:
--- cut here ---

The function was called in operator-pending mode via "cib" (replacement 
function for the standard functionality). When the error occurs - not always 
reproducible - the function could be called several times before w/o showing 
the error.

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Does any one know how to build a msys+mintty compatible vim (like vim in GitBash) ?

2016-09-22 Fir de Conversatie skywind3000
Yesterday, I started vim in GitBash (msys+mintty) by chance on windows.
and found that vim worked very well in mintty, and mintty is far more better 
than cmd.exe.

Trying to build vim from msys, and only find a cmd.exe compatible version which 
can not run properly under mintty.

Does any body know how can GitBash/msys developers build it ?
what building parameters did they use ?




-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Patch 8.0.0008

2016-09-22 Fir de Conversatie Bram Moolenaar

Patch 8.0.0008
Problem:Popup complete test is disabled.
Solution:   Enable the test and change the assert. (Hirohito Higashi)
Files:  src/testdir/test_popup.vim


*** ../vim-8.0.0007/src/testdir/test_popup.vim  2016-09-05 20:52:36.0 
+0200
--- src/testdir/test_popup.vim  2016-09-22 21:23:32.478284340 +0200
***
*** 17,32 
  endfunc
  
  func! Test_popup_complete2()
!   " Insert match immediately, if there is only one match
!   "   Should select a character from the line below
!   " TODO: test disabled because the code change has been reverted.
!   throw "Skipped: Bug with  and popupmenu not fixed yet"
new
inoremap  =ListMonths()
call append(1, ["December2015"])
:1
call feedkeys("aD\\\", 'tx')
!   call assert_equal(["December2015", "", "December2015"], getline(1,3))
%d
bw!
  endfu
--- 17,34 
  endfunc
  
  func! Test_popup_complete2()
!   " Although the popupmenu is not visible, this does not mean completion mode
!   " has ended. After pressing  to complete the currently typed char, Vim
!   " still stays in the first state of the completion (:h ins-completion-menu),
!   " although the popupmenu wasn't shown  will remove the inserted
!   " completed text (:h complete_CTRL-E), while the following  will behave
!   " like expected (:h i_CTRL-E)
new
inoremap  =ListMonths()
call append(1, ["December2015"])
:1
call feedkeys("aD\\\", 'tx')
!   call assert_equal(["Dece", "", "December2015"], getline(1,3))
%d
bw!
  endfu
*** ../vim-8.0.0007/src/version.c   2016-09-21 22:41:21.301603417 +0200
--- src/version.c   2016-09-22 21:24:38.145827386 +0200
***
*** 766,767 
--- 766,769 
  {   /* Add new patch number below this line */
+ /**/
+ 8,
  /**/

-- 
Yah, well, we had to carve our electrons out of driftwood we'd
find.  In the winter.  Uphill.  Both ways.

 /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net   \\\
///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org///
 \\\help me help AIDS victims -- http://ICCF-Holland.org///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: test popupmenu question

2016-09-22 Fir de Conversatie Bram Moolenaar

Hirohito Higashi wrote:

> Hi ChrisBra, Bram and list,
> 
> 2016-9-23(Fri) 0:34:35 UTC+9 Christian Brabandt:
> > Hi,
> > 
> > On Mi, 21 Sep 2016, h_east wrote:
> > >  func! Test_popup_complete2()
> > > -  " Insert match immediately, if there is only one match
> > > -  "   Should select a character from the line below
> > > -  " TODO: test disabled because the code change has been reverted.
> > > -  throw "Skipped: Bug with  and popupmenu not fixed yet"
> > > +  " 'the popup menu is not visible' is not equivalent to  'the 
> > > completion mode
> > > +  " is not active'.
> > > +  " After the type , Vim still stay in the first state of the 
> > > completion
> > > +  " mode.  It is not related to the visible of popup.
> > > +  " So that, the first  behavior is `complete_CTRL-E`, and the 
> > > second and
> > > +  " more  is `i_CTRL_E`
> > 
> > 
> > How about this:
> > Although the popupmenu is not visible, this does not mean completion 
> > mode has ended. After pressing  to complete the currently typed 
> > char, Vim still stays in the first state of the completion
> > (:h ins-completion-menu), although the popupmenu wasn't shown  will 
> > remove the inserted completed text (:h complete_CTRL-E), while the 
> > following  will behave like expected (:h i_CTRL-E)
> 
> Nicely. I like this. Thanksߑ .
> 
> > 
> > > -  call assert_equal(["December2015", "", "December2015"], getline(1,3))
> > > +  call assert_equal(["Dece", "", "December2015"], getline(1,3))
> > 
> > Looks good to me.
> 
> Thanks for the check.
> I update a patch.
> 
> Bram>
> Please include this patch.

I will, thanks.

-- 
You were lucky to have a LAKE! There were a hundred and sixty of
us living in a small shoebox in the middle of the road.

 /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net   \\\
///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org///
 \\\help me help AIDS victims -- http://ICCF-Holland.org///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [bug] lambda expressions

2016-09-22 Fir de Conversatie Bram Moolenaar

Ken Takata wrote:

> 2016/9/22 Thu 2:37:29 UTC+9 Bram Moolenaar wrote:
> > Christian Brabandt wrote:
> > 
> > > Am 2016-09-21 00:00, schrieb Ken Takata:
> > > > Hi Christian,
> > > > 
> > > > 2016/9/21 Wed 5:31:26 UTC+9 Christian Brabandt wrote:
> > > >> Hi,
> > > >> I think I found a bug with lambda expressions.
> > > >> 
> > > >> I was looking into writing some automated tests and was trying to use
> > > >> the new lambda expressions. However this does not work as expected:
> > > >> 
> > > >> Here is an example:
> > > >> #v+
> > > >>   let a = ['FOOBAR"word"', 'FOOBAR"word2"']
> > > >>   let pat='^FOOBAR\s\+\zs"[^"]\+"'
> > > >>   let pat2='^FOOBAR\s\+\("[^"]\+"\)'
> > > >>   :echo map(copy(a), 'matchstr(v:val, g:pat)')
> > > >>   -> result ['"word"', '"word2"']
> > > >>   :echo map(copy(a), {val -> matchstr(val, g:pat)})
> > > >>   -> BUG: result ['""', '""'], expected ['"word"', '"word2"']
> > > >>   :echo map(copy(a), 'substitute(v:val, g:pat2, 
> > > >> ''\=submatch(1)'',"")')
> > > >>   -> result ['"word"', '"word2"']
> > > >>   :echo map(copy(a), {val -> substitute(val, g:pat2, '\=submatch(1)', 
> > > >> '')})
> > > >>   -> BUG: result ['0', '1'], expected ['"word", '"word2"']
> > > >> #v-
> > > > 
> > > > This is not a bug. map() always passes two arguments (key and val) to 
> > > > the
> > > > specified Funcref. So,
> > > > 
> > > >>   :echo map(copy(a), {val -> matchstr(val, g:pat)})
> > > > 
> > > > this should be:
> > > > 
> > > >   :echo map(copy(a), {key, val -> matchstr(val, g:pat)})
> > > > 
> > > > Or you can still use v:val:
> > > > 
> > > >   :echo map(copy(a), {-> matchstr(v:val, g:pat)})
> > > 
> > > Hm, should there be an error when only one argument is given?
> > > Or at least it should be more stressed in the documentatio, that two
> > > arguments are expected.
> > 
> > How about extending the example in the help:
> > 
> > If {expr2} is a |Funcref| it is called with two arguments:
> > 1. The key or the index of the current item.
> > 2. the value of the current item.
> > The function must return the new value of the item. Example
> > that changes each value by "key-value": >
> > func KeyValue(key, val)
> >   return a:key . '-' . a:val
> > endfunc
> > call map(myDict, function('KeyValue'))
> > <   It is shorter when using a |lambda|: >
> > call map(myDict, {key, val -> key . '-' . val})
> > <   If you do not use "val" you can leave it out: >
> > call map(myDict, {key -> 'item: ' . key})
> 
> A similar update might be needed for `:help filter()`.

How about this:

If {expr2} is a |Funcref| it must take two arguments:
1. the key or the index of the current item.
2. the value of the current item.
The function must return |TRUE| if the item should be kept.
Example that keeps the odd items of a list: >
func Odd(idx, val)
  return a:idx % 2 == 1
endfunc
call filter(mylist, function('Odd'))
<   It is shorter when using a |lambda|: >
call filter(myList, {idx, val -> idx * val <= 42})
<   If you do not use "val" you can leave it out: >
call filter(myList, {idx -> idx % 2 == 1})

-- 
   "To whoever finds this note -
   I have been imprisoned by my father who wishes me to marry
   against my will.  Please please please please come and rescue me.
   I am in the tall tower of Swamp Castle."
   SIR LAUNCELOT's eyes light up with holy inspiration.
 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net   \\\
///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org///
 \\\help me help AIDS victims -- http://ICCF-Holland.org///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [doc][patch] Fix eval.txt

2016-09-22 Fir de Conversatie Bram Moolenaar

Ken Takata wrote:

> I found some mistakes/inconsistencies in eval.txt.
> 
> * Inconsistent use of space/tab.
> * Inconsistent use of |foo| / `foo`.
>   `` is used for Ex commands, || is used for general links, is it right?

Yes, with `cmd` the highlighting is like for commands.  But it can also
be used for expressions.  It's a bit inconsistent, since `` was
introduced later.

> * Inconsistent description between filter() and map().
> * etc.
> 
> Please check the attached patch.

Thanks.

-- 
Even got a Datapoint 3600(?) with a DD50 connector instead of the
usual DB25...  what a nightmare trying to figure out the pinout
for *that* with no spex...

 /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net   \\\
///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org///
 \\\help me help AIDS victims -- http://ICCF-Holland.org///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: setpos() behaves erratically at times

2016-09-22 Fir de Conversatie Nikolay Aleksandrovich Pavlov
2016-09-22 19:24 GMT+03:00 Axel Bender :
> Cannot confirm this. Please look at the two setpos() statements - both 
> returning 0 (green = successfull). The statements were given in a debug 
> session; no cursor movement in between. The desired positions were not set 
> (yellow and blue). The '< register is set to the first column, the '> 
> register is set to the last column.

What is there on the line 532? Also what is visual region type (visualmode())?

>
> --
> --
> You received this message from the "vim_dev" maillist.
> Do not top-post! Type your reply below the text you are replying to.
> For more information, visit http://www.vim.org/maillist.php
>
> ---
> You received this message because you are subscribed to the Google Groups 
> "vim_dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to vim_dev+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: setpos() behaves erratically at times

2016-09-22 Fir de Conversatie Axel Bender
Cannot confirm this. Please look at the two setpos() statements - both 
returning 0 (green = successfull). The statements were given in a debug 
session; no cursor movement in between. The desired positions were not set 
(yellow and blue). The '< register is set to the first column, the '> register 
is set to the last column.

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[doc][patch] Fix eval.txt

2016-09-22 Fir de Conversatie Ken Takata
Hi,

I found some mistakes/inconsistencies in eval.txt.

* Inconsistent use of space/tab.
* Inconsistent use of |foo| / `foo`.
  `` is used for Ex commands, || is used for general links, is it right?
* Inconsistent description between filter() and map().
* etc.

Please check the attached patch.

Regards,
Ken Takata

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
# HG changeset patch
# Parent  89183e11a58551a15ffbd75229024a0fddafe9cf

diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -125,7 +125,8 @@ cleared.  A List, Dictionary or Float is
 evaluates to FALSE.
 
 		*E745* *E728* *E703* *E729* *E730* *E731* *E908* *E910* *E913*
-List, Dictionary, Funcref and Job types are not automatically converted.
+List, Dictionary, Funcref, Job and Channel types are not automatically
+converted.
 
 			*E805* *E806* *E808*
 When mixing Number and Float the Number is converted to Float.  Otherwise
@@ -643,7 +644,7 @@ 2. Expression syntax	*expression-syn
 
 Expression syntax summary, from least to most significant:
 
-|expr1|   expr2
+|expr1|	expr2
 	expr2 ? expr1 : expr1	if-then-else
 
 |expr2|	expr3
@@ -691,7 +692,7 @@ Expression syntax summary, from least to
 	expr8.name		entry in a |Dictionary|
 	expr8(expr1, ...)	function call with |Funcref| variable
 
-|expr9|   number		number constant
+|expr9|	number			number constant
 	"string"		string constant, backslash is special
 	'string'		string constant, ' is doubled
 	[expr1, ...]		|List|
@@ -958,7 +959,7 @@ expr8[expr1]		item of String or |List|	*
 If expr8 is a Number or String this results in a String that contains the
 expr1'th single byte from expr8.  expr8 is used as a String, expr1 as a
 Number.  This doesn't recognize multi-byte encodings, see |byteidx()| for
-an alternative, or use `split()` to turn the string into a list of characters.
+an alternative, or use |split()| to turn the string into a list of characters.
 
 Index zero gives the first byte.  This is like it works in C.  Careful:
 text column numbers start with one!  Example, to get the byte under the
@@ -1244,7 +1245,7 @@ The arguments are optional.  Example: >
 <	error function
 			*closure*
 Lambda expressions can access outer scope variables and arguments.  This is
-often called a closure.  Example where "i" a and "a:arg" are used in a lambda
+often called a closure.  Example where "i" and "a:arg" are used in a lambda
 while they exist in the function scope.  They remain valid even after the
 function returns: >
 	:function Foo(arg)
@@ -1898,7 +1899,7 @@ v:termresponse	The escape sequence retur
 		{only when compiled with |+termresponse| feature}
 
 	*v:testing* *testing-variable*
-v:testing	Must be set before using `test_garbagecollect_now()`.
+v:testing	Must be set before using |test_garbagecollect_now()|.
 
 *v:this_session* *this_session-variable*
 v:this_session	Full filename of the last loaded or saved session file.  See
@@ -2072,8 +2073,8 @@ expand({expr} [, {nosuf} [, {list}]])
 feedkeys({string} [, {mode}])	Number	add key sequence to typeahead buffer
 filereadable({file})		Number	|TRUE| if {file} is a readable file
 filewritable({file})		Number	|TRUE| if {file} is a writable file
-filter({expr}, {string})	List/Dict  remove items from {expr} where
-	{string} is 0
+filter({expr1}, {expr2})	List/Dict  remove items from {expr1} where
+	{expr2} is 0
 finddir({name}[, {path}[, {count}]])
 String	find directory {name} in {path}
 findfile({name}[, {path}[, {count}]])
@@ -2097,7 +2098,7 @@ garbagecollect([{atexit}])	none	free mem
 get({list}, {idx} [, {def}])	any	get item {idx} from {list} or {def}
 get({dict}, {key} [, {def}])	any	get item {key} from {dict} or {def}
 get({func}, {what})		any	get property of funcref/partial {func}
-getbufinfo([{expr}])		List  	information about buffers
+getbufinfo([{expr}])		List	information about buffers
 getbufline({expr}, {lnum} [, {end}])
 List	lines {lnum} to {end} of buffer {expr}
 getbufvar({expr}, {varname} [, {def}])
@@ -2128,12 +2129,12 @@ getqflist([{what}])		List	list of quickf
 getreg([{regname} [, 1 [, {list}]]])
 String or List   contents of register
 getregtype([{regname}])		String	type of register
-gettabinfo([{expr}])		List  	list of tab pages
+gettabinfo([{expr}])		List	list of tab pages
 gettabvar({nr}, {varname} [, {def}])
 any	variable {varname} in tab {nr} or {def}
 gettabwinvar({tabnr}, {winnr}, {name} [, {def}])
 any	{name} in {winnr} in tab page {tabnr}
-getwininfo([{winid}])		List  	list of windows

Re: test popupmenu question

2016-09-22 Fir de Conversatie h_east
Hi ChrisBra, Bram and list,

2016-9-23(Fri) 0:34:35 UTC+9 Christian Brabandt:
> Hi,
> 
> On Mi, 21 Sep 2016, h_east wrote:
> >  func! Test_popup_complete2()
> > -  " Insert match immediately, if there is only one match
> > -  "   Should select a character from the line below
> > -  " TODO: test disabled because the code change has been reverted.
> > -  throw "Skipped: Bug with  and popupmenu not fixed yet"
> > +  " 'the popup menu is not visible' is not equivalent to  'the completion 
> > mode
> > +  " is not active'.
> > +  " After the type , Vim still stay in the first state of the 
> > completion
> > +  " mode.  It is not related to the visible of popup.
> > +  " So that, the first  behavior is `complete_CTRL-E`, and the second 
> > and
> > +  " more  is `i_CTRL_E`
> 
> 
> How about this:
> Although the popupmenu is not visible, this does not mean completion 
> mode has ended. After pressing  to complete the currently typed 
> char, Vim still stays in the first state of the completion
> (:h ins-completion-menu), although the popupmenu wasn't shown  will 
> remove the inserted completed text (:h complete_CTRL-E), while the 
> following  will behave like expected (:h i_CTRL-E)

Nicely. I like this. Thanks.

> 
> > -  call assert_equal(["December2015", "", "December2015"], getline(1,3))
> > +  call assert_equal(["Dece", "", "December2015"], getline(1,3))
> 
> Looks good to me.

Thanks for the check.
I update a patch.

Bram>
Please include this patch.

--
Best regards,
Hirohito Higashi (a.k.a. h_east)

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
diff --git a/src/testdir/test_popup.vim b/src/testdir/test_popup.vim
index 6e07393..10eaf3a 100644
--- a/src/testdir/test_popup.vim
+++ b/src/testdir/test_popup.vim
@@ -17,16 +17,18 @@ func! ListMonths()
 endfunc
 
 func! Test_popup_complete2()
-  " Insert match immediately, if there is only one match
-  "   Should select a character from the line below
-  " TODO: test disabled because the code change has been reverted.
-  throw "Skipped: Bug with  and popupmenu not fixed yet"
+  " Although the popupmenu is not visible, this does not mean completion mode
+  " has ended. After pressing  to complete the currently typed char, Vim
+  " still stays in the first state of the completion (:h ins-completion-menu),
+  " although the popupmenu wasn't shown  will remove the inserted
+  " completed text (:h complete_CTRL-E), while the following  will behave
+  " like expected (:h i_CTRL-E)
   new
   inoremap  =ListMonths()
   call append(1, ["December2015"])
   :1
   call feedkeys("aD\\\", 'tx')
-  call assert_equal(["December2015", "", "December2015"], getline(1,3))
+  call assert_equal(["Dece", "", "December2015"], getline(1,3))
   %d
   bw!
 endfu


Re: test popupmenu question

2016-09-22 Fir de Conversatie Christian Brabandt
Hi,

On Mi, 21 Sep 2016, h_east wrote:
>  func! Test_popup_complete2()
> -  " Insert match immediately, if there is only one match
> -  "   Should select a character from the line below
> -  " TODO: test disabled because the code change has been reverted.
> -  throw "Skipped: Bug with  and popupmenu not fixed yet"
> +  " 'the popup menu is not visible' is not equivalent to  'the completion 
> mode
> +  " is not active'.
> +  " After the type , Vim still stay in the first state of the completion
> +  " mode.  It is not related to the visible of popup.
> +  " So that, the first  behavior is `complete_CTRL-E`, and the second 
> and
> +  " more  is `i_CTRL_E`


How about this:
Although the popupmenu is not visible, this does not mean completion 
mode has ended. After pressing  to complete the currently typed 
char, Vim still stays in the first state of the completion
(:h ins-completion-menu), although the popupmenu wasn't shown  will 
remove the inserted completed text (:h complete_CTRL-E), while the 
following  will behave like expected (:h i_CTRL-E)

> -  call assert_equal(["December2015", "", "December2015"], getline(1,3))
> +  call assert_equal(["Dece", "", "December2015"], getline(1,3))

Looks good to me.


Best,
Christian
-- 
Autokraten lieben meist kleine Kinder. Sie schränken ihre Macht nicht
ein, dafür sind sie ihnen dankbar.
-- Ludwig Marcuse (Argumente und Rezepte)

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: setpos() behaves erratically at times

2016-09-22 Fir de Conversatie Christian Brabandt
Hi Axel!

On Do, 22 Sep 2016, Axel Bender wrote:

> The following image shows an erratical behavior of setpos() that I
> cannot explain. When calling setpos("'<", ...), setpos("'>", ...) for
> that matter, the behavior is OK for the first  calls to setpos().
> However, from a certain number of calls (cannot specify), or triggered
> by some event (that I do not know), setpos() behaves like shown in the
> attached image.
> 
> Any clues?
[getpos returning 21474833647 as column]

That happens, when you press e.g. '$' to make sure the cursor will be in 
the last column. That is not a bug, but an implementation detail, that 
happens to be visible to the user.

Best,
Christian
-- 
In der Bibel steht, daß wir 6 Tage Arbeiten und am 7. Ruhen sollen. Wo aber
steht, daß wir am 8. Tag wieder anfangen sollen zu arbeiten?

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


setpos() behaves erratically at times

2016-09-22 Fir de Conversatie Axel Bender
The following image shows an erratical behavior of setpos() that I cannot 
explain. When calling setpos("'<", ...), setpos("'>", ...) for that matter, the 
behavior is OK for the first  calls to setpos(). However, from a certain 
number of calls (cannot specify), or triggered by some event (that I do not 
know), setpos() behaves like shown in the attached image.

Any clues?

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Compilation of vim 8 with mingw on windows fails: diff.c:891:12: error: storage size of 'st' isn't known

2016-09-22 Fir de Conversatie Ken Takata
Hi,

2016/9/22 Thu 20:30:19 UTC+9 René Nyffenegger wrote:
> > 
> > Sure, you can modify vim.h and change size_T from _stat64 to stat and 
> > comment HAVE_STAT64,
> > 
> > this works for me
> > 
> > index a787575..308c9cd 100644
> > --- a/src/vim.h
> > +++ b/src/vim.h
> > @@ -2093,8 +2093,8 @@ typedef int VimClipboard; /* This is required for the 
> > prototypes. */
> > 
> >  /* Use 64-bit stat structure if available. */
> >  #if (defined(_MSC_VER) && (_MSC_VER >= 1300)) || defined(__MINGW32__)
> > -# define HAVE_STAT64
> > -typedef struct _stat64 stat_T;
> > +//# define HAVE_STAT64
> > +typedef struct stat stat_T;
> >  #else
> >  typedef struct stat stat_T;
> >  #endif
> 
> 
> Thank you very much, it worked.
> 
> I am wondering if something should be changed in the makefile or source code 
> so that other people compiling vim with mingw don't run into the same problem.

Isn't your MinGW a bit old? Which version from which site do you use?
Newer MinGW should have _stat64.
I recommend MinGW-w64.

Regards,
Ken Takata

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Compilation of vim 8 with mingw on windows fails: diff.c:891:12: error: storage size of 'st' isn't known

2016-09-22 Fir de Conversatie René Nyffenegger
> 
> Sure, you can modify vim.h and change size_T from _stat64 to stat and comment 
> HAVE_STAT64,
> 
> this works for me
> 
> index a787575..308c9cd 100644
> --- a/src/vim.h
> +++ b/src/vim.h
> @@ -2093,8 +2093,8 @@ typedef int VimClipboard; /* This is required for the 
> prototypes. */
> 
>  /* Use 64-bit stat structure if available. */
>  #if (defined(_MSC_VER) && (_MSC_VER >= 1300)) || defined(__MINGW32__)
> -# define HAVE_STAT64
> -typedef struct _stat64 stat_T;
> +//# define HAVE_STAT64
> +typedef struct stat stat_T;
>  #else
>  typedef struct stat stat_T;
>  #endif


Thank you very much, it worked.

I am wondering if something should be changed in the makefile or source code so 
that other people compiling vim with mingw don't run into the same problem. 

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: conflicts with in windows console vim (vim.exe), bug ?

2016-09-22 Fir de Conversatie Magnus Woldrich

Thanks, very disappointted with cmd.exe


Here you go: https://msys2.github.io/

--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups "vim_dev" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: conflicts with in windows console vim (vim.exe), bug ?

2016-09-22 Fir de Conversatie skywind3000
Marvin Renich wrote:
> * skywind3000  [160921 14:18]:
> >  has been mapped to something in my vimrc, which works fine in
> > win32-gvim/macvim and linux/mac terminal vim (with backspace set to
> > 127/ctrl-? )
> > 
> > but in windows console vim, mapping  will cause  unable to
> > work properly (it appears that backspace also get mapped),
> > 
> > After reading a lot of docs, I still can't figure out how to fix it .
> > 
> > Is that a bug ? or something misconfiguration ?
> > 
> > Can console  behave exactly in the same way like other platforms ?
> 
> , the ASCII character, is exactly Ctrl-h.  , the keyboard key,
> in a terminal emulator (windows console, i.e. cmd.exe, is a terminal
> emulator) sends to the program whatever the terminal emulator decides,
> which is usually , but sometimes  (the ASCII character).
> 
> Many terminal emulators allow you to configure this to some degree.
> Most terminal emulators use VT102 or VT220 key codes and escape
> sequences by default.  If you can configure the terminal emulator to
> send your own escape sequence, you can set the t_kb option to recognize
> it.  I am pretty sure that Vim will treat this escape sequence
> separately from Ctrl-h in mappings.
> 
> I don't know if you can get cmd.exe to send anything other than an ASCII
>  character.
> 
> ...Marvin

Thanks, very disappointted with cmd.exe

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Compilation of vim 8 with mingw on windows fails: diff.c:891:12: error: storage size of 'st' isn't known

2016-09-22 Fir de Conversatie skywind3000
Nyffenegger wrote:
> I am trying to compile vim 8 on Windows with mingw.
> 
> These are the steps I executed:
> 
> git clone https://github.com/vim/vim.git
> cd vim\src
> \mingw\bin\mingw32-make.exe -f Make_ming.mak ARCH=i686
> 
> The compilation of diff.c failes with the following error message:diff.c: In 
> function 'ex_diffpatch':
> diff.c:891:12: error: storage size of 'st' isn't known
> diff.c:891:12: warning: unused variable 'st' [-Wunused-variable]
> mingw32-make: *** [gobji686/diff.o] Error 1
> 
> Is there something I can do about it?
> 
> Thanks for any pointer.

Sure, you can modify vim.h and change size_T from _stat64 to stat and comment 
HAVE_STAT64,

this works for me

index a787575..308c9cd 100644
--- a/src/vim.h
+++ b/src/vim.h
@@ -2093,8 +2093,8 @@ typedef int VimClipboard; /* This is required for the 
prototypes. */

 /* Use 64-bit stat structure if available. */
 #if (defined(_MSC_VER) && (_MSC_VER >= 1300)) || defined(__MINGW32__)
-# define HAVE_STAT64
-typedef struct _stat64 stat_T;
+//# define HAVE_STAT64
+typedef struct stat stat_T;
 #else
 typedef struct stat stat_T;
 #endif


-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: highlighting text

2016-09-22 Fir de Conversatie LCD 47
On 21 September 2016, Markus Knecht  wrote:
> Hello,
>
> For a project I have to import some markings into vim and for that I'm
> writing a plugin.  These markings are in the form of:
>   line start, 
>   coloumn start, //the start character index
>   line end, 
>   coloumn end, //the end character index
>   message 
> 
> over the signs I have managed to mark the lines and display the
> message when the cursor is on the line. But now I need to highlight
> the characters, like a search does it when hlsearch is enabled, and
> the only thing i found is the matchadd() methode and commands like
> :match, but all of these work with a pattern. But i just need a
> straight forward mark exactly that mechanism which works on a line
> coloumn basis. I would much apriciate it if someone could point me in
> the right direction.

One way to do it:

function! HL(group, lstart, cstart, lend, cend)
if a:lstart > a:lend
return
elseif a:lstart == a:lend
call matchaddpos(a:group, [[a:lstart, a:cstart, a:cend - 
a:cstart + 1]])
else
call matchadd(a:group, printf('\%%%dl\%%>%dc', a:lstart, 
a:cstart - 1))
for line in range(a:lstart + 1, a:lend - 1)
call matchaddpos(a:group, [line])
endfor
call matchadd(a:group, printf('\%%%dl\%%<%dc', a:lend, a:cend + 
1))
endif
endfunction

/lcd

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Compilation of vim 8 with mingw on windows fails: diff.c:891:12: error: storage size of 'st' isn't known

2016-09-22 Fir de Conversatie René Nyffenegger
I am trying to compile vim 8 on Windows with mingw.

These are the steps I executed:

git clone https://github.com/vim/vim.git
cd vim\src
\mingw\bin\mingw32-make.exe -f Make_ming.mak ARCH=i686

The compilation of diff.c failes with the following error message:diff.c: In 
function 'ex_diffpatch':
diff.c:891:12: error: storage size of 'st' isn't known
diff.c:891:12: warning: unused variable 'st' [-Wunused-variable]
mingw32-make: *** [gobji686/diff.o] Error 1

Is there something I can do about it?

Thanks for any pointer.

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.