Monday, February 13, 2017

Re: W-word Boundaries

On 2017-02-13 13:34, Shawn H Corey wrote:
>
> The two patterns, \< and \> match w-word boundaries. Is there
> something to match W-word boundaries? The best I came up with is:
>
> \(^\|\s\)\@<=
>
> I'm writing a syntax file for G+ comments where in-line styles start
> with a W-word boundary, followed by a "*" for bold, "_" for italic,
> and "-" for strikeout. \< and \> only works for italic.
>
> Does anyone know a more elegant way?

Depending on how your final expression is, \S might do the trick, or
you can use a negative lookbehind assertion:

\S\@<!

So for your markdown words, it could be something like

\S\@<!\S\+

-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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: