Re: Capture columns nummers of matches ending with double byte chars

2016-04-25 Thread Christian Brabandt
Hi rameo!

On Mo, 25 Apr 2016, rameo wrote:

> 
> > 
> > It is much better to download sources from https://github.com/vim/vim.
> > 
> 
> Found it:
> https://github.com/vim/vim-win32-installer/releases
> 
> However...
> Tried:
> gvim_7.4.1782_x86.exe
> gvim_7.4.1786_x86.exe
> 
> Both gives an error: 
> Error detected while processing vimrc_example.vim
> line 114:
> E919: Directory not found in 'packpath': "pack/*/opt/matchit"

Yes, your $VIMRUNTIME does not include the pack directory.
So, you need to install a new runtime. Check the zip file, it includes 
an updated runtime directory.


Best,
Christian
-- 
Falsche Vorstellung, dass man ein Phänomen durch Kalkül oder 
durch Worte abtun und beseitigen könne.
-- Goethe, Maximen und Reflektionen, Nr. 1004

-- 
-- 
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: strikethrough text in gvim

2016-04-25 Thread Christian Brabandt
Hi Ken!

On Mo, 25 Apr 2016, Ken Takata wrote:

> Hi Christian,
> 
> 2016/4/26 Tue 1:53:17 UTC+9 Christian Brabandt wrote:
> > Hi Ken!
> > 
> > On Do, 10 Mär 2016, Ken Takata wrote:
> > 
> > > Hi,
> > > 
> > > 2013/10/12 Sat 23:25:06 UTC+9 Ken Takata wrote:
> > > > Hi Christian,
> > > > 
> > > > 2013/07/31 Wed 4:56:39 UTC+9 Christian Brabandt wrote:
> > > > > Attached is a patch to try out. It seems to work for me with GTK
> > > > > and Motif Gui. I am a Unix gui and can't say for sure the code for
> > > > > Windows and Mac is actually correct and works, though.
> > > > 
> > > > I checked your patch on Windows. It works fine. I checked it with
> > > > the following process:
> > > > 
> > > > > gvim -N foo.html
> > > > :syn enable :syn region htmlStrike start="" end=""me=e-6
> > > > contains=@htmlTop :hi def htmlStrike term=strikethrough
> > > > cterm=strikethrough gui=strikethrough ifoo
> > > > 
> > > > 
> > > > > Secondly, I am unsure about the changes to term.c and term.h I
> > > > > don't know, if these changes are actually needed, so I simply took
> > > > > the undercurl code as an example and changed it so it would fit
> > > > > for strikethrough.
> > > > 
> > > > I think it is better to add term cap entries. Currently, termcap
> > > > doesn't support strikethrough attributes, so we have to use our own
> > > > attribute names. (E.g. 't_Ts'/'t_Te' or 't_SS'/'t_SE') I also think
> > > > that a new flag (e.g. 't' or 'S') should be added in the 'highlight'
> > > > option.
> > > > 
> > > > I and Hayaki Saito updated your patch to add them. After applying
> > > > this patch and setting escape sequences properly,
> > > > 
> > > > let &t_Ts="\e[9m" let &t_Te="\e[29m"
> > > > 
> > > > some terminals (*) will show strikethrough lines.
> > > > 
> > > > (*) RLogin: http://nanno.dip.jp/softlib/man/rlogin/ (Japanese)
> > > > pangoterm: https://launchpad.net/pangoterm/
> > > 
> > > I found that this patch cannot be used for GTK3, but I don't know how
> > > to fix it. I hope someone can fix this.
> > 
> > Seems like you did fix this with the latest version here:
> > https://bitbucket.org/k_takata/vim-ktakata-mq/src/9e19c0c57c4812557e7750629de02986249a5246/strikethrough.diff?fileviewer=file-view-default
> 
> I made a fix but I haven't tested it yet.
> 
> > Seems to work fine for me. Bram, I think this might be a nice addition 
> > for vim 8.
> 
> Thank you for checking.  Does it work both with GTK2 and GTK3?

,
| :syn region htmlStrike start=""ms=s+5 end=""me=e-6
| :hi def htmlStrike gui=strikethrough  term=strikethrough
| ifoobar
`

This works in GTK2 and GTK3 gui but I couldn't check the terminal, since 
I don't have a terminal that has this capability


Best,
Christian
-- 
Frauen sind das beste in dieser Art.
-- Curt Goetz

-- 
-- 
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Capture columns nummers of matches ending with double byte chars

2016-04-25 Thread rameo

> 
> It is much better to download sources from https://github.com/vim/vim.
> 

Found it:
https://github.com/vim/vim-win32-installer/releases

However...
Tried:
gvim_7.4.1782_x86.exe
gvim_7.4.1786_x86.exe

Both gives an error: 
Error detected while processing vimrc_example.vim
line 114:
E919: Directory not found in 'packpath': "pack/*/opt/matchit"

-- 
-- 
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: E254?

2016-04-25 Thread Christian Brabandt

Am 2016-04-26 05:10, schrieb meino.cra...@gmx.de:

Hi,

with the updates of yesterday (or the day before?) I got a lot of this
output, which wasn't there before:

line   16:
E254: Cannot allocate color none
E254: Cannot allocate color none
line   17:
E254: Cannot allocate color none
line   18:
E254: Cannot allocate color none
line   19:
E254: Cannot allocate color none
E254: Cannot allocate color none
line   20:
E254: Cannot allocate color none
E254: Cannot allocate color none
line   21:
E254: Cannot allocate color none
E254: Cannot allocate color none
line   22:
E254: Cannot allocate color none
line   23:
E254: Cannot allocate color none
line   24:
E254: Cannot allocate color none
E254: Cannot allocate color none
line   25:
E254: Cannot allocate color none
line   29:
E254: Cannot allocate color none
line   30:
E254: Cannot allocate color none
line   32:
E254: Cannot allocate color none
line   34:
E254: Cannot allocate color none
line   35:
E254: Cannot allocate color none
line   36:
E254: Cannot allocate color none
line   37:
E254: Cannot allocate color none
line   38:
E254: Cannot allocate color none
line   39:
E254: Cannot allocate color none
line   40:
E254: Cannot allocate color none
line   41:
E254: Cannot allocate color none
E254: Cannot allocate color none
line   42:
E254: Cannot allocate color none
line   43:
E254: Cannot allocate color none
E254: Cannot allocate color none
line   44:
E254: Cannot allocate color none
E254: Cannot allocate color none
line   45:
E254: Cannot allocate color none
line   46:
E254: Cannot allocate color none
line   47:
E254: Cannot allocate color none
E254: Cannot allocate color none
line   48:
E254: Cannot allocate color none

I didn't changed .vimrc and Co. ...

After spiiting out this, vim works fine...

How can I fix it?


Do you use the new guicolor setting? What colorscheme are you using?
Is the file rgb.txt in your $VIMRUNTIME available?

Best,
Christian

--
--
You received this message from the "vim_use" 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_use" group.

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


E254?

2016-04-25 Thread Meino . Cramer
Hi,

with the updates of yesterday (or the day before?) I got a lot of this
output, which wasn't there before:

line   16:
E254: Cannot allocate color none
E254: Cannot allocate color none
line   17:
E254: Cannot allocate color none
line   18:
E254: Cannot allocate color none
line   19:
E254: Cannot allocate color none
E254: Cannot allocate color none
line   20:
E254: Cannot allocate color none
E254: Cannot allocate color none
line   21:
E254: Cannot allocate color none
E254: Cannot allocate color none
line   22:
E254: Cannot allocate color none
line   23:
E254: Cannot allocate color none
line   24:
E254: Cannot allocate color none
E254: Cannot allocate color none
line   25:
E254: Cannot allocate color none
line   29:
E254: Cannot allocate color none
line   30:
E254: Cannot allocate color none
line   32:
E254: Cannot allocate color none
line   34:
E254: Cannot allocate color none
line   35:
E254: Cannot allocate color none
line   36:
E254: Cannot allocate color none
line   37:
E254: Cannot allocate color none
line   38:
E254: Cannot allocate color none
line   39:
E254: Cannot allocate color none
line   40:
E254: Cannot allocate color none
line   41:
E254: Cannot allocate color none
E254: Cannot allocate color none
line   42:
E254: Cannot allocate color none
line   43:
E254: Cannot allocate color none
E254: Cannot allocate color none
line   44:
E254: Cannot allocate color none
E254: Cannot allocate color none
line   45:
E254: Cannot allocate color none
line   46:
E254: Cannot allocate color none
line   47:
E254: Cannot allocate color none
E254: Cannot allocate color none
line   48:
E254: Cannot allocate color none

I didn't changed .vimrc and Co. ...

After spiiting out this, vim works fine...

How can I fix it?

Thank you very much in advance for any help!
Best regards,
Meino


-- 
-- 
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Capture columns nummers of matches ending with double byte chars

2016-04-25 Thread Nikolay Aleksandrovich Pavlov
2016-04-26 0:45 GMT+03:00 rameo :
> Op maandag 25 april 2016 22:26:27 UTC+2 schreef Ken Takata:
>> Hi rameo,
>>
>> 2016/4/23 Sat 21:37:15 UTC+9 rameo wrote:
>> > Searchpos() doesn't return the right end value of a match if the match end 
>> > with a double byte character (èéòìùá...). (encoding utf-8)
>> > Isn't this a bug
>>
>> You might misunderstand the spec of searchpos().
>> When the 'e' flag is specified, the cursor moves to the last character of
>> the match and searchpos() returns the position of the cursor.  It means
>> that the returned value is a byte index of start of the last character,
>> not the end of the character.
>>
>
> Hello Ken,
>
> thank you for your reply :)
>
> Just a question, why does someone need the byte index of the start of the 
> last character and not simply the end of the last character?
>
>>
>> > The last few years I used match/matchend then I noted that it did not 
>> > capture correctly double byte characters within the string.
>>
>> Can you show an example?
>> match()/matchend() return a byte offset, not a character count.
>>
>> FYI, matchstrpos() can be used to get both start and end position
>> after 7.4.1685.
>>
>>
>> Regards,
>> Ken Takata
>
> That's great news.
> I waited long for such a feature.
>
> Can you please send me the url of the site where the patches can be 
> downloaded?
> I can't find it anymore.

It is much better to download sources from https://github.com/vim/vim.

>
> --
> --
> You received this message from the "vim_use" 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_use" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to vim_use+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
-- 
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Capture columns nummers of matches ending with double byte chars

2016-04-25 Thread rameo
Op maandag 25 april 2016 22:26:27 UTC+2 schreef Ken Takata:
> Hi rameo,
> 
> 2016/4/23 Sat 21:37:15 UTC+9 rameo wrote:
> > Searchpos() doesn't return the right end value of a match if the match end 
> > with a double byte character (èéòìùá...). (encoding utf-8)
> > Isn't this a bug
> 
> You might misunderstand the spec of searchpos().
> When the 'e' flag is specified, the cursor moves to the last character of
> the match and searchpos() returns the position of the cursor.  It means
> that the returned value is a byte index of start of the last character,
> not the end of the character.
> 

Hello Ken,

thank you for your reply :)

Just a question, why does someone need the byte index of the start of the last 
character and not simply the end of the last character?

> 
> > The last few years I used match/matchend then I noted that it did not 
> > capture correctly double byte characters within the string.
> 
> Can you show an example?
> match()/matchend() return a byte offset, not a character count.
> 
> FYI, matchstrpos() can be used to get both start and end position
> after 7.4.1685.
> 
> 
> Regards,
> Ken Takata

That's great news.
I waited long for such a feature.

Can you please send me the url of the site where the patches can be downloaded?
I can't find it anymore.

-- 
-- 
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: strikethrough text in gvim

2016-04-25 Thread Ken Takata
Hi Christian,

2016/4/26 Tue 1:53:17 UTC+9 Christian Brabandt wrote:
> Hi Ken!
> 
> On Do, 10 Mär 2016, Ken Takata wrote:
> 
> > Hi,
> > 
> > 2013/10/12 Sat 23:25:06 UTC+9 Ken Takata wrote:
> > > Hi Christian,
> > > 
> > > 2013/07/31 Wed 4:56:39 UTC+9 Christian Brabandt wrote:
> > > > Attached is a patch to try out. It seems to work for me with GTK
> > > > and Motif Gui. I am a Unix gui and can't say for sure the code for
> > > > Windows and Mac is actually correct and works, though.
> > > 
> > > I checked your patch on Windows. It works fine. I checked it with
> > > the following process:
> > > 
> > > > gvim -N foo.html
> > > :syn enable :syn region htmlStrike start="" end=""me=e-6
> > > contains=@htmlTop :hi def htmlStrike term=strikethrough
> > > cterm=strikethrough gui=strikethrough ifoo
> > > 
> > > 
> > > > Secondly, I am unsure about the changes to term.c and term.h I
> > > > don't know, if these changes are actually needed, so I simply took
> > > > the undercurl code as an example and changed it so it would fit
> > > > for strikethrough.
> > > 
> > > I think it is better to add term cap entries. Currently, termcap
> > > doesn't support strikethrough attributes, so we have to use our own
> > > attribute names. (E.g. 't_Ts'/'t_Te' or 't_SS'/'t_SE') I also think
> > > that a new flag (e.g. 't' or 'S') should be added in the 'highlight'
> > > option.
> > > 
> > > I and Hayaki Saito updated your patch to add them. After applying
> > > this patch and setting escape sequences properly,
> > > 
> > > let &t_Ts="\e[9m" let &t_Te="\e[29m"
> > > 
> > > some terminals (*) will show strikethrough lines.
> > > 
> > > (*) RLogin: http://nanno.dip.jp/softlib/man/rlogin/ (Japanese)
> > > pangoterm: https://launchpad.net/pangoterm/
> > 
> > I found that this patch cannot be used for GTK3, but I don't know how
> > to fix it. I hope someone can fix this.
> 
> Seems like you did fix this with the latest version here:
> https://bitbucket.org/k_takata/vim-ktakata-mq/src/9e19c0c57c4812557e7750629de02986249a5246/strikethrough.diff?fileviewer=file-view-default

I made a fix but I haven't tested it yet.

> Seems to work fine for me. Bram, I think this might be a nice addition 
> for vim 8.

Thank you for checking.  Does it work both with GTK2 and GTK3?

Regards,
Ken Takata

-- 
-- 
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Capture columns nummers of matches ending with double byte chars

2016-04-25 Thread Ken Takata
Hi rameo,

2016/4/23 Sat 21:37:15 UTC+9 rameo wrote:
> Searchpos() doesn't return the right end value of a match if the match end 
> with a double byte character (èéòìùá...). (encoding utf-8)
> Isn't this a bug

You might misunderstand the spec of searchpos().
When the 'e' flag is specified, the cursor moves to the last character of
the match and searchpos() returns the position of the cursor.  It means
that the returned value is a byte index of start of the last character,
not the end of the character.


> The last few years I used match/matchend then I noted that it did not capture 
> correctly double byte characters within the string.

Can you show an example?
match()/matchend() return a byte offset, not a character count.

FYI, matchstrpos() can be used to get both start and end position
after 7.4.1685.


Regards,
Ken Takata

-- 
-- 
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: strikethrough text in gvim

2016-04-25 Thread Christian Brabandt
Hi Ken!

On Do, 10 Mär 2016, Ken Takata wrote:

> Hi,
> 
> 2013/10/12 Sat 23:25:06 UTC+9 Ken Takata wrote:
> > Hi Christian,
> > 
> > 2013/07/31 Wed 4:56:39 UTC+9 Christian Brabandt wrote:
> > > Attached is a patch to try out. It seems to work for me with GTK
> > > and Motif Gui. I am a Unix gui and can't say for sure the code for
> > > Windows and Mac is actually correct and works, though.
> > 
> > I checked your patch on Windows. It works fine. I checked it with
> > the following process:
> > 
> > > gvim -N foo.html
> > :syn enable :syn region htmlStrike start="" end=""me=e-6
> > contains=@htmlTop :hi def htmlStrike term=strikethrough
> > cterm=strikethrough gui=strikethrough ifoo
> > 
> > 
> > > Secondly, I am unsure about the changes to term.c and term.h I
> > > don't know, if these changes are actually needed, so I simply took
> > > the undercurl code as an example and changed it so it would fit
> > > for strikethrough.
> > 
> > I think it is better to add term cap entries. Currently, termcap
> > doesn't support strikethrough attributes, so we have to use our own
> > attribute names. (E.g. 't_Ts'/'t_Te' or 't_SS'/'t_SE') I also think
> > that a new flag (e.g. 't' or 'S') should be added in the 'highlight'
> > option.
> > 
> > I and Hayaki Saito updated your patch to add them. After applying
> > this patch and setting escape sequences properly,
> > 
> > let &t_Ts="\e[9m" let &t_Te="\e[29m"
> > 
> > some terminals (*) will show strikethrough lines.
> > 
> > (*) RLogin: http://nanno.dip.jp/softlib/man/rlogin/ (Japanese)
> > pangoterm: https://launchpad.net/pangoterm/
> 
> I found that this patch cannot be used for GTK3, but I don't know how
> to fix it. I hope someone can fix this.

Seems like you did fix this with the latest version here:
https://bitbucket.org/k_takata/vim-ktakata-mq/src/9e19c0c57c4812557e7750629de02986249a5246/strikethrough.diff?fileviewer=file-view-default

Seems to work fine for me. Bram, I think this might be a nice addition 
for vim 8.


Best,
Christian
-- 
Um sich von einer zu großen Liebe oder Duldsamkeit für etwas zu
heilen, muß man nicht die Feinde davon lesen, sondern die Freunde.
Lavater
-- Jean Paul

-- 
-- 
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Correct filename tag matching for ctlr-]

2016-04-25 Thread Enno
Le jeudi 21 avril 2016 16:47:10 UTC+2, kent schonert a écrit :
> I've created ctag using "ctags -R --extra=f"  to include an entry for the 
> base file name of every source file.  
> 
> When I use the ctrl-] goto tag shortcut on an include file, "IF_Recipe.h" for 
> example, ctrl-] will grab "IF_Recipe" w/o the extension and search for that 
> tag.  I would like it to search search for IF_Recipe.h or IF_RECIPE_H_ 
> instead.  
> 
> 
> tag file contents:
> 
> IF_Recipe.h   .\dirA\dirB\dirC\IF_Recipe.h1;" F
> IF_RECIPE_H_  .\dirA\dirB\dirC\IF_Recipe.h9;" d
> 
> Thanks in Advance,
> 
> -Kent

Hello Kent,

Might :h 'suffixesadd' help you?!

  Enno

-- 
-- 
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.