首页 > PHP资讯 > PHP培训技术 > VIM编辑器下go语法高亮显示

VIM编辑器下go语法高亮显示

PHP培训技术
Go in Vim

The standard Go distribution includes a Go syntax file for Vim in go/misc/vim/.

Installation Instructions

Place $GOROOT/misc/vim/syntax/go.vim in ~/.vim/syntax/ and put the following in ~/.vim/ftdetect/go.vim:

au BufRead,BufNewFile *.go set filetype=go

Extras and Alternative Files

An alternative indent file for Vim by Alecs King can be found here.

Autocompletion

The gocode daemon by nsf includes a vim script to do autocompletion.

Other

See the vim-golang repo in Github for alternative syntax highlight, auto-indentation, gofmt and other useful scripts and plugins.

PHP培训技术

本文由欣才IT学院整理发布,未经许可,禁止转载。
支持31不支持0