mirror of
https://github.com/golang/go
synced 2024-11-21 14:14:40 -07:00
misc/vim: reorganize plugin so it uses ftplugin and syntax
This sets up vim to work out of the box with go programs as long as syntax highlighting is enabled. Both files must be copied to the vim runtime directory in order for the file-type detection and syntax loading to work. R=golang-dev, adg CC=golang-dev https://golang.org/cl/1723044
This commit is contained in:
parent
a674c024c7
commit
d67717c29b
1
misc/vim/ftdetect/gofiletype.vim
Normal file
1
misc/vim/ftdetect/gofiletype.vim
Normal file
@ -0,0 +1 @@
|
||||
au BufRead,BufNewFile *.go setfiletype go
|
12
misc/vim/readme.txt
Normal file
12
misc/vim/readme.txt
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user