-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvimrc
More file actions
45 lines (37 loc) · 1.06 KB
/
vimrc
File metadata and controls
45 lines (37 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
source ~/.vim/plugins.vim
" UI
colorscheme solarized
highlight Normal ctermbg=NONE guibg=NONE
set number
" use spaces instead of tabs
set tabstop=2
set shiftwidth=2
set expandtab
" directories
set backupdir=~/.vim/backup/
set directory=~/.vim/swap/
set undodir=~/.vim/undo/
" Coc
let g:coc_global_extensions = [ 'coc-tsserver', 'coc-prettier', 'coc-tslint-plugin', 'coc-solargraph']
let g:coc_disable_startup_warning = 1
" map
let mapleader=","
nmap <F1> <nop>
map <F2> orequire 'pry'; binding.pry unless $pstop<ESC>
nnoremap <silent> <F3> :Rgrep<CR>*
nmap <silent> gd <Plug>(coc-definition)
nmap <silent> gy <Plug>(coc-type-definition)
nmap <silent> gi <Plug>(coc-implementation)
nmap <silent> gr <Plug>(coc-references)
nmap gI :CocCommand tsserver.organizeImports<cr>
" CtrlP
nnoremap scl :CtrlP .<CR>
nnoremap scr :CtrlPMRU<CR>
" Commands
command! -nargs=0 Prettier :call CocAction('runCommand', 'prettier.formatFile')
" show quickfix window for vimgrep
augroup myvimrc
autocmd!
autocmd QuickFixCmdPost [^l]* cwindow
autocmd QuickFixCmdPost l* lwindow
augroup END