Documentation for $ in pattern

0 views
Skip to first unread message

Nico Weber

unread,
Jan 12, 2008, 8:23:54 AM1/12/08
to vim...@googlegroups.com
Hi,

^ is documented as:

^ At beginning of pattern or after "\|", "\(", "\%(" or "\n": matches
start-of-line; at other positions, matches literal '^'. |/zero-width|

$ on the other hand is documented as:

$ At end of pattern or in front of "\|" or "\)" ("|" or ")" after "\v"):
matches end-of-line <EOL>; at other positions, matches literal '$'.

I'm having the impression that $ in front of "\n" and "\%(" matches
<EOL> as well. Must the documentation be updated?

Nico

Bram Moolenaar

unread,
Jan 12, 2008, 10:52:13 AM1/12/08
to Nico Weber, vim...@googlegroups.com

Nico Weber wrote:

Yes, "$" also means EOL before "\n". I'll fix the docs.

--
ARTHUR: Charge!
[They all charge with swords drawn towards the RABBIT. A tremendous twenty
second fight with Peckinpahish shots and borrowing heavily also on the
Kung Fu and karate-type films ensues, in which some four KNIGHTS are
comprehensively killed.]
ARTHUR: Run away! Run away!
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ download, build and distribute -- http://www.A-A-P.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

Reply all
Reply to author
Forward
0 new messages