Add GoLang Syntax Highlighting for VIM
You're looking to set up GoLang syntax highlighting for VIM. While the instructions you're following are generally correct, they no longer apply to the latest Go distributions.
Update:
Go 1.4 and later no longer include Go support files for editors. This information has been moved to a curated wiki page.
Solution:
Instead of the instructions you found at http://go-lang.cat-v.org/text-editors/vim/, follow these steps:
" Clear filetype flags before changing runtimepath to force Vim to reload them. filetype off filetype plugin indent off set runtimepath+=$GOROOT/misc/vim filetype plugin indent on syntax on
Note that you may need to adjust the path to $GOROOT/misc/vim depending on your installation. Once you've completed these steps, GoLang syntax highlighting should be enabled in VIM.
以上是如何使用 Go 1.4 及更高版本在 VIM 中啟用 GoLang 語法突出顯示?的詳細內容。更多資訊請關注PHP中文網其他相關文章!