0

When I run this command from the command line:

taskopen -A c6cb317e

It opens an interactive menu for choosing a file. After making a selection, it then opens a file in vim for editing, or, if the selection isn't a text fie, it will open it with an appropriate app.

I'd like to be able to run this command from within the vim command line and then be able to interact with it. So something new | 0read ! taskopen -A c6cb317e will not do the job. I'm not sure if this can be done or if I need to launch it in a tmux pane or something.

7
  • 1
    That sounds similar to this recent question: Can a vim filter be interactive?
    – B Layer
    Dec 3 '21 at 12:48
  • 1
    Does :term taskopen -A... work? Dec 3 '21 at 12:52
  • I just tried with: :term /usr/local/bin/taskopen -c ~/.taskopenrc 7f6b76ab. I get a 60+ lines of vim script gibberish errors beginning with E1187: Failed to source defaults.vim
    – StevieD
    Dec 3 '21 at 17:10
  • Ok, looks like I had a typo in the id bit. Providing a good id still opens the output in a regular vim file. I see the menu options but I'm in vim. No way to interact with the output.
    – StevieD
    Dec 3 '21 at 17:17
  • Ooh, wait. It seems I can actually enter in input. The cursor was not next to the prompt and that confused me. So I input something, then I got a ton of vimscript errors but then it spilled me out into the file so I could edit it. So it's partially working, just very ugly. When I close out the vim file, it also close out the original file, though, too. I'll see if I can iron out these kinks. Thanks!
    – StevieD
    Dec 3 '21 at 17:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.