Wednesday, March 6, 2024

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

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 <vim_use@googlegroups.com> 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 vim_use+unsubscribe@googlegroups.com.
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 vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CANuxnEfKhxnxESSFvTBM9-juLXSbeYkefFcf1Hw8arAq_XLzmA%40mail.gmail.com.

No comments: