Skip to content

benmills/vimux-golang

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 

Repository files navigation

vimux-golang

Run golang tests in vim.

Usage

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 -examples.run 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 ..

Installation

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.

About

Run golang tests using vimux

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •