Run golang tests using vimux
Latest commit 1c5ecbe Mar 21, 2014 @benmills Merge pull request #4 from haarts/master
Adds Fish compatibility.
Failed to load latest commit information.
plugin Adds Fish compatibility. Mar 21, 2014
README.mkd Update README.mkd Sep 4, 2013



Run golang tests in vim.


Add this to your .vimrc or inside .vim/ftplugin/go.vim if you want only use this mapping with files that have the go filetype.

map <Leader>ra :wa<CR> :GolangTestCurrentPackage<CR>
map <Leader>rf :wa<CR> :GolangTestFocused<CR>

GolangTestFocused will find the first func above your current line that starts with Test and run that with go test -run <test name>. If you're using examples this plugin will use rather than -run.

This plugin assumes you will be testing the local package. For example if you run GolangTestCurrentPackage the resulting command would be: go test -v ..


With vim-bundle: vim-bundle install benmills/vimux-golang

Otherwise download the latest tarball, extract it and move plugin/vimux-golang.vim inside ~/.vim/plugin. If you're using pathogen, then move the entire folder extracted from the tarball into ~/.vim/bundle.