Created
December 17, 2012 20:34
-
-
Save benmills/4321941 to your computer and use it in GitHub Desktop.
Include in `/.vim/ftplugin/go.vim`
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function! GolangCurrentPackage() | |
let packageLine = search("package", "s") | |
'' | |
let packageName = split(getline(packageLine), " ")[1] | |
return packageName | |
endfunction | |
function! GolangTestCurrentPackage() | |
call VimuxRunCommand("clear;go test " . GolangCurrentPackage()) | |
endfunction | |
map <silent> <LocalLeader>rb :wa<CR> :call RunTests()<CR> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment