Re: col() in lines with apostrophe characters

2010-03-15 Fir de Conversatie ZyX
Ответ на сообщение «Re: col() in lines with apostrophe characters», присланное в 20:15:39 14 марта 2010, Воскресенье, отправитель Ingo Karkat: let len = strlen(substitute(str, ., x, g)) Never use this. It is three orders of magnitude slower than let len=len(split(str, '\zs')) You can

Re: col() in lines with apostrophe characters

2010-03-15 Fir de Conversatie Gregor Uhlenheuer
Am 14.03.2010 18:15, schrieb Ingo Karkat: On 14-Mar-2010 17:49, Gregor Uhlenheuer wrote: Hello, I think the col() function does not work properly for lines with apostrophe characters (`´). :echo col([line('.'), '$']) returns 6 on the line below: ´foo It should return 5 I think

Re: col() in lines with apostrophe characters

2010-03-15 Fir de Conversatie Ingo Karkat
On 15-Mar-2010 11:21, Gregor Uhlenheuer wrote: Since you nearly guessed my use of col() - I want to get the length of the current line - thank you for the tip with the substitution. I figured that using virtcol() is probably more appropriate for that purpose. Well, call it psychic debugging

Re: col() in lines with apostrophe characters

2010-03-15 Fir de Conversatie Ingo Karkat
On 15-Mar-2010 18:57, ZyX wrote: Ответ на сообщение Re: col() in lines with apostrophe characters, присланное в 20:15:39 14 марта 2010, Воскресенье, отправитель Ingo Karkat: let len = strlen(substitute(str, ., x, g)) Never use this. It is three orders of magnitude slower than let

col() in lines with apostrophe characters

2010-03-14 Fir de Conversatie Gregor Uhlenheuer
Hello, I think the col() function does not work properly for lines with apostrophe characters (`´). :echo col([line('.'), '$']) returns 6 on the line below: ´foo It should return 5 I think. Regards, Gregor Uhlenheuer -- You received this message from the vim_dev maillist. Do not top-post

Re: col() in lines with apostrophe characters

2010-03-14 Fir de Conversatie Ingo Karkat
On 14-Mar-2010 17:49, Gregor Uhlenheuer wrote: Hello, I think the col() function does not work properly for lines with apostrophe characters (`´). :echo col([line('.'), '$']) returns 6 on the line below: ´foo It should return 5 I think. It depends on the encoding of the apostrophe character