Skip to content
This repository has been archived by the owner on May 2, 2018. It is now read-only.

Commit

Permalink
misc/vim: reorganize plugin so it uses ftplugin and syntax
Browse files Browse the repository at this point in the history
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
  • Loading branch information
jnwhiteh authored and adg committed Jun 20, 2010
1 parent a674c02 commit d67717c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions misc/vim/ftdetect/gofiletype.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
au BufRead,BufNewFile *.go setfiletype go
12 changes: 12 additions & 0 deletions misc/vim/readme.txt
Original file line number Diff line number Diff line change
@@ -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
File renamed without changes.

0 comments on commit d67717c

Please sign in to comment.