joerdav / xc

Markdown defined task runner.
https://xcfile.dev/
MIT License
1.16k stars 27 forks source link

feature request / idea: interactive menu #5

Closed a-h closed 1 year ago

a-h commented 2 years ago

From Vim, it would be great if you could hit, leader t or something, to list xc tasks and run one.

So you'd press leader t, then 1, 2 etc. to run that task, or escape to quit.

:map <leader>t :!xc build<cr>

Unfortunately, interactive commands produce a mess of escape codes in Vim.

Screenshot 2022-01-29 at 14 07 39

However, something like https://github.com/christoomey/vim-run-interactive would need to be used to provide the interactivity of the picklist.

joerdav commented 2 years ago

I agree this would be really valuable. I've added a temporary solution for now by exposing 2 new options you can use fzf to provide this.

f2d8bec

Here's how to use it: https://github.com/joe-davidson1802/xc#vim-usage

I'll keep this issue open until I create a vim plugin to do this, and make sure all cases are covered.

waldyrious commented 1 year ago

It looks like the Vim usage docs introduced in f2d8bec were later removed in commit 377b957 from #9. Was that intentional, or perhaps an overlook?

joerdav commented 1 year ago

@waldyrious good spot, this wasn't intentional, I intended to move it. I think it would fit well in a new docs page "IDE Support" or something similar. What do you think?

waldyrious commented 1 year ago

Yeah, sounds good to me. I don't use Vim myself, so I'll leave it to others to contribute that page :)

adriens commented 1 year ago

maybe a warp one cool be cool (nerd alert)

joerdav commented 1 year ago

From what I can see warp is a terminal, should work with xc as is?

joerdav commented 1 year ago

This capability was documented with 97f60c47e08577f76d340728729147ea0f6d1288

waldyrious commented 1 year ago

This capability was documented with 97f60c4

Nice! That was fast :grin:

I'll keep this issue open until I create a vim plugin to do this, and make sure all cases are covered.

Just to be sure, did you change your mind on that goal?

joerdav commented 1 year ago

Yes, for now. It feels like overkill when it works with one line of config. Not that it'll never be done but doesn't feel necassary!