vim: misc

This commit is contained in:
2020-11-03 22:34:37 +00:00
parent cb31f120e7
commit 673b465a02

24
vimrc
View File

@@ -49,6 +49,7 @@ call plug#begin('~/.vim/plugged')
Plug 'mustache/vim-mustache-handlebars'
Plug 'evanleck/vim-svelte'
Plug 'leafgarland/typescript-vim'
Plug 'HerringtonDarkholme/yats.vim'
Plug 'elixir-editors/vim-elixir'
Plug 'elzr/vim-json'
Plug 'rust-lang/rust.vim'
@@ -113,7 +114,7 @@ inoremap jk <esc>
" Use 'p' to mean 'inside parantheses' in commands.
onoremap p i(
colorscheme desert
colorscheme PaperColor
" colorscheme dracula
" colorscheme solarized8
@@ -201,16 +202,15 @@ augroup END
" Apply the muttrc colouring to mutt setup files:
au BufNewFile,BufRead .mutt.* set ft=muttrc
augroup filetype elixir
autocmd!
autocmd BufRead * imap ii IO.inspect(
" autocmd BufRead * imap ip IO.puts(
augroup END
" augroup filetype elixir
" autocmd!
" autocmd BufRead * imap ii IO.inspect(
" autocmd BufRead * imap ip IO.puts(
" augroup END
augroup filetype vue
autocmd!
autocmd BufRead,BufNewFile *.vue inoremap cll console.log()<left>
call TabSize(2)
iabbrev template <template><cr><div><cr></div><cr></template
iabbrev script <script><cr>export default {<cr>name: ""<cr>};<cr></script
iabbrev stylescope <style scoped><cr></style
@@ -219,8 +219,12 @@ augroup END
augroup filetype javascript
autocmd!
autocmd BufRead,BufNewFile *.js inoremap cll console.log()<left>
" inoremap <localleader>\li logger.info("
" inoremap <localleader>\cli <esc>3cwlogger.info("i
iabbrev <buffer> iff if()<left>
augroup END
augroup filetype typescript
autocmd!
autocmd BufRead,BufNewFile *.ts inoremap cll console.log()<left>
iabbrev <buffer> iff if()<left>
augroup END
@@ -584,6 +588,8 @@ if version >= 800
nnoremap <silent> <space>k :<C-u>CocPrev<CR>
" Resume latest coc list
nnoremap <silent> <space>p :<C-u>CocListResume<CR>
let g:coc_global_extensions = [ 'coc-tsserver' ]
endif
" <Tab> and <S-Tab> indent and unindent code