docker syntax files

2014-08-20 Fir de Conversatie Lokesh Mandvekar
Hi,

I was hoping syntax highlighting for docker could be included by default in
vim. The files can be found here:
https://github.com/docker/docker/tree/master/contrib/syntax/vim

Would the BSD license cause any trouble in this matter?

Thanks,
-- 
Lokesh


pgpeuXBUWT3pd.pgp
Description: PGP signature


Re: [Bulk] Re: Add count to :close and :hide commands

2014-08-20 Fir de Conversatie Christian Brabandt

Am 2014-08-20 19:03, schrieb 'Andy Wokula' via vim_dev:

Some people expect  :1,$bd  or :%bd  to delete all buffers.


That only works by accident, because your current buffer has
more lines than you have open buffers.

Or saying it differently, this does not work in an empty buffer.

So this expectation is not really valid.

Best,
Christian

--
--
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: [Bulk] Re: [patch] :undorecover command

2014-08-20 Fir de Conversatie Christian Brabandt

Am 2014-08-20 19:03, schrieb 'Andy Wokula' via vim_dev:

Am 16.08.2014 21:25, schrieb Christian Brabandt:

The command is named ":undorecover"?
Some places use ":undorecovery" (help, EMSG).


The command is called :undorecover, but the process of
doing so is undorecovery, isn't it?

Best,
Christian

--
--
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: {func} of sort()

2014-08-20 Fir de Conversatie mattn
About making list sorted by string of one of value.

echo "3" < "3 0"

This is TRUE, then:

echo MapSort([{"foo":{"bar": "3"}}, {"foo":{"bar": "3 0"}}], 
'v:val["foo"]["bar"]')

We expecet it should be kept:

[{"foo":{"bar": "3"}}, {"foo":{"bar": "3 0"}}]

But results are:

[{'foo': {'bar': '3 0'}}, {'foo': {'bar': '3'}}]

We need to escape string to avoid to handle index as value.
I don't want to need to provide this function in all plugins. Just want to get 
it in official sort function.

-- 
-- 
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: [patch] improper indentation with shell case statements (ft=sh)

2014-08-20 Fir de Conversatie Gary Johnson
As long as you're working on indent/sh.vim, would you please look at
fixing this, too?

{
echo this
}
(
echo that
)

The problem is that statements within parentheses are not indented.
They should be indented the same as statements within braces.

Regards,
Gary

-- 
-- 
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: Issue 250 in vim: Random US-International keyboard layout (dead keys) support

2014-08-20 Fir de Conversatie vim


Comment #7 on issue 250 by john.wel...@gmail.com: Random US-International  
keyboard layout (dead keys) support

http://code.google.com/p/vim/issues/detail?id=250

I came up with a much nicer solution that actually addresses the underlying  
issue and that decreases Vim's size^^


Besides this bug, dead key handling was not behaving like in other Windows  
application.


I spent some time understanding  
http://msdn.microsoft.com/en-us/library/windows/desktop/ms646267(v=vs.85).aspx#_win32_Dead_Character_Messages


So the solution is to reset dead_key as soon as any WM_CHAR is received and  
to _NOT_ do anything special if dead_key is set and the key being pressed  
is either VK_SPACE, VK_BACK or VK_ESCAPE in which case we just let WIndows  
generate its WM_CHAR: just one will be generated if it's VK_SPACE being  
pressed or two will be if it's either VK_BACK or VK_ESCPAE (the dead key +  
the VK_BACK or VK_ESCPAE)


My patch includes a detailed comment on the logic used

The fix is very simple and feels just right :)

Attachments:
0001-Fix-dead-key-handling-on-Windows-non-standard-behavi.patch  2.0 KB

--
You received this message because this project is configured to send all  
issue notifications to this address.

You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
--
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] Groovy regexp syntax highlighting in Vim 7.4

