summaryrefslogtreecommitdiff
path: root/vim/.vimrc
diff options
context:
space:
mode:
authorUrbain Vaes <urbain@vaes.uk>2020-04-07 13:13:35 +0200
committerUrbain Vaes <urbain@vaes.uk>2020-04-07 13:13:35 +0200
commitdc6a4bfb76eb92519c3d17d790055a546cdb9df5 (patch)
treef7bccc14b2ef0fe2f9ebdff17ebff1e54a45b2a6 /vim/.vimrc
parent4096ea1373b31fffc81523a361e555d11d7251fd (diff)
Add autocommand to reload colors
Diffstat (limited to 'vim/.vimrc')
-rw-r--r--vim/.vimrc20
1 files changed, 11 insertions, 9 deletions
diff --git a/vim/.vimrc b/vim/.vimrc
index 443a14d..16a8d73 100644
--- a/vim/.vimrc
+++ b/vim/.vimrc
@@ -382,18 +382,11 @@ nnoremap ,e :E
" Unimpaired
nmap co yo
-"" Colorscheme {{{1
-nnoremap ,c :colorscheme<space>
-nnoremap ,cl :set background=light<cr>:colorscheme solarized<cr>
-nnoremap ,cl :set background=dark<cr>:colorscheme solarized<cr>
-nnoremap ,cs :colorscheme seoul256<cr>
-nnoremap ,cn :colorscheme nord<cr>
-set notermguicolors
-colo seoul256
-
"" Autocommands {{{1
augroup vimrc
autocmd!
+ autocmd ColorScheme * source $HOME/dotfiles/vim/.vim/after/colors/colors.vim
+
autocmd BufWritePost *vimrc,*exrc :call feedkeys(":source %\<cr>")
autocmd BufNewFile,Bufread /tmp/mutt-* setlocal tw=72
autocmd BufWritePre *
@@ -423,6 +416,15 @@ augroup vimrc
autocmd FileType dirvish silent! unmap <buffer> <C-p>
augroup END
+"" Colorscheme {{{1
+nnoremap ,c :colorscheme<space>
+nnoremap ,cl :set background=light<cr>:colorscheme solarized<cr>
+nnoremap ,cl :set background=dark<cr>:colorscheme solarized<cr>
+nnoremap ,cs :colorscheme seoul256<cr>
+nnoremap ,cn :colorscheme nord<cr>
+set notermguicolors
+colo seoul256
+
"" My search {{{1
" http://vim.wikia.com/wiki/Searching_for_files