On 08/19/10 08:14, Jeri Raye wrote:
I'm trying to understand certain expressions in a script. But I can't
find out what the function/meaning is of a 'greater-then' character in
an expression.
So in the expression below, what does the> char do/mean? In other words
: What happens when I leaf it out?
let g:ruby_simplefold_nestable_start_expr =
\ '\v^\s*(def>|if>|unless>|while>.*(<do>)?|' .
\ 'until>.*(<do>)?|case>|for>|begin>)' .
\ '|^[^#]*.*<do>\s*(\|.*\|)?'
The trick is noticing that the pattern begins with "\v" which
interprets any non-alphanumeric character as special:
:help /\v
That means the ">" gets treated as "\>" normally would
:help /\>
as also happens with "(...)" (instead of "\(...\)" for
group-capture) and "|" (instead of "\|" for branching).
If you omit it, things like "defunct", "doodle", or "iffy" could
be treated as starting a block because the expression no longer
forces that the word end at the specified point.
-tim
--
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