vimux-golang icon indicating copy to clipboard operation
vimux-golang copied to clipboard

Tests don't run from project root

Open jhillyerd opened this issue 11 years ago • 3 comments

vimux-golang currently assumes you will :cd into the package you want to test. This is cumbersome if you have several packages in your golang app and want to keep the vim working directory at the base of your project.

Would it be possible to change the tmux pane directory to %:p:h (head of the full path of the file being edited) before issuing the test command?

jhillyerd avatar Oct 14 '13 21:10 jhillyerd

That sounds reasonable. If you want to put together a PR that would be awesome, otherwise I'll get to this when I dive back into some of my go projects in the near future.

benmills avatar Oct 14 '13 21:10 benmills

I will give it a shot - I don't have much vimscript experience yet so I may crash and burn. :)

jhillyerd avatar Oct 14 '13 22:10 jhillyerd

It's easier than you think! Learn Vimscript The Hard Way[1] is a great resource (you don't actually need to read all of it just look at table of contents and read sections you need). Feel free to drop code in here if you need some help.

[1] http://learnvimscriptthehardway.stevelosh.com/

On Mon, Oct 14, 2013 at 3:58 PM, James Hillyerd [email protected]:

I will give it a shot - I don't have much vimscript experience yet so I may crash and burn. :)

— Reply to this email directly or view it on GitHubhttps://github.com/benmills/vimux-golang/issues/1#issuecomment-26295922 .

benmills avatar Oct 14 '13 23:10 benmills