Add a Vim syntax highlighting file for Go.

APPROVED=rsc
DELTA=190  (190 added, 0 deleted, 0 changed)
OCL=35073
CL=35128
Add 'copy' as a Go builtin function for Vim syntax highlighter spec.

R=rsc
http://codereview.appspot.com/163049

Committer: Russ Cox <rsc@golang.org>
Add new complex types, functions and literals to Vim syntax file.

R=rsc
CC=golang-dev
http://codereview.appspot.com/224042

Committer: Russ Cox <rsc@golang.org>
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
http://codereview.appspot.com/1723044

Committer: Andrew Gerrand <adg@golang.org>
misc/vim: clarifies syntax highlighting installation instructions

Based on the review of CL 1723044, I've changed the installation instructions
for the vim syntax files to suggest symlinking the files rather than copying
the files. Also the wording has changed to be more consistent.

R=golang-dev, Kyle Lemons, adg
CC=golang-dev
http://codereview.appspot.com/1702045

Committer: Andrew Gerrand <adg@golang.org>
misc/vim: always override filetype detection for .go files

R=adg
CC=golang-dev
http://codereview.appspot.com/1665043
misc/vim: updated syntax file to recognize constants of the form 1e9

R=rsc, adg
CC=golang-dev
http://codereview.appspot.com/1864042

Committer: Andrew Gerrand <adg@golang.org>
misc/vim: highlight misspelled words only in comments

R=adg
CC=golang-dev
http://codereview.appspot.com/1915043

Committer: Andrew Gerrand <adg@golang.org>
misc/vim: update list of builtins.

R=adg
CC=golang-dev
http://codereview.appspot.com/2807041

Committer: Andrew Gerrand <adg@golang.org>
misc: update type + builtin lists found in editor support files

R=adg, dsymonds
CC=golang-dev
http://codereview.appspot.com/4072041
misc: Import/Drop commands for Vim

New ftplugin adds Import and Drop commands for Go buffers
in Vim.  These commands ensure that the provided package is
imported (or not imported) in the current Go buffer, using
proper style and ordering, without moving the cursor.

E.g.

    :Import strings
    :ImportAs . strings
    :Drop strings

Two mappings are also introduced to help with the fmt package:

    \f => :Import fmt
    \F => :Drop fmt

R=adg
CC=golang-dev
http://codereview.appspot.com/4009043

Committer: Andrew Gerrand <adg@golang.org>
misc/vim/syntax: set large value to 'syntax sync'.

R=golang-dev, dsymonds, adg
CC=golang-dev
http://codereview.appspot.com/4102044

Committer: Andrew Gerrand <adg@golang.org>
misc/vim: Document better syntax sync parameter

Forcing the synchronization of 500 lines is both slower and
less precise than searching for a known sync point.
Unfortunately, though, the way to synchronize correctly is
using the grouphere instruction, which has a bug.

I've already proposed the fix to Vim, so future releases
should have this working.  We can continue using the 500 lines
syncing for now.

This change just documents the proper way to sync.

R=adg, dsymonds
CC=golang-dev
http://codereview.appspot.com/4029047

Committer: Andrew Gerrand <adg@golang.org>
misc/vim: Define import commands on buffer switch

This change fixes the import plugin so that the
defined commands are available when opening a new
Go buffer from within Vim itself.

R=adg, rsc
CC=golang-dev
http://codereview.appspot.com/3998053

Committer: Andrew Gerrand <adg@golang.org>
misc/vim: Add indent script for Vim

R=adg
CC=golang-dev
http://codereview.appspot.com/4258041

Committer: Andrew Gerrand <adg@golang.org>
misc/vim: remove 'closed' as a builtin function.

R=adg, r
CC=golang-dev
http://codereview.appspot.com/4285059
misc/vim: update type highlighting for new reflect package

R=adg
CC=golang-dev
http://codereview.appspot.com/4385051
misc/vim: add plugin with Fmt command.

Fmt command filters the current Go buffer through gofmt.
It tries to preserve cursor position and avoids replacing
the buffer with stderr output.

R=golang-dev, dsymonds, niemeyer
CC=golang-dev
http://codereview.appspot.com/4382053

Committer: David Symonds <dsymonds@golang.org>
misc/vim: new Vim indentation script.

This uses a fully custom function for indenting Go code in Vim.
It provides a lot more flexibility than a cindent-based approach,
so this version gets the := operator correct, as well as switch
labels and jump labels.

One outstanding TODO is to handle lines immediately after jump labels.

R=adg, n13m3y3r, jnwhiteh, dchest, rsc, rlight2
CC=golang-dev, rivercheng
http://codereview.appspot.com/4534047
misc/vim: drop indent support for jump labels.

It interferes with keys in composite literals,
which are much more common.

R=dchest, jnwhiteh, rlight2
CC=golang-dev
http://codereview.appspot.com/4521065