vim: add bindings to switch themes

This commit is contained in:
2020-10-23 13:13:55 +01:00
parent 5011460c1c
commit 7c7d52e3d8

50
vimrc
View File

@@ -84,6 +84,11 @@ nnoremap <leader>wl viwu
nnoremap <C-U> viwU nnoremap <C-U> viwU
nnoremap <C-L> viwu nnoremap <C-L> viwu
nnoremap <leader>td :colorscheme dracula<CR>
nnoremap <leader>ts :colorscheme solarized8<CR>
nnoremap <leader>bd :set background=dark<CR>
nnoremap <leader>bl :set background=light<CR>
nnoremap <c-s-up> dd2kp nnoremap <c-s-up> dd2kp
nnoremap <c-s-down> ddp nnoremap <c-s-down> ddp
@@ -103,9 +108,9 @@ inoremap jk <esc>
" Use 'p' to mean 'inside parantheses' in commands. " Use 'p' to mean 'inside parantheses' in commands.
onoremap p i( onoremap p i(
" color desert colorscheme desert
" colorscheme dracula " colorscheme dracula
colorscheme solarized8 " colorscheme solarized8
set ignorecase smartcase set ignorecase smartcase
set incsearch set incsearch
@@ -161,26 +166,31 @@ augroup filetype
au BufRead,BufNewFile *.bss set filetype=vb au BufRead,BufNewFile *.bss set filetype=vb
augroup END augroup END
augroup cppprog augroup java
au! au!
au BufRead,BufNewFile *.h set cindent inoremap sop System.out.println(
au BufRead,BufNewFile *.cc set cindent augroup END
au BufRead,BufNewFile *.cpp set cindent
call TabSize(4) 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 END
augroup cprog augroup cprog
au! au!
au BufRead,BufNewFile *.[ch] set cindent au BufRead,BufNewFile *.[ch] set cindent
call TabSize(4) call TabSize(4)
augroup END augroup END
augroup xml augroup xml
autocmd! autocmd!
autocmd FileType xml let g:xml_syntax_folding=1 autocmd FileType xml let g:xml_syntax_folding=1
autocmd FileType xml setlocal foldmethod=syntax autocmd FileType xml setlocal foldmethod=syntax
autocmd FileType xml :syntax on autocmd FileType xml :syntax on
autocmd FileType xml :%foldopen! autocmd FileType xml :%foldopen!
augroup END augroup END
" Apply the muttrc colouring to mutt setup files: " Apply the muttrc colouring to mutt setup files:
@@ -209,11 +219,11 @@ augroup filetype javascript
iabbrev <buffer> iff if()<left> iabbrev <buffer> iff if()<left>
augroup END augroup END
augroup filetype make " augroup filetype make
autocmd! " autocmd!
" call TabSize(8) " " call TabSize(8)
set noexpandtab " set noexpandtab
augroup END " augroup END
" Automatic typo fixing " Automatic typo fixing
iab compomemt component iab compomemt component