Has anyone created a vim syntax file for the go language?
The runtimepath option contains a list of paths, separated by commas, where vim looks for plugins, syntax files, etc. On unix, the first path is $HOME/. vim/ (aka ~/. vim/ ), which means that Vim looks for syntax files in your home folder first before it looks anywhere else.
vim-go offers most of the features you may need when developing in Go, like syntax highlighting and folding, autocompletion support via gopls, code linting, quick execution using :GoRun , and more. Next, you'll need to install all the necessary binaries using the :GoInstallBinaries command.
After opening login.sh file in vim editor, press ESC key and type ':syntax on' to enable syntax highlighting. The file will look like the following image if syntax highlighting is on. Press ESC key and type, “syntax off” to disable syntax highlighting.
VIM + Plugins = A Powerful IDE for Go Vim is a fast and lightweight text editor available by default with many Linux distributions and Unix-like operating systems. Vim is widely used to quickly edit text files and make configuration changes.
go.vim
There is also a syntax file on vim.org.
A vim syntax file is included in the Go distribution under misc/vim/ For syntax files for other editors see also: http://go-lang.cat-v.org/text-editors/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With