diff --git a/misc/vim/ftdetect/gofiletype.vim b/misc/vim/ftdetect/gofiletype.vim new file mode 100644 index 0000000000..b67dab0abe --- /dev/null +++ b/misc/vim/ftdetect/gofiletype.vim @@ -0,0 +1 @@ +au BufRead,BufNewFile *.go setfiletype go diff --git a/misc/vim/readme.txt b/misc/vim/readme.txt new file mode 100644 index 0000000000..eaa839eb7a --- /dev/null +++ b/misc/vim/readme.txt @@ -0,0 +1,12 @@ +Vim syntax highlighting for Go (http://golang.org) +================================================== + +To install automatic syntax highlighting for GO programs: + + 1. Copy ftplugin/gofiletype.vim to the ftplugin directory underneath your vim + runtime directory (normally $HOME/.vim/ftplugin) + 2. Copy syntax/go.vim to the syntax directory underneath your vim runtime + directory (normally $HOME/.vim/syntax) + 3. Add the following line to your .vimrc file (or equivalent): + + syntax on diff --git a/misc/vim/go.vim b/misc/vim/syntax/go.vim similarity index 100% rename from misc/vim/go.vim rename to misc/vim/syntax/go.vim