2014-08-20 Fir de Conversatie google
On Tuesday, September 17, 2013 2:05:48 PM UTC-4, rdolgushin wrote:
> For details see 
> http://stackoverflow.com/questions/18855809/groovy-syntax-highlighting-in-vim-7-4
> 
> Possible sollution: delete or comment this line  
> https://code.google.com/p/vim/source/browse/runtime/syntax/groovy.vim?r=22fa3049e9348a8ce556a3e5ba65c6f0a7aa6b4a#260

a slightly better (but incomplete) solution would be to change the line (260)
from
start='/[^/]'
to
start='/[^ /]'

this would treat something like (x / y)  as simple division ... but would not 
treat / xyzz/ as a groovy reg expr string ...  That is, groovy reg expr strings 
that do not start with a space are interpreted correctly, but ones that start 
with a space will not be highlighted

-- 
-- 
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: [Bulk] Re: [patch] :undorecover command

2014-08-20 Fir de Conversatie 'Andy Wokula' via vim_dev

Am 16.08.2014 21:25, schrieb Christian Brabandt:

The command is named ":undorecover"?
Some places use ":undorecovery" (help, EMSG).

--
Andy

--
--
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: [Bulk] Re: Add count to :close and :hide commands

2014-08-20 Fir de Conversatie 'Andy Wokula' via vim_dev

Am 10.08.2014 20:33, schrieb Marcin Szamotulski:

On 15:51 Sun 10 Aug , Bram Moolenaar wrote:


I wrote:


Marcin Szamotulski wrote:


I wrote a patch which adds [count] to :colse, :hide and ^Wc normal
command.  When given the window with window number [count] will be
closed/hidden.  Sometimes I want to close not the current window but
another one, this command let to do that without switching windows
without ^Ww normal command.


Nice idea.  I would find ":1close" and ":9close" the most useful,
closing the first and last window.  Looks like the code does take the
last window when the count is more than the number of windows.  This
isn't obvious in the documentation, adding these two as an example will
make them found quicker.  And perhaps :hide docs should refer to the
explanation of [count] in :close.

How about a test?


Thinking about this, it would also be very nice to be able to close the
next or previous window:

:+1close
:-1close

And there is this entry in the todo list:

Can't easily close the help window, like ":pc" closes the
preview window and ":ccl" closes the quickfix window.  Add
":hclose". (Chris Gaal)
Patch for :helpclose, Christian Brabandt, 2010 Sep 6.

Looks like I'm a bit behind including patches...


Here is the patch.  As a bonus:
 :$close " will close the last window
 :$-close " will close the penultimate window
 :.close  " the same as :close
 :%close, :/pattern/close, :*close, ... " will emit E16 error

There are probably a few other commands that could benefit with
a similar approach.

Best regards,
Marcin Szamotulski


Some people expect  :1,$bd  or :%bd  to delete all buffers.

--
Andy

--
--
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: {func} of sort()

2014-08-20 Fir de Conversatie 'Andy Wokula' via vim_dev

Am 19.08.2014 um 11:17 schrieb mattn:

Keys?  v:key is list index, it cannot contain spaces.
Spaces in values shouldn't matter.
Not sure what you mean.


I wonder this won't works correctly.

[{"a": "b"}, {"a b": ""}]


Guessing you want to sort by dict key:
:echo MapSort([{"a": "b"}, {"a b": ""}], 'keys(v:val)[0]')
[{'a': 'b'}, {'a b': ''}]

the following list is given to the sort() function:
:echo map([{"a": "b"}, {"a b": ""}], 'keys(v:val)[0]')
['a', 'a b']

actually within MapSort(), the index is appended:
['a 0', 'a b 1']

(not so nice, but) shouldn't make a difference for sort().

Sorting by dict value:
:echo MapSort([{"a": "b"}, {"a b": ""}], 'values(v:val)[0]')
[{'a b': ''}, {'a': 'b'}]

--
Andy

--
--
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: breakindent bug

2014-08-20 Fir de Conversatie Bram Moolenaar

Christian wrote:

