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-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-down> ddp
@@ -103,9 +108,9 @@ inoremap jk <esc>
" 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 <buffer> iff if()<left>
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