Last active
August 29, 2015 14:01
-
-
Save pyanfield/f2a2c489b1405f9fca3c to your computer and use it in GitHub Desktop.
install spf13 to support golang
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' | |
\ } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
如果出现下面的错误:
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