From fdb5f396d6373f6cfb38b91fa8f2e0ec2df519ce Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Thu, 4 Nov 2021 17:10:15 +0300 Subject: [PATCH] Better non-human letters highlighting --- vim/.vim/autoload/nonhumanhl.vim | 5 +++++ vim/.vim/plugin/nonhumanhl.vim | 2 ++ 2 files changed, 7 insertions(+) create mode 100644 vim/.vim/autoload/nonhumanhl.vim create mode 100644 vim/.vim/plugin/nonhumanhl.vim diff --git a/vim/.vim/autoload/nonhumanhl.vim b/vim/.vim/autoload/nonhumanhl.vim new file mode 100644 index 0000000..c2ac7fc --- /dev/null +++ b/vim/.vim/autoload/nonhumanhl.vim @@ -0,0 +1,5 @@ +function! nonhumanhl#load() + highlight nonhuman ctermbg=blue ctermfg=red + autocmd BufReadPost * syntax match nonhuman + \ "[^\u0000-\u007Fа-яА-ЯёЁäÄöÖüÜßẞ]" containedin=ALL +endfunction diff --git a/vim/.vim/plugin/nonhumanhl.vim b/vim/.vim/plugin/nonhumanhl.vim new file mode 100644 index 0000000..7d4e88b --- /dev/null +++ b/vim/.vim/plugin/nonhumanhl.vim @@ -0,0 +1,2 @@ +if exists("*nonhumanhl#load") | finish | endif +call nonhumanhl#load() -- 2.44.0