diff options
Diffstat (limited to 'files/vim/ftplugin')
-rw-r--r-- | files/vim/ftplugin/asciidoc/asciidoc.vim | 2 | ||||
-rw-r--r-- | files/vim/ftplugin/css/css.vim | 2 | ||||
-rw-r--r-- | files/vim/ftplugin/html/html.vim | 1 | ||||
-rw-r--r-- | files/vim/ftplugin/javascript/javascript.vim | 18 | ||||
-rw-r--r-- | files/vim/ftplugin/text/text.vim | 5 | ||||
-rw-r--r-- | files/vim/ftplugin/typescript/typescript.vim | 26 | ||||
-rw-r--r-- | files/vim/ftplugin/vimwiki/vimwiki.vim | 4 |
7 files changed, 47 insertions, 11 deletions
diff --git a/files/vim/ftplugin/asciidoc/asciidoc.vim b/files/vim/ftplugin/asciidoc/asciidoc.vim index 8eafbe5..b94b875 100644 --- a/files/vim/ftplugin/asciidoc/asciidoc.vim +++ b/files/vim/ftplugin/asciidoc/asciidoc.vim @@ -9,7 +9,7 @@ setlocal tabstop=2 shiftwidth=2 expandtab setlocal list " Column marker: 80 characters -call matchadd('ColorColumn', '\%81v', 100) +" call matchadd('ColorColumn', '\%81v', 100) setlocal textwidth=80 nnoremap <buffer> <leader>C :sp ~/.vim/ftplugin/asciidoc/asciidoc.vim<CR> diff --git a/files/vim/ftplugin/css/css.vim b/files/vim/ftplugin/css/css.vim index bbb1939..e2a4057 100644 --- a/files/vim/ftplugin/css/css.vim +++ b/files/vim/ftplugin/css/css.vim @@ -3,7 +3,7 @@ " " Syntastic linters: csslint, prettycss, sstylelint -let g:syntastic_css_csslint_args = "--ignore=order-alphabetical,ids" +"let g:syntastic_css_csslint_args = "--ignore=order-alphabetical,ids" setlocal textwidth=80 call matchadd('ColorColumn', '\%81v', 100) diff --git a/files/vim/ftplugin/html/html.vim b/files/vim/ftplugin/html/html.vim index 53cf4f9..a2d0fdd 100644 --- a/files/vim/ftplugin/html/html.vim +++ b/files/vim/ftplugin/html/html.vim @@ -63,3 +63,4 @@ inoremap <buffer> <leader>himg <img src="" alt="<++>"><Enter><++><Esc>?""<Enter> nnoremap <buffer> <leader>hc I<!-- <Esc>A --><Esc>0 " Uncomment a line nnoremap <buffer> <leader>hC 05x/--><Enter>3x0 + diff --git a/files/vim/ftplugin/javascript/javascript.vim b/files/vim/ftplugin/javascript/javascript.vim index 2040643..87af95e 100644 --- a/files/vim/ftplugin/javascript/javascript.vim +++ b/files/vim/ftplugin/javascript/javascript.vim @@ -4,7 +4,10 @@ " Syntastic linters: jslint " JSLint arguments -let g:syntastic_javascript_jslint_args = "--browser --indent" +" let g:syntastic_javascript_jslint_args = "--browser --indent" + +" ALE +let b:ale_linters = ['eslint'] " Tabs are expanded to 4 spaces setlocal tabstop=4 shiftwidth=4 expandtab @@ -18,12 +21,13 @@ setlocal textwidth=110 " Mappings nnoremap <buffer> <leader>C :sp ~/.vim/ftplugin/javascript/javascript.vim<CR> -nnoremap <buffer> <leader>gt :YcmCompleter GoTo<CR> -nnoremap <buffer> <leader>gr :YcmCompleter GoToReferences<CR> -nnoremap <buffer> <leader>fi :YcmCompleter FixIt<CR> -nnoremap <buffer> <leader>r :YcmCompleter RefactorRename<Space> -nnoremap <buffer> <leader>e :YcmDiags<CR> -nnoremap <buffer> <leader>E :Errors<CR> +"nnoremap <buffer> <leader>gt :YcmCompleter GoTo<CR> +"nnoremap <buffer> <leader>gr :YcmCompleter GoToReferences<CR> +"nnoremap <buffer> <leader>fi :YcmCompleter FixIt<CR> +"nnoremap <buffer> <leader>r :YcmCompleter RefactorRename<Space> +"nnoremap <buffer> <leader>e :YcmDiags<CR> +"nnoremap <buffer> <leader>E :Errors<CR> inoremap <buffer> <leader>if if (<+++>) {<CR><++><CR>} <++><Esc>?<+++><CR>cf> inoremap <buffer> <leader>else else {<CR><+++><CR>}<CR><++><Esc>?<+++><CR>cf> + diff --git a/files/vim/ftplugin/text/text.vim b/files/vim/ftplugin/text/text.vim index c82dff1..406c1e1 100644 --- a/files/vim/ftplugin/text/text.vim +++ b/files/vim/ftplugin/text/text.vim @@ -3,6 +3,11 @@ " " Syntastic linter: proselint +" Tabs hate: tabs are expanded to 2 spaces +setlocal tabstop=2 shiftwidth=2 expandtab +" Show existing tabs (they can be deleted with :retab) +setlocal list + call matchadd('ColorColumn', '\%101v', 100) setlocal textwidth=100 diff --git a/files/vim/ftplugin/typescript/typescript.vim b/files/vim/ftplugin/typescript/typescript.vim new file mode 100644 index 0000000..504828d --- /dev/null +++ b/files/vim/ftplugin/typescript/typescript.vim @@ -0,0 +1,26 @@ +" ~/.vim/ftplugin/typescript/typescript.vim +" TypeScript-specific vim configuration + +" ALE +"let b:ale_linters = ['eslint'] + +" Tabs are expanded to 4 spaces +setlocal tabstop=4 shiftwidth=4 expandtab +" Show existing tabs (they can be deleted with :retab) +setlocal list + +" Column marker: 110 characters +call matchadd('ColorColumn', '\%111v', 100) +setlocal textwidth=110 + +" Mappings +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> + +inoremap <buffer> <leader>if if (<+++>) {<CR><++><CR>} <++><Esc>?<+++><CR>cf> +inoremap <buffer> <leader>else else {<CR><+++><CR>}<CR><++><Esc>?<+++><CR>cf> + diff --git a/files/vim/ftplugin/vimwiki/vimwiki.vim b/files/vim/ftplugin/vimwiki/vimwiki.vim index 2029fcb..2e814eb 100644 --- a/files/vim/ftplugin/vimwiki/vimwiki.vim +++ b/files/vim/ftplugin/vimwiki/vimwiki.vim @@ -11,8 +11,8 @@ setlocal tabstop=2 shiftwidth=2 expandtab setlocal list " Column marker: 80 characters -call matchadd('ColorColumn', '\%81v', 100) -setlocal textwidth=80 +call matchadd('ColorColumn', '\%101v', 100) +setlocal textwidth=100 nnoremap <buffer> <leader>C :sp ~/.vim/ftplugin/vimwiki/vimwiki.vim<CR> nnoremap <buffer> <leader>e :Errors<CR> |