> On Di, 19 Aug 2014, Bram Moolenaar wrote:
> 
> > Thanks.  Somehow for me appending _bug means you test for the bug to be
> > present :-).  We can just call it test_linebreak.  Oh, and keep them in
> > alphabetical order.  I started doing that recently.
> 
> Okay, how about that one (I added a small README.txt for the test 
> directory, that contains your remarks).

Thanks!


-- 
The 50-50-90 rule: Anytime you have a 50-50 chance of getting
something right, there's a 90% probability you'll get it wrong.

 /// 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: Issue 250 in vim: Random US-International keyboard layout (dead keys) support

2014-08-20 Fir de Conversatie vim


Comment #6 on issue 250 by christ.v...@coosto.com: Random US-International  
keyboard layout (dead keys) support

http://code.google.com/p/vim/issues/detail?id=250

Looks like a solution. Increases Vim's size by SIZEOF(MSG) again, though :-)

--
You received this message because this project is configured to send all  
issue notifications to this address.

You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
--
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: Issue 250 in vim: Random US-International keyboard layout (dead keys) support

2014-08-20 Fir de Conversatie vim


Comment #5 on issue 250 by john.wel...@gmail.com: Random US-International  
keyboard layout (dead keys) support

http://code.google.com/p/vim/issues/detail?id=250

I've found and fixed the problem. Here is a patch.

A custom MSG structure used for sending a fake VK_SPACE was declared  
locally before being used with TranslateMessage().


Solution: declare the MSG struct statically instead.



Attachments:
0001-Fix-possible-undefined-behavior-when-handling-non-al.patch  1.3 KB

--
You received this message because this project is configured to send all  
issue notifications to this address.

You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
--
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: Issue 250 in vim: Random US-International keyboard layout (dead keys) support

2014-08-20 Fir de Conversatie vim


Comment #4 on issue 250 by chrisbr...@googlemail.com: Random  
US-International keyboard layout (dead keys) support

http://code.google.com/p/vim/issues/detail?id=250

Can you try, if building without optimiziations fixes your issue as well?

--
You received this message because this project is configured to send all  
issue notifications to this address.

You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
--
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: breakindent bug

2014-08-20 Fir de Conversatie Christian Brabandt

On Di, 19 Aug 2014, Bram Moolenaar wrote:

> Thanks.  Somehow for me appending _bug means you test for the bug to be
> present :-).  We can just call it test_linebreak.  Oh, and keep them in
> alphabetical order.  I started doing that recently.

Okay, how about that one (I added a small README.txt for the test 
directory, that contains your remarks).

Best,
Christian
-- 

-- 
-- 
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/charset.c b/src/charset.c
--- a/src/charset.c
+++ b/src/charset.c
@@ -1195,10 +1195,7 @@ win_lbr_chartabsize(wp, line, s, col, he
 	if (wp->w_p_bri)
 		added += get_breakindent_win(wp, line);
 
-	if (tab_corr)
-		size += (added / wp->w_buffer->b_p_ts) * wp->w_buffer->b_p_ts;
-	else
-		size += added;
+	size += added;
 	if (col != 0)
 		added = 0;
 	}
diff --git a/src/testdir/Make_amiga.mak b/src/testdir/Make_amiga.mak
--- a/src/testdir/Make_amiga.mak
+++ b/src/testdir/Make_amiga.mak
@@ -39,6 +39,7 @@ SCRIPTS = test1.out test3.out test4.out 
 		test_autoformat_join.out \
 		test_breakindent.out \
 		test_changelist.out \
+		test_correct_linebreak.out \
 		test_eval.out \
 		test_insertcount.out \
 		test_listlbr.out \
diff --git a/src/testdir/Make_dos.mak b/src/testdir/Make_dos.mak
--- a/src/testdir/Make_dos.mak
+++ b/src/testdir/Make_dos.mak
@@ -38,6 +38,7 @@ SCRIPTS =	test3.out test4.out test5.out 
 		test_autoformat_join.out \
 		test_breakindent.out \
 		test_changelist.out \
+		test_correct_linebreak.out \
 		test_eval.out \
 		test_insertcount.out \
 		test_listlbr.out \
