Sunday, July 10, 2022

Re: better way to always highlight NS?



Den sön 10 juli 2022 14:47Anton Sharonov <anton.sharonov@gmail.com> skrev:
Hi all,

I am trying to always highlight non-breakable spaces in all my
buffers, regardless of the filetype.

One way I found so far is:

  autocmd BufReadPost *
    \ some  |
    \ other |
    \ stuff |
    \ exec "3mat Todo /\xc2\xa0/"


This has 2 small disadvantages for me:

- makes all a bit slower (probably unavoidable)?
- consumes one of available :mat :2mat :3mat commands

Maybe :h matchadd() ?

And why not use /\%u00a0/ if you use UTF-8 encoding anyway?

:h 'encoding'  :h 'fileencoding'


Are there some better ways perhaps?

--
With best regards, Anton

PS: By the way, even ":set list" do not show them so those NS are
really nasty if you don't expect them )))

--
--
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/YsrKELzdt1LFm/FV%40DESKTOP-75K4M1M.

--
--
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/CADAJKhBeKQTd5qFHO9OG3QhZZszR89KfgQGFdUZ6v%2BwYuAPpmg%40mail.gmail.com.

No comments:

Post a Comment