VIM编辑器下go语法高亮显示 大石头的笔记 2019-11-11 184 阅读1分钟 Go in VimThe standard Go distribution includes a Go syntax file for Vim in go/misc/vim/.Installation InstructionsPlace $GOROOT/misc/vim/syntax/go.vim in ~/.vim/syntax/ and put the following in ~/.vim/ftdetect/go.vim:au BufRead,BufNewFile *.go set filetype=goExtras and Alternative FilesAn alternative indent file for Vim by Alecs King can be found here.AutocompletionThe gocode daemon by nsf includes a vim script to do autocompletion.OtherSee the vim-golang repo in Github for alternative syntax highlight, auto-indentation, gofmt and other useful scripts and plugins.