diff options
Diffstat (limited to 'files/vim/ftplugin/typescript/typescript.vim')
-rw-r--r-- | files/vim/ftplugin/typescript/typescript.vim | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/files/vim/ftplugin/typescript/typescript.vim b/files/vim/ftplugin/typescript/typescript.vim index d80dde4..7c91032 100644 --- a/files/vim/ftplugin/typescript/typescript.vim +++ b/files/vim/ftplugin/typescript/typescript.vim @@ -2,10 +2,10 @@ " TypeScript-specific vim configuration " ALE -"let b:ale_linters = ['eslint'] +let b:ale_linters = ['eslint'] " Tabs are expanded to 4 spaces -setlocal tabstop=2 shiftwidth=2 expandtab +setlocal tabstop=4 shiftwidth=4 expandtab " Show existing tabs (they can be deleted with :retab) setlocal list @@ -14,13 +14,20 @@ call matchadd('ColorColumn', '\%111v', 100) setlocal textwidth=110 " Mappings + +let mapleader = " " + nnoremap <buffer> <leader>C :sp ~/.vim/ftplugin/typescript/typescript.vim<CR> -nnoremap <buffer> gd :ALEGoToDefinition<CR> -nnoremap <buffer> <Space>h :ALEHover<CR> -nnoremap <buffer> <Space>r :ALERename<CR> -nnoremap <buffer> <Space>fr :ALEFindReferences<CR> +nnoremap <buffer> gd :YcmCompleter GoTo<CR> +nnoremap <buffer> gr :YcmCompleter GoToReferences<CR> +nnoremap <buffer> gh :YcmCompleter GetType<CR> +nnoremap <buffer> gD :YcmCompleter GetDoc<CR> +nnoremap <buffer> gR :YcmCompleter RefactorRename<Space> +nnoremap <buffer> <leader>fi :YcmCompleter FixIt<CR> +nnoremap <buffer> <leader>e :YcmDiags<CR> + +let mapleader = "," inoremap <buffer> <leader>if if (<+++>) {<CR><++><CR>} <++><Esc>?<+++><CR>cf> inoremap <buffer> <leader>else else {<CR><+++><CR>}<CR><++><Esc>?<+++><CR>cf> - |