aboutsummaryrefslogtreecommitdiffstats
path: root/vim/after/syntax
diff options
context:
space:
mode:
authorJohannes Löthberg <johannes@kyriasis.com>2014-02-02 20:35:42 +0100
committerJohannes Löthberg <johannes@kyriasis.com>2014-02-02 22:01:01 +0100
commit7e7aa928072775240ff70ca61f2dd0e8a09242d8 (patch)
treee22d0a73612befd95744dec72770e74593ab47cd /vim/after/syntax
downloaddotfiles-7e7aa928072775240ff70ca61f2dd0e8a09242d8.tar.xz
(Let's pretend that this is the) initial commit
Diffstat (limited to 'vim/after/syntax')
-rw-r--r--vim/after/syntax/c.vim13
1 files changed, 13 insertions, 0 deletions
diff --git a/vim/after/syntax/c.vim b/vim/after/syntax/c.vim
new file mode 100644
index 0000000..0f796e3
--- /dev/null
+++ b/vim/after/syntax/c.vim
@@ -0,0 +1,13 @@
+" Highlight Class and Function names
+syn match cCustomParen "(" contains=cParen
+syn match cCustomFunc "\w\+\s*(" contains=cCustomParen
+
+hi def link cCustomFunc Function
+hi def cCustomFunc gui=bold guifg=yellowgreen
+
+highlight ExtraWhitespace ctermbg=red guibg=red
+match ExtraWhitespace /\s\+$/
+autocmd BufWinEnter * match ExtraWhitespace /\s\+$/
+autocmd InsertEnter * match ExtraWhitespace /\s\+\%#\@<!$/
+autocmd InsertLeave * match ExtraWhitespace /\s\+$/
+autocmd BufWinLeave * call clearmatches()