]> Sergey Matveev's repositories - dotfiles.git/commitdiff
Better non-human letters highlighting
authorSergey Matveev <stargrave@stargrave.org>
Thu, 4 Nov 2021 14:10:15 +0000 (17:10 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Thu, 27 Jan 2022 11:35:13 +0000 (14:35 +0300)
vim/.vim/autoload/nonhumanhl.vim [new file with mode: 0644]
vim/.vim/plugin/nonhumanhl.vim [new file with mode: 0644]

diff --git a/vim/.vim/autoload/nonhumanhl.vim b/vim/.vim/autoload/nonhumanhl.vim
new file mode 100644 (file)
index 0000000..c2ac7fc
--- /dev/null
@@ -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 (file)
index 0000000..7d4e88b
--- /dev/null
@@ -0,0 +1,2 @@
+if exists("*nonhumanhl#load") | finish | endif
+call nonhumanhl#load()