I have a twig (PHP HTML template) file with several non ascii characters at different places. I can do a search with:
/[\x7f-\xff]/
and it will match them. But when I try to add these commands to my .vimrc file for highlighting them, it does not work:
" Find non ASCII chars and highlight them
syn match nonascii "[\x7f-\xff]"
hi nonascii guibg=Red ctermbg=2
Anyone who knows what I'm doing wrong?
--
--
You received this message from the "vim_mac" 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_mac" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_mac+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
au BufWinEnter * let w:matchnonascii=matchadd('ErrorMsg', "[\x7f-\xff]", -1)