From 2adfa1e8b9e3c6f5a28d2a4845ce403d8cafb5c4 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Mon, 27 Jul 2020 20:15:01 +0200 Subject: ftplugin/go.vim: Add mapping to run package tests with terminal output The Vim-Go mappings run the tests in a job and add results to the Quickfix list. Add a new mapping that doesn't use Quickfix, and instead just runs the test command for the package that contains the current file, outputting the results to standard output. Gives me an additional alternative to view test results. --- ftplugin/go.vim | 1 + 1 file changed, 1 insertion(+) (limited to 'ftplugin') diff --git a/ftplugin/go.vim b/ftplugin/go.vim index 4cf9e62..dafb134 100644 --- a/ftplugin/go.vim +++ b/ftplugin/go.vim @@ -35,6 +35,7 @@ nmap Zc (go-test-compile) nmap Zf (go-imports) nmap z (go-test) nmap Z (go-test-func) +nnoremap Zs :execute '!go test ' . fnameescape(expand('%:p:h')) nmap z (go-alternate-edit) nmap z (go-alternate-vertical) -- cgit v1.2.3