]> Cypherpunks repositories - gostls13.git/commit
misc: Import/Drop commands for Vim
authorGustavo Niemeyer <gustavo@niemeyer.net>
Tue, 25 Jan 2011 01:36:13 +0000 (11:36 +1000)
committerAndrew Gerrand <adg@golang.org>
Tue, 25 Jan 2011 01:36:13 +0000 (11:36 +1000)
commit4e5e0b1d20f8636be3e576302a4e3a6f59caab3e
treee1e8f03d546bddb707bb0f2f6f2e6d2e561154a2
parent1161d190243ea2849299d3384a2b19e32530789a
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
https://golang.org/cl/4009043
misc/vim/ftplugin/go/import.vim [new file with mode: 0644]
misc/vim/readme.txt