From 328deb85566686e021760c0006658c6c4eb734e4 Mon Sep 17 00:00:00 2001 From: Tony Duckles Date: Sun, 30 Oct 2011 13:54:03 -0500 Subject: [PATCH] .vimrc: Auto-highlight TODO's --- .vimrc | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.vimrc b/.vimrc index 17fa7a8..829ed92 100644 --- a/.vimrc +++ b/.vimrc @@ -31,9 +31,20 @@ if &t_Co > 2 || has("gui_running") set hlsearch " Highlight all search matches " Press Space to turn off highlighting and clear any message already displayed. :nnoremap :nohlsearch:echo + " Define to-do colors + if !exists("autocmd_colorscheme_loaded") + let autocmd_colorscheme_loaded = 1 + autocmd ColorScheme * highlight TodoRed ctermbg=LightRed guibg=#E01B1B ctermfg=White guifg=#002b37 + endif " Solarized color-scheme let g:solarized_termtrans=1 " Always use terminal's default bg color colorscheme solarized + " Auto-highlight to-do's + if has("autocmd") + if v:version > 701 + autocmd Syntax * call matchadd('TodoRed', '\W\zs\(TODO\)') + endif + endif endif " --------------------------------------------------------------------------- -- 2.47.1