From 3e7dc0f51944b8603815186eee4aacbd10d1a687 Mon Sep 17 00:00:00 2001 From: InigoGutierrez Date: Tue, 28 Apr 2020 01:17:21 +0200 Subject: Several changed in vim's filetype plugins. --- files/vim/ftplugin/asciidoc/asciidoc.vim | 2 +- files/vim/ftplugin/css/css.vim | 2 +- files/vim/ftplugin/html/html.vim | 1 + files/vim/ftplugin/javascript/javascript.vim | 18 +++++++++++------- files/vim/ftplugin/text/text.vim | 5 +++++ files/vim/ftplugin/typescript/typescript.vim | 26 ++++++++++++++++++++++++++ files/vim/ftplugin/vimwiki/vimwiki.vim | 4 ++-- 7 files changed, 47 insertions(+), 11 deletions(-) create mode 100644 files/vim/ftplugin/typescript/typescript.vim 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 C :sp ~/.vim/ftplugin/asciidoc/asciidoc.vim 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 himg <++><++>?"" nnoremap hc I0 " Uncomment a line nnoremap hC 05x/-->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 C :sp ~/.vim/ftplugin/javascript/javascript.vim -nnoremap gt :YcmCompleter GoTo -nnoremap gr :YcmCompleter GoToReferences -nnoremap fi :YcmCompleter FixIt -nnoremap r :YcmCompleter RefactorRename -nnoremap e :YcmDiags -nnoremap E :Errors +"nnoremap gt :YcmCompleter GoTo +"nnoremap gr :YcmCompleter GoToReferences +"nnoremap fi :YcmCompleter FixIt +"nnoremap r :YcmCompleter RefactorRename +"nnoremap e :YcmDiags +"nnoremap E :Errors inoremap if if (<+++>) {<++>} <++>?<+++>cf> inoremap else else {<+++>}<++>?<+++>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 C :sp ~/.vim/ftplugin/typescript/typescript.vim + +nnoremap gd :ALEGoToDefinition +nnoremap h :ALEHover +nnoremap r :ALERename +nnoremap fr :ALEFindReferences + +inoremap if if (<+++>) {<++>} <++>?<+++>cf> +inoremap else else {<+++>}<++>?<+++>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 C :sp ~/.vim/ftplugin/vimwiki/vimwiki.vim nnoremap e :Errors -- cgit v1.2.1