Re: regexp, ANN: explainpat
- v0.2 is out!
Am 19.12.2012 20:48, schrieb Christian Brabandt:
> On Mi, 19 Dez 2012, Christian Brabandt wrote:There is a technical limit ... ExplainPattern only understands
>>> :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 doesn't seem to work correctly:Thanks for spotting!
> :ExplainPattern \%>1l\&\%<6l
> match below line 1
> \& AND branch
> match above line 6
> (obviously otherway around)
He, "above" and "below" are ambiguous!
Now it says:
\%>1l match below line 1 (towards end of buffer)
\& AND branch
\%<6l match above line 6 (towards start of buffer)
> :ExplainPattern: \%>'a1ok, fixed.
> \%>'a1 literal string (5 atom(s))
> (wrong, its 1 after mark a (2atoms)
> Possible enhancements:I don't get exactly what you mean.
> - maybe show captured string, if simple atom
> \1 match first captured string
> - possibly highlight matching patterns, so you can see, whatYou can search for a pattern and then do
> :ExplainPattern <pattern> matches in the current buffer)
> - :ExplainPattern: \%x31now it says
> \%x31 match character specified with hex number 0x31
> (display character)
\%x31 match character specified with hex number 0x31 (1)
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