diff --git a/src/testdir/Make_ming.mak b/src/testdir/Make_ming.mak
--- a/src/testdir/Make_ming.mak
+++ b/src/testdir/Make_ming.mak
@@ -58,6 +58,7 @@ SCRIPTS =	test3.out test4.out test5.out 
 		test_autoformat_join.out \
 		test_breakindent.out \
 		test_changelist.out \
+		test_correct_linebreak.out \
 		test_eval.out \
 		test_insertcount.out \
 		test_listlbr.out \
diff --git a/src/testdir/Make_os2.mak b/src/testdir/Make_os2.mak
--- a/src/testdir/Make_os2.mak
+++ b/src/testdir/Make_os2.mak
@@ -40,6 +40,7 @@ SCRIPTS = test1.out test3.out test4.out 
 		test_autoformat_join.out \
 		test_breakindent.out \
 		test_changelist.out \
+		test_correct_linebreak.out \
 		test_eval.out \
 		test_insertcount.out \
 		test_listlbr.out \
diff --git a/src/testdir/Make_vms.mms b/src/testdir/Make_vms.mms
--- a/src/testdir/Make_vms.mms
+++ b/src/testdir/Make_vms.mms
@@ -99,6 +99,7 @@ SCRIPT = test1.out  test2.out  test3.out
 	 test_autoformat_join.out \
 	 test_breakindent.out \
 	 test_changelist.out \
+	 test_correct_linebreak.out \
 	 test_eval.out \
 	 test_insertcount.out \
 	 test_listlbr.out \
diff --git a/src/testdir/Makefile b/src/testdir/Makefile
--- a/src/testdir/Makefile
+++ b/src/testdir/Makefile
@@ -36,6 +36,7 @@ SCRIPTS = test1.out test2.out test3.out 
 		test_autoformat_join.out \
 		test_breakindent.out \
 		test_changelist.out \
+		test_correct_linebreak.out \
 		test_eval.out \
 		test_insertcount.out \
 		test_listlbr.out \
diff --git a/src/testdir/README.txt b/src/testdir/README.txt
new file mode 100644
--- /dev/null
+++ b/src/testdir/README.txt
@@ -0,0 +1,8 @@
+This directory contains tests for various Vim features.
+
+If possible, try to add new tests to already existing files.
+
+To add new tests:
+1) Create test_.in and test_.ok files
+2) add them to all Makefiles (Make*) in alphabetical order
+3) use make test_.out to run a single test file
diff --git a/src/testdir/test_correct_linebreak.in b/src/testdir/test_correct_linebreak.in
new file mode 100644
--- /dev/null
+++ b/src/testdir/test_correct_linebreak.in
@@ -0,0 +1,22 @@
+Test for breakindent
+
+" Test, that the string "a\tb\tc\td\te" is correctly
+" displayed in a 20 column wide window (see bug report
+" https://groups.google.com/d/msg/vim_dev/ZOdg2mc9c9Y/TT8EhFjEy0IJ
+
+STARTTEST
+:so small.vim
+:if !exists("+breakindent") | e! test.ok | w! test.out | qa! | endif
+:20vsp
+:set breakindent
+:/^\s*a
+fbgjyl
+:$put =@0
+:?^\s*z
+fygjyl
+:$put =@0
+:w! test.out
+:qa!
+ENDTEST
+a	b	c	d	e
+z   y   x   w   v
diff --git a/src/testdir/test_correct_linebreak.ok b/src/testdir/test_correct_linebreak.ok
new file mode 100644
--- /dev/null
+++ b/src/testdir/test_correct_linebreak.ok
@@ -0,0 +1,24 @@
+Test for breakindent
+
+" Test, that the string "a\tb\tc\td\te" is correctly
+" displayed in a 20 column wide window (see bug report
+" https://groups.google.com/d/msg/vim_dev/ZOdg2mc9c9Y/TT8EhFjEy0IJ
+
+STARTTEST
+:so small.vim
+:if !exists("+breakindent") | e! test.ok | w! test.out | qa! | en