From 7c7d52e3d843a43a1f529b462b268e9101eba4ed Mon Sep 17 00:00:00 2001 From: Paul Walker Date: Fri, 23 Oct 2020 13:13:55 +0100 Subject: [PATCH] vim: add bindings to switch themes --- vimrc | 50 ++++++++++++++++++++++++++++++-------------------- 1 file changed, 30 insertions(+), 20 deletions(-) diff --git a/vimrc b/vimrc index 2ea9ff1..d86a24d 100644 --- a/vimrc +++ b/vimrc @@ -84,6 +84,11 @@ nnoremap wl viwu nnoremap viwU nnoremap viwu +nnoremap td :colorscheme dracula +nnoremap ts :colorscheme solarized8 +nnoremap bd :set background=dark +nnoremap bl :set background=light + nnoremap dd2kp nnoremap ddp @@ -103,9 +108,9 @@ inoremap jk " Use 'p' to mean 'inside parantheses' in commands. onoremap p i( -" color desert +colorscheme desert " colorscheme dracula -colorscheme solarized8 +" colorscheme solarized8 set ignorecase smartcase set incsearch @@ -161,26 +166,31 @@ augroup filetype au BufRead,BufNewFile *.bss set filetype=vb augroup END -augroup cppprog +augroup java au! - au BufRead,BufNewFile *.h set cindent - au BufRead,BufNewFile *.cc set cindent - au BufRead,BufNewFile *.cpp set cindent - call TabSize(4) + inoremap sop System.out.println( +augroup END + +augroup cppprog + au! + au BufRead,BufNewFile *.h set cindent + au BufRead,BufNewFile *.cc set cindent + au BufRead,BufNewFile *.cpp set cindent + call TabSize(4) augroup END augroup cprog - au! - au BufRead,BufNewFile *.[ch] set cindent - call TabSize(4) + au! + au BufRead,BufNewFile *.[ch] set cindent + call TabSize(4) augroup END augroup xml - autocmd! - autocmd FileType xml let g:xml_syntax_folding=1 - autocmd FileType xml setlocal foldmethod=syntax - autocmd FileType xml :syntax on - autocmd FileType xml :%foldopen! + autocmd! + autocmd FileType xml let g:xml_syntax_folding=1 + autocmd FileType xml setlocal foldmethod=syntax + autocmd FileType xml :syntax on + autocmd FileType xml :%foldopen! augroup END " Apply the muttrc colouring to mutt setup files: @@ -209,11 +219,11 @@ augroup filetype javascript iabbrev iff if() augroup END -augroup filetype make - autocmd! - " call TabSize(8) - set noexpandtab -augroup END +" augroup filetype make +" autocmd! +" " call TabSize(8) +" set noexpandtab +" augroup END " Automatic typo fixing iab compomemt component