summaryrefslogtreecommitdiff
path: root/vimrc
diff options
context:
space:
mode:
authorDavid Phillips <david@yeah.nah.nz>2019-10-14 19:00:53 +1300
committerDavid Phillips <david@yeah.nah.nz>2019-10-14 19:00:53 +1300
commitbb564cb086aab16ffe91370e17afa8396739ac46 (patch)
tree302f4c1338c755adcad0821b6a5abd6e55c21469 /vimrc
parent1840e5f0c52c60f6efbbc550793aa4894f4b89f4 (diff)
parentfe44370a551d7f8db3a1093da9b8199f157dc374 (diff)
downloaddotfiles-bb564cb086aab16ffe91370e17afa8396739ac46.tar.xz
Merge branch 'master' of nah.nz:/srv/git/public/dotfiles
Diffstat (limited to 'vimrc')
-rw-r--r--vimrc29
1 files changed, 29 insertions, 0 deletions
diff --git a/vimrc b/vimrc
index a309b4d..b7c7791 100644
--- a/vimrc
+++ b/vimrc
@@ -26,12 +26,35 @@ highlight ExtraWhitespace ctermbg=red guibg=red
highlight SpecialKey ctermfg=23
highlight NonText ctermfg=23
highlight Folded ctermbg=0
+highlight ColorColumn ctermbg=234
match ExtraWhitespace /\s\+$/
inoremap <CR> <CR>x<BS>
nnoremap o ox<BS>
nnoremap O Ox<BS>
+function! ToggleHlsearch()
+ if &hlsearch
+ nohlsearch
+ set nohlsearch
+ else
+ set hlsearch
+ endif
+endfunction
+
+" highlighted search colours
+hi Search ctermbg=DarkYellow ctermfg=Black
+nnoremap <C-_> :call ToggleHlsearch()<cr>
+
+hi Todo ctermbg=DarkGreen ctermfg=Black
+
+
+set expandtab
+autocmd BufRead,BufNewFile *.cli setfiletype xml
+"autocmd FileType c setlocal expandtab
+autocmd FileType make set noexpandtab
+autocmd FileType cpp setlocal expandtab
+autocmd FileType bitbake setlocal expandtab
autocmd FileType python setlocal expandtab
autocmd FileType haskell setlocal expandtab
autocmd FileType lhaskell setlocal expandtab
@@ -55,3 +78,9 @@ let g:airline_powerline_fonts = 1
" makes airline work before split
set laststatus=2
+
+" Nicer colours for solarised vimdiff
+highlight DiffAdd cterm=bold ctermfg=233 ctermbg=101 gui=none guifg=bg guibg=Red
+highlight DiffDelete cterm=bold ctermfg=175 ctermbg=175 gui=none guifg=bg guibg=Red
+highlight DiffChange cterm=bold ctermfg=234 ctermbg=101 gui=none guifg=bg guibg=Red
+highlight DiffText cterm=none ctermfg=242 ctermbg=0 gui=none guifg=bg guibg=Red