From 3aabd8befd6aee2d733ef64b5e9f42941e7c9102 Mon Sep 17 00:00:00 2001 From: amix Date: Thu, 17 Dec 2015 12:44:42 -0300 Subject: [PATCH] Updated plugins, added extra configs to make Syntastic work with Go --- .../vim-snippets/pythonx/vimsnippets.py | 2 +- .../snippets/javascript/javascript.d3.snippets | 4 ++-- vimrcs/plugins_config.vim | 14 ++++++++++++++ 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/sources_non_forked/vim-snippets/pythonx/vimsnippets.py b/sources_non_forked/vim-snippets/pythonx/vimsnippets.py index d2002295..6a446a2a 100644 --- a/sources_non_forked/vim-snippets/pythonx/vimsnippets.py +++ b/sources_non_forked/vim-snippets/pythonx/vimsnippets.py @@ -78,7 +78,7 @@ def get_comment_format(): def make_box(twidth, bwidth=None): - b, m, e, i = get_comment_format() + b, m, e, i = (s.strip() for s in get_comment_format()) bwidth_inner = bwidth - 3 - max(len(b), len(i + e)) if bwidth else twidth + 2 sline = b + m + bwidth_inner * m[0] + 2 * m[0] nspaces = (bwidth_inner - twidth) // 2 diff --git a/sources_non_forked/vim-snippets/snippets/javascript/javascript.d3.snippets b/sources_non_forked/vim-snippets/snippets/javascript/javascript.d3.snippets index a3f7fa7a..f5be9189 100644 --- a/sources_non_forked/vim-snippets/snippets/javascript/javascript.d3.snippets +++ b/sources_non_forked/vim-snippets/snippets/javascript/javascript.d3.snippets @@ -16,8 +16,8 @@ snippet marginconvention var ${8:height} = ${9:500} - $1.top - $1.bottom; var ${10:svg} = d3.select("${11}").append("svg") - .attr("width", $6) - .attr("height", $8) + .attr("width", $6 + $1.left + $1.right) + .attr("height", $8 + $1.top + $1.bottom) .append("g") .attr("transform", "translate(" + $1.left + "," + $1.top + ")") snippet nest diff --git a/vimrcs/plugins_config.vim b/vimrcs/plugins_config.vim index ab401dc2..da48f593 100644 --- a/vimrcs/plugins_config.vim +++ b/vimrcs/plugins_config.vim @@ -104,6 +104,7 @@ au FileType mako vmap Si S"i${ _(2f"a) } """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" let g:airline_theme="luna" + """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " => Vimroom """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" @@ -113,12 +114,25 @@ let g:goyo_margin_bottom = 2 nnoremap z :Goyo +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" => Vim-go +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +let g:go_fmt_command = "goimports" + + """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " => Syntastic (syntax checker) """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" Python let g:syntastic_python_checkers=['pyflakes'] + +" Javascript let g:syntastic_javascript_checkers = ['jshint'] +" Go +let g:syntastic_auto_loc_list = 1 +let g:syntastic_go_checkers = ['go', 'golint', 'errcheck'] + " Custom CoffeeScript SyntasticCheck func! SyntasticCheckCoffeescript() let l:filename = substitute(expand("%:p"), '\(\w\+\)\.coffee', '.coffee.\1.js', '')