Saturday, February 11, 2023

Syntax keepend/oneline vs. extend

Quoting the help for :syn-extend :

The "keepend" behavior can be changed by using the "extend" argument.
When an item with "extend" is contained in an item that uses
"keepend", the "keepend" is ignored and the containing region will be
extended.

Fair enough, but how does one get the opposite behavior? I.e. what I want
is "keepend-but-seriously-stop-here" regardless of whether contained items
use extend, or match the newlines, etc.

(Context: including portions of one syntax in another, where the former's
use of extend doesn't anticipate the latter. I haven't found any
obviously right way to do this in either the help or the runtime files
that ship with Vim, only workarounds for specific cases.)

-Rob

--
--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/2ce85c8e-55f3-4cab-6583-6897e2ee330b%40loonybin.net.

No comments:

Post a Comment