Re: Problem highlighting cword in help buffer (Text format)

Salman Halim <[email protected]>
Newsgroups gmane.editors.vim
Message-ID <CANuxnEfKhxnxESSFvTBM9-juLXSbeYkefFcf1Hw8arAq_XLzmA@mail.gmail.com>
Shouldn't the save of the iskeyword be part of the auto command? It might
be easier to maintain if you convert it to a function and just call that
from the auto command because you won't be forced to have everything on one
long line.

Salman

On Tue, Mar 5, 2024, 09:26 'lijh8' via vim_use <[email protected]>
wrote:

> Hi Salman,
>
> I update this to highlight cursor word, it now works in `:help` system and
> it also works to the built-in star `*` .
>
> Thanks
>
> ```
> let save_isk=&amp;iskeyword | set iskeyword=@,48-57,_,192-255 | autocmd
> CursorMoved,CursorMovedI * execute 'match Visual' (getline('.')[col('.')-1]
> =~# '\w' ? '/\&lt;' . escape(expand('<cword>'), '/\.*$^~[]') . '\&gt;/' :
> '//') | let &amp;iskeyword=save_isk
> ```</cword>
>
> --
> --
> 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 [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/vim_use/tencent_ACEA18DFC679933C79DCB1CF4376F93EC108%40qq.com
> .
>

-- 
-- 
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 [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CANuxnEfKhxnxESSFvTBM9-juLXSbeYkefFcf1Hw8arAq_XLzmA%40mail.gmail.com.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.