Skip to content

Instantly share code, notes, and snippets.

@pyanfield
Last active August 29, 2015 14:01
Show Gist options
  • Save pyanfield/f2a2c489b1405f9fca3c to your computer and use it in GitHub Desktop.
Save pyanfield/f2a2c489b1405f9fca3c to your computer and use it in GitHub Desktop.
install spf13 to support golang
sh <(curl https://j.mp/spf13-vim3 -L)
echo "let g:spf13_bundle_groups=['general', 'neocomplete', 'programming', 'ruby', 'python', 'go', 'javascript', 'html', 'misc', 'writing' ]" >> ~/.vimrc.before.local
vim +BundleInstall! +qall
使用 tagbar 插件:
-- 首先安装:brew install ctags
-- go get -u github.com/jstemmer/gotags
-- gotags 安装完之后,需要将编译后的 gotags 路径加入到 PATH 路径下,比如在 $GOPATH/bin 下
-- 加入如下内容到 .vimrc.before.local 中:
let g:tagbar_type_go = {
\ 'ctagstype' : 'go',
\ 'kinds' : [
\ 'p:package',
\ 'i:imports:1',
\ 'c:constants',
\ 'v:variables',
\ 't:types',
\ 'n:interfaces',
\ 'w:fields',
\ 'e:embedded',
\ 'm:methods',
\ 'r:constructor',
\ 'f:functions'
\ ],
\ 'sro' : '.',
\ 'kind2scope' : {
\ 't' : 'ctype',
\ 'n' : 'ntype'
\ },
\ 'scope2kind' : {
\ 'ctype' : 't',
\ 'ntype' : 'n'
\ },
\ 'ctagsbin' : 'gotags',
\ 'ctagsargs' : '-sort -silent'
\ }
@pyanfield
Copy link
Author

如果出现下面的错误:
neocomplete does not work this version of Vim.
It requires Vim 7.3.885 or above and "if_lua" enabled Vim.

brew uninstall macvim
brew remove macvim
brew cleanup
brew install macvim --custom-icons --override-system-vim --with-lua --with-luajit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment