It works well with .*$ in order to substitute and get first backward
reference.
^..\(.\{-}\)\s\+\d\+\.\d\+.\{,20} needed to add .*$
Thank you.
Le jeudi 10 octobre 2019 17:19:25 UTC+2, Andy Wokula a écrit :
>
> Am 10.10.2019 um 10:44 schrieb Ni Va:
> > Don't understand why it returns 2 first
Am 10.10.2019 um 10:44 schrieb Ni Va:
Don't understand why it returns 2 first chars on this example :
+ 20191009_191004_Vim.8.1.2125/
4.0 KiB [D] 2019-10-
echo substitute(getline(line('.')),'^..\zs\(.\+
Don't understand why it returns 2 first chars on this example :
+ 20191009_191004_Vim.8.1.2125/
4.0 KiB [D] 2019-10-
echo
substitute(getline(line('.')),'^..\zs\(.\+\)\(\s\+\d\+\.\d\+\)\@=.*$','\1',
"")
Am 09.10.2019 um 14:16 schrieb Ni Va:
Anything chars contained in windows'filename before a lot of spaces
and begining on third char after start of line.
Anything chars of filename= \w\s-_. many times
^..filenamesome others chars.*$
/^..\zs.\+$
List of
Anything chars contained in windows'filename before a lot of spaces and
begining on third char after start of line.
Anything chars of filename= \w\s-_. many times
^..filenamesome others chars.*$
Thank you
Le mercredi 9 octobre 2019 14:09:25 UTC+2, aro...@vex
> Here is a kind of filename in fat chars that I would like to recognize:
>
> * $FOOBBBAR_Ffbar_f_oobar_(2019-07-29) - Copie.zed.lnk*
> 232.0 KiB 2019
There's a practically infinite universe of expressions that could be made
to match it. What's distinctiv
Hi,
Here is a kind of filename in fat chars that I would like to recognize:
* $FOOBBBAR_Ffbar_f_oobar_(2019-07-29) - Copie.zed.lnk*
232.0 KiB 2019
Thank you
--
--
You received this message from the "vim_use" maillist.
Do not top-post!
On 29/10/2017 19:45, Dominique Pellé wrote:
Lifepillar wrote:
I might be missing something trivial, but I need others's
eyes to look at it. Why are these patterns
:echo match('x', "[)-~]")
:echo match('x', "[(-~]")
:echo match('x', "[(->]")
:echo match('x', "[)->]")
matching? It seems they m
Lifepillar wrote:
> I might be missing something trivial, but I need others's
> eyes to look at it. Why are these patterns
>
> :echo match('x', "[)-~]")
> :echo match('x', "[(-~]")
> :echo match('x', "[(->]")
> :echo match('x', "[)->]")
>
> matching? It seems they match any character.
>
> Thanks,
I might be missing something trivial, but I need others's
eyes to look at it. Why are these patterns
:echo match('x', "[)-~]")
:echo match('x', "[(-~]")
:echo match('x', "[(->]")
:echo match('x', "[)->]")
matching? It seems they match any character.
Thanks,
Life.
--
--
You received this messag
On Thursday, July 3, 2014 12:38:04 AM UTC-5, Silas Silva wrote:
> insert a "\\|" it stops to interpret it:
>
>
>
> set formatlistpat=\\(\\a\\|\\d\\)\\.
>
>
>
> This doesn't work.
>
YOu escaped just the '\' character. You also need to escape the '|' character
to prevent it being used as a c
Hi all!
After discovering great formatlistpat I started to play with, increasing
it with my needs. But I found a problem regarding atoms, specifically
the or operator (|) of them. See this problem:
set formatlistpat=\\(\\a\\d\\)\\.
This formatlistpat works for lists like "a2." "b7." and so on,
==
> > > Result of re=1: Thisis[atest.
> > > Result of re=0: Thisistest.
> > > =
est.
> > ==*
> > Both of these regexp engines have the same result if the following
> command
> > line is used:-)*
> >
> --
> Thisis[atest.
> =
> Result of re=1: Thisis[atest.
> Result of re=0: Thisistest.
> ==*
> Both of these regexp engines have the same result
William Fugh wrote:
> Version: 7.4, gVim, MS-DOS/MS-Windows
> =
> :%s#\[\(com\|ref\|ex\|p\|i\|u\|s\|b\)\]\zs\s\+\|\s\+\ze\[/\(com\|ref\|ex\|p\|i\|u\|s\|b\)\]\|[({]\zs\s\+\|\s\+\ze[)}]\|\s\zs\s\+\|\s\+\ze[,;.]\([^.,;]\)##g
> --
.
=
Result of re=1: Thisis[atest.
Result of re=0: Thisistest.
==*
Both of these regexp engines have the same result if the following command
line is used
On Jul 30, 2013 7:26 PM, "Erik Christiansen"
wrote:
>
> On 30.07.13 07:41, Ben Fritz wrote:
> > The OP specifically said that valid decimals are "in the form 1.0D0,
> > or more precisely \d\+\.\d\+D\d\+" so I didn't try stuff like "123."
> > or ".123".
>
> Wot ... just trust the problem specificat
On 30.07.13 07:41, Ben Fritz wrote:
> The OP specifically said that valid decimals are "in the form 1.0D0,
> or more precisely \d\+\.\d\+D\d\+" so I didn't try stuff like "123."
> or ".123".
Wot ... just trust the problem specification? OK, the OP might be a
mathematician or engineer, since fortra
On 30.07.13 10:25, Charles Campbell wrote:
> Erik Christiansen wrote:
> >123 123.0 123. 456 0.123 .123 789
> Try...
> /\<-\=[0-9]\+\ze\_s
That fails here, also matching the fractional parts of the non-integers.
The tweak of Ben Fritz's regex, on his second thread on this topic,
seems to perform be
On Tuesday, July 30, 2013 9:27:51 AM UTC-5, Erik Christiansen wrote:
> On 30.07.13 06:57, Ben Fritz wrote:
>
> > Maybe better using "very magic":
>
>
>
> Everything's better with \v ;-)
>
>
Yes. I occasionally edit portions of my .vimrc where I didn't used it, and
wonder why.
>
> > \v<\
On 30.07.13 06:57, Ben Fritz wrote:
> Maybe better using "very magic":
Everything's better with \v ;-)
> \v<\d+>\.@!
On the test line:
123 123.0 123. 456 0.123 .123 789
that regex also detects the fractional parts as integers, so it still
needs a tweak. This seems to do it:
/\v\.@\.@!
But
Erik Christiansen wrote:
123 123.0 123. 456 0.123 .123 789
Try...
/\<-\=[0-9]\+\ze\_s
Regards,
Chip Campbell
--
--
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
On Tuesday, July 30, 2013 4:15:37 AM UTC-5, kilter wrote:
> I have a fortran program in which there are two sorts of numbers, integers
> which are simply digits not followed by a period, and double precision
> numbers in the form 1.0D0, or more precisely \d\+\.\d\+D\d\+ I would like to
> search
> > I have a fortran program in which there are two sorts of numbers,
>
> > integers which are simply digits not followed by a period, and double
>
> > precision numbers in the form 1.0D0, or more precisely \d\+\.\d\+D\d\+ I
> > would like to search for the former, avoiding the latter.
>
> >
On 30.07.13 10:18, RICHARD PITMAN wrote:
> Apologies if this is a re-post, I think the first went to the wrong address...
>
> I have a fortran program in which there are two sorts of numbers,
> integers which are simply digits not followed by a period, and double
> precision numbers in the form 1.
On 11:37 Tue 30 Jul , Davido wrote:
> RICHARD PITMAN wrote, on mar 30 jui 10:18 :
>
> > Apologies if this is a re-post, I think the first went to the wrong
> > address...
> >
> > I have a fortran program in which there are two sorts of numbers,
> > integers which are simply digits not foll
RICHARD PITMAN wrote, on mar 30 jui 10:18 :
> Apologies if this is a re-post, I think the first went to the wrong address...
>
> I have a fortran program in which there are two sorts of numbers,
> integers which are simply digits not followed by a period, and double
> precision numbers in the
Apologies if this is a re-post, I think the first went to the wrong address...
I have a fortran program in which there are two sorts of numbers,
integers which are simply digits not followed by a period, and double
precision numbers in the form 1.0D0, or more precisely \d\+\.\d\+D\d\+ I would
l
I have a fortran program in which there are two sorts of numbers, integers
which are simply digits not followed by a period, and double precision numbers
in the form 1.0D0, or more precisely \d\+\.\d\+D\d\+ I would like to search for
the former, avoiding the latter. Any suggestions gratefully re
Hi. Has anyone got statistics on how the two regexp engines compare? I
mean, the new engine was supposed to be faster, but I've seen a number
of patches since then helping cases when it was much slower; in addition
it seems to suffers from a number of bugs (one of which, with
particu
On 18.06.13 18:05, Paul Isambert wrote:
> Mapping “/” to “/\v” (and, slightly more difficult, “:s/” to “:s/\v”)
> is something I’ve thought abouth doing many times but have never done,
> for some reason.
Now that's a darned good idea!
> I wish there were a “verymagic” option by default, I would h
at the end of the string.
Yes. My question simply was: is it consistent to optimize only at the
end?
> > As far as I’m concerned, I find the Perl way quite counter-intuitive,
> > but what I’m interested in here is whether VimL is consistent or not.
> > I.e., shouldn’t it work clear
ther?
You came up with the concept of "ϵ", you fix its limitations. :)
My conclusion to the above comparison is that Vim should apply the
same optimisation in full, that is, kill the empty matches that touch
the beginning of another match. As far as I can tell, that would be
safe
Erik Christiansen a écrit:
> On 18.06.13 14:51, Paul Isambert wrote:
> > The “*” operator should be banned, then!
>
> Does the problem with matching empty strings arise from using "*" when
> "+" should be used instead? You are presumably aware that¹:
>
> * = 0 or more of the preceding atom.
> +
On Tuesday, June 18, 2013 7:51:06 AM UTC-5, Paul Isambert wrote:
>
> > Doing substitutions with a pattern that matches the empty string is
>
> > not useful, in real editing tasks it's not what is wanted. One is
>
> > always trying to match *something*.
>
>
>
> The “*” operator should be bann
On 18.06.13 14:51, Paul Isambert wrote:
> The “*” operator should be banned, then!
Does the problem with matching empty strings arise from using "*" when
"+" should be used instead? You are presumably aware that¹:
* = 0 or more of the preceding atom.
+ = 1 or more of the preceding atom.
Thus "(a
John Little a écrit:
> On Tuesday, June 18, 2013 11:19:43 PM UTC+12, Paul Isambert wrote:
>
> > I.e., shouldn’t it work clearly one way or the other?
>
> I don't understand this "interspersed empty substrings" way of
> looking at regexes; I suspect that it doesn't make sense some of the
> time,
On Tuesday, June 18, 2013 11:19:43 PM UTC+12, Paul Isambert wrote:
> I.e., shouldn’t it work clearly one way or the other?
I don't understand this "interspersed empty substrings" way of looking at
regexes; I suspect that it doesn't make sense some of the time, and is not
useful, but my suspici
Sorry, this
> print re.sub(re.compile('(a*)'), '(\\1)', 'abc')
should be
print re.sub(re.compile('([ac]*)'), '(\\1)', 'abc')
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, vi
Hello all,
The following issue has been recently discussed on the Lua mailing list:
http://lua-users.org/lists/lua-l/2013-04/msg00812.html
(It has also been independantly raised on the LuaTeX list:
http://tug.org/pipermail/luatex/2013-June/004418.html)
If I understand correctly, any string can b
v0.2 is out!
Am 19.12.2012 20:48, schrieb Christian Brabandt:
On Mi, 19 Dez 2012, Christian Brabandt wrote:
:ExplainPattern *
if the pattern is in the clipboard)
(needless to say: suggestions welcome)
Very nice.
Some observations:
You already parse \v \V \m and \M
but then you shoul
On Mi, 19 Dez 2012, Christian Brabandt wrote:
> > :ExplainPattern *
> > if the pattern is in the clipboard)
> >
> > (needless to say: suggestions welcome)
>
> Very nice.
Some observations:
You already parse \v \V \m and \M
but then you should also output the meaning of those atoms
:%>l doe
Hi Andy!
On Mi, 19 Dez 2012, Andy Wokula wrote:
> looks better with color, see
> http://www.vim.org/scripts/script.php?script_id=4364
>
> happy vimming :-)
>
> (or just
> :ExplainPattern *
> if the pattern is in the clipboard)
>
> (needless to say: suggestions welcome)
Very nice.
Mit fre
...
>
> > Now we have automatic explanation of such patterns:
> >
> > :ExplainPattern
> \c<\s*a\s\+href\s*=\(['"]\)\(\%(\1\@![^/]\)\+\)\1\s*>\([^<]*\)<
> >
> > Pattern: \c<\s*a\s\+href\s*=\(['"]\)\(\%(\1\@![^/]\)\+\)\1\s*>\([^<]*\)<
> ...
> > http://www.vim.org/scripts/script.php?script_id=4364
On 12/19/12 08:44, Cesar Romani wrote:
> On 18/12/2012 10:58 p.m., Tim Chase wrote:
>> function! WriteShortcut(whole, name, url)
>>call writefile(['[InternetShortcut]', 'URL='.(a:url), ''],
>> (a:name).'.txt')
>>return a:whole
>> endfunction
>
> Thanks, it works fine. If the name contained
On 12/19/12 10:46, Andy Wokula wrote:
> Am 19.12.2012 04:58, schrieb Tim Chase:
>> %s/\c<\s*a\s\+href\s*=\(['"]\)\(\%(\1\@![^/]\)\+\)\1\s*>\([^<]*\)> submatch(3), submatch(2))/g
>
> Now we have automatic explanation of such patterns:
>
> :ExplainPattern
> \c<\s*a\s\+href\s*=\(['"]\)\(\%(\1\@![^/
Am 19.12.2012 04:58, schrieb Tim Chase:
%s/\c<\s*a\s\+href\s*=\(['"]\)\(\%(\1\@![^/]\)\+\)\1\s*>\([^<]*\)
Now we have automatic explanation of such patterns:
:ExplainPattern \c<\s*a\s\+href\s*=\(['"]\)\(\%(\1\@![^/]\)\+\)\1\s*>\([^<]*\)<
Pattern: \c<\s*a\s\+href\s*=\(['"]\)\(\%(\1\@![^/]\)\+\)
On 18/12/2012 10:58 p.m., Tim Chase wrote:
> On 12/18/12 20:36, Cesar Romani wrote:
>> If I have the following line:
>> http://www.whatever.com";>SomeTitle
>>
>> How to create the file SomeTitle.txt with the content (without the
>> dashes):
>>
>> [InternetShortcut]
>> URL=http
On 12/18/12 20:36, Cesar Romani wrote:
> If I have the following line:
> http://www.whatever.com";>SomeTitle
>
> How to create the file SomeTitle.txt with the content (without the
> dashes):
>
> [InternetShortcut]
> URL=http://www.whatever.com
>
The other
On Tue, Dec 18, 2012 at 10:23 PM, John Beckett wrote:
> :s##[InternetShortcut]\rURL=\1#
>
Unless I am missing something you probably meant this. notice the > in the
middle of the string next to the "
:s#.\{-}#[InternetShortcut]\rURL=\1#
--
You received this message from the "vim_use" maillist.
Cesar Romani wrote:
> If I have the following line:
> http://www.whatever.com";>SomeTitle
>
> How to create the file SomeTitle.txt with the content (without the
> dashes):
>
> [InternetShortcut]
> URL=http://www.whatever.com
>
With the cursor on the line,
If I have the following line:
http://www.whatever.com";>SomeTitle
How to create the file SomeTitle.txt with the content (without the
dashes):
[InternetShortcut]
URL=http://www.whatever.com
Many thanks in advance,
--
Cesar
--
You received this message f
On Tuesday, 14 February, 2012 at 20:55:35 GMT, Eldar Yusupov wrote:
Also, in case if regexp did not match I'd like to highlight the part
of regexp which started matching prevention.
I can't answer your other questions, but for this I usually enable incsearch,
then either start co
Hi,
Is it possible to make VIM highlight defferently each group in the
regexp matched text?
Even more cool would be to highlight the regexp group at the command
line with the same colors, so it's easy to associate regexp groups and
their matched text.
Also, in case if regexp did not matc
On Dec 30, 5:06 pm, Ben Fritz wrote:
>
> > g:// delete
>
> I honestly cannot say why this would work for you. It certainly does
> not "work" for me, at least not in the way you seem to expect it to.
>
> I assume you meant :g// delete, which I tested, and it
> only deleted the first line, as
On Dec 30, 9:47 am, Fernando Basso wrote:
> Suppose I have:
>
> ?
>
> This works:
>
> g:// delete
>
I honestly cannot say why this would work for you. It certainly does
not "work" for me, at least not in the way you seem to expect it to.
I assume you meant :g// delete, which I tested, and
Suppose I have:
?
This works:
g:// delete
But why isn't
:g/
I have file a file full of lines starting with #, sometimes a single
line, sometimes multiple lines. They are followed by a snippet of
code. Here's part of such a file:
http://pastebin.com/w7zL45GM
I want to to insert and before and after vim paragraphs in
paragraphs that start with #. So far
Reply to message «Re: LOCALE settings and regexp classes»,
sent 15:49:23 14 December 2010, Tuesday
by GoteGuru:
> I've already tried [[:alpha:]] (not working), but \i and \k works like
> a charm. Thank you very much.
[:...:] classes does not work with unicode, only with ASCII.
>
> You can try using [[:alpha:]] or \i or \k.
> See :help whitespace, note the remark just above that.
I've already tried [[:alpha:]] (not working), but \i and \k works like
a charm. Thank you very much.
However its a bit strange 'cause \i should be used environment
variable checking, where natio
néz".
>
> Am I miss some setting or this cannot be done?
>
> While googling I found that range expression [a-z] is not well defined
> in different regexp implementations. I think thats ok, but vim
> should be *intuitive* and even if [a-z] not defined, vim should use the
>
this cannot be done?
While googling I found that range expression [a-z] is not well defined
in different regexp implementations. I think thats ok, but vim
should be *intuitive* and even if [a-z] not defined, vim should use the
local collation. (It does not).
Ok, I thought, there are no wonders, l
weird if turned on, but that is not important at
all here, goal is to find a line quickly in a huge file.
Once again, thank you very much.
Have a nice day,
Peter
2010/1/4 Matt Wozniski
> On Mon, Jan 4, 2010 at 1:12 PM, Tim Chase wrote:
> >> I am trying to put together a regexp to fi
Hi Matt!
On Mo, 04 Jan 2010, Matt Wozniski wrote:
> On Mon, Jan 4, 2010 at 1:12 PM, Tim Chase wrote:
> >> I am trying to put together a regexp to find pieces of text within one
> >> line,
> >> but I do not know their order.
> ...
> >> Also, best
On Mon, Jan 4, 2010 at 1:12 PM, Tim Chase wrote:
>> I am trying to put together a regexp to find pieces of text within one line,
>> but I do not know their order.
...
>> Also, best if it would be flexible enough to support arbitrary number of
>> samples without much t
> I am trying to put together a regexp to find pieces of text within one line,
> but I do not know their order.
>
> So far,
> /^.*sample1\|sample2.*sample2\|sample1
Given the lower priority of "\|" in parsing this is
1) any line containing "sample1"
2) or an
Hello VimWorld,
first, a Happy New Year to this wonderful list.
...but I have a problem, maybe you can help.
I am trying to put together a regexp to find pieces of text within one line,
but I do not know their order.
So far,
/^.*sample1\|sample2.*sample2\|sample1
is my best bet but I am still
Warning: this reply is in UTF-8.
On 20/08/09 15:47, Brian Anderson wrote:
>
> I'm interested in learning how to use regular expressions in Vi(m) to
> search for Unicode code points.
>
> In a book about regexp, it describes how to search for Unicode code
> points by various
Hi,
Brian Anderson wrote:
> I read through the help files on /\%u, but now I have a question about
> searching for composing or combining characters.
>
> I have a Cyrillic text, using UTF-8 as the encoding, and the characters
> are appearing correctly on the screen.
>
> When I select a chara
I read through the help files on /\%u, but now I have a question about
searching for composing or combining characters.
I have a Cyrillic text, using UTF-8 as the encoding, and the characters
are appearing correctly on the screen.
When I select a character and press ga, it gives me the decimal
Thanks Dennis & Jurgen,
I thought it was probably in the help files, but I couldn't find it.
Brian
--~--~-~--~~~---~--~~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~--~~~
Am 20.08.2009 15:47, Brian Anderson schrieb:
> I'm interested in learning how to use regular expressions in Vi(m) to
> search for Unicode code points.
>
> In a book about regexp, it describes how to search for Unicode code
> points by various means, and for various p
Hi,
Brian Anderson wrote:
> I'm interested in learning how to use regular expressions in Vi(m) to
> search for Unicode code points.
>
> In a book about regexp, it describes how to search for Unicode code
> points by various means, and for various programming lang
I'm interested in learning how to use regular expressions in Vi(m) to
search for Unicode code points.
In a book about regexp, it describes how to search for Unicode code
points by various means, and for various programming languages.
The book describes searching for a specific Unicode
atch
> syntax keyword myTag Mon Tue Wed
>
> regards,
> Peter
>
> --- On Mon, 17/8/09, Arco wrote:
>
>
>
> > From: Arco
> > Subject: Syntax Highlighting / Regexp
> > To: "vim_use"
> > Received: Monday, 17 August, 2009, 2:07 PM
>
&
Arco
> Subject: Syntax Highlighting / Regexp
> To: "vim_use"
> Received: Monday, 17 August, 2009, 2:07 PM
>
> I'm setting up syntax highlighting for a custom file
> type. Everything
> works great except this regexp:
>
> syntax match myTag /Mon|
On Sun, 16 Aug 2009, Arco wrote:
>
> I'm setting up syntax highlighting for a custom file type. Everything
> works great except this regexp:
>
> syntax match myTag /Mon|Tue|Wed/
>
> 'myTag' is supposed to match "Mon" or "Tue" or &
I'm setting up syntax highlighting for a custom file type. Everything
works great except this regexp:
syntax match myTag /Mon|Tue|Wed/
'myTag' is supposed to match "Mon" or "Tue" or "Wed" - but it won't
work.
My workaround is to have th
nd got the first number
> and timestamp via syn match, but then thought there is probably an easier way
> to do regexp tagging on the fields based on the delimeter character, but I
> can't seem to figure out the regexp syntax.
>
> 1 | timestamp | 001| text4 | text5 | text6 | te
Keith Kaple schrieb:
> Ok, I give up ;-)
>
> I'm trying to write a syntax file for a "pipe" delimeted file, lines
> look something like the example below. I started off ok and got the
> first number and timestamp via syn match, but then thought there is
> pr
as interpreted as "or" but not sure if that is correct in this
> flavor of regexp.
Close. You need to use \+ as quantifier for 1 or more occurrences of the
previous atom. See help /\+
So this should match:
syn match FieldFour "^[^|]\+|[^|]\+|[^|]\+|[^|]\+|"
Note however tha
Ok, I give up ;-)
I'm trying to write a syntax file for a "pipe" delimeted file, lines look
something like the example below. I started off ok and got the first number
and timestamp via syn match, but then thought there is probably an easier way
to do regexp tagging on the
Maxim Kim wrote:
> On 7 апр, 02:58, Brett Stahlman wrote:
>> Use a look-behind assertion...
>> \%(||\)\@<=
>> ...instead of...
>> ||\zs
>>
>
> Thanks a lot!
> I thought that using \zs is the same as \@<= (as written in the :help /
> \@<= ).
The difference is that the portion of the pattern to
On 7 апр, 02:58, Brett Stahlman wrote:
> Use a look-behind assertion...
> \%(||\)\@<=
> ...instead of...
> ||\zs
>
Thanks a lot!
I thought that using \zs is the same as \@<= (as written in the :help /
\@<= ).
--~--~-~--~~~---~--~~
You received this message from th
ed attribute simply ensures that wikiBold
will never match except where permitted by the nextgroup.)
Brett Stahlman
>
> Is there a way I can have both of them highlighted?
>
> PS
> wikiBold regexp is greatly simplified just to show the problem, I mean
> I can't drop out \zs part of
/||/
Oops, || are highlighted but *bold* part goes away.
Is there a way I can have both of them highlighted?
PS
wikiBold regexp is greatly simplified just to show the problem, I mean
I can't drop out \zs part of it.
--~--~-~--~~~---~--~~
You received this message fro
In my ignorance I filed a bug report, Bram pointed out that this
restriction in mentioned in :help syn-multi-line, the \zs causes the
problem above.
--~--~-~--~~~---~--~~
You received this message from the "vim_use" maillist.
For more information, visit http://www
with line breaks, and the following text
> remains unchanged:
>
> ;
>
> *adsafasff;
>
> The regexp starting the comment appears to be finding the right
> pattern.
>
> Is there any way I can handle line breaks?
I'm not sure why it doesn't work...but I suggest
m=NONE ctermfg=Red ctermbg=Black
> gui=NONE guifg=Red guibg=White
> syn sync fromstart
>
>
> With the above, the following line gets colored correctly:
> ; *adsafasff;
>
> with everything between the asterisk and the semi-colon colored red.
>
> However, it cannot deal wi
between the asterisk and the semi-colon colored red.
However, it cannot deal with line breaks, and the following text
remains unchanged:
;
*adsafasff;
The regexp starting the comment appears to be finding the right
pattern..
Is there any way I can hand
On Thu, Oct 30, 2008 at 7:28 PM, Tony Mechelynck
<[EMAIL PROTECTED]> wrote:
>
> It would be easy... except that you'd probably want to do it
> right-to-left, so that the extra single digit or pair of digits be at
> the left end rather than at the right one. Let's see...
>
> What about
>
>:s
:s/\(\d\{1,3}\)\ze\%(\d\d\d\)\+\%(\D\|$\)/\1,/g
>
>
This was not what I asked for but I keep it preciously. It may be very
useful...
And very rich for regexp study :)
While looking at it, I could simplify it in the Tim's way ;)
:s/.\{1,3}\ze\(...\)\+$/&,/g
It's true that this o
On 30/10/08 08:56, jice wrote:
>
> Hi,
> I have very long lines made of numbers like this :
> 0324143287911321346876841651023146579841265165769
> I'd like to know if there is a regexp sub expression that can cut this every
> 3 characters in one single command ?
> I
>For the OP, you also don't mention how you'd like them split: by
>newline, or by spaces (which your pseudo-regexp does), so you
>might want to use
>
> :%s/.../& /g
Yah, and just to expound on the point a little more, it can be replaced
with anything. Eg
mbers like this :
>>> 0324143287911321346876841651023146579841265165769
>>> I'd like to know if there is a regexp sub expression that
>>> can cut this every 3 characters in one single command?
>>
>> :s/.\{3}/&\r/g
>>
>> I believe we have
>> I have very long lines made of numbers like this :
>> 0324143287911321346876841651023146579841265165769
>> I'd like to know if there is a regexp sub expression that
>> can cut this every 3 characters in one single command?
>
> :s/.\{3}/&\r/g
>
>
Thank you all guys, all these work perfectly well (love regexp :)
xulxer wrote:
>
>
> Hi,
> On Thu, Oct 30, 2008 at 12:56:14AM -0700, jice wrote:
>>
>>Hi,
>>I have very long lines made of numbers like this :
>>0324143287911321346876841651023146579841265165
jice wrote:
> I have very long lines made of numbers like this :
> 0324143287911321346876841651023146579841265165769
> I'd like to know if there is a regexp sub expression that
> can cut this every 3 characters in one single command?
:s/.\{3}/&\r/g
I believe we have to th
2008/10/30 jice <[EMAIL PROTECTED]>:
>
>
> Hi,
> I have very long lines made of numbers like this :
> 0324143287911321346876841651023146579841265165769
> I'd like to know if there is a regexp sub expression that can cut this every
> 3 characters in one sin
1 - 100 of 108 matches
Mail list logo