A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/benmills/vimux-golang below:

benmills/vimux-golang: Run golang tests using vimux

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

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.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4