tobias-z / vscode-harpoon

A vscode extension inspired by the neovim plugin Harpoon created by The Primeagen

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Delete Editor from Editor Quick Pick

LaurensUP opened this issue · comments

Is your feature request related to a problem? Please describe.
I believe the Edit Editors text file can become redundant.

Describe the solution you'd like
Open Editor Quick Pick -> Select Editor -> Hit Delete key -> Harpooned Editor is deleted

Describe alternatives you've considered
Opening the Edit Editors view and deleting the line there. This takes 3 extra steps: deleting the line, saving, and closing the tab.

Hello there, thank you for your interest in the project.

As far as I'm aware, it doesn't seem to be possible to create keybindings as you suggest in a quick pick selection.

If you know of some way to do this, I would gladly implement it for you, however I don't and I'm unable to find any docs on doing it.

I've not developed a VSCode extension myself, but checked a few things.
As far as I can see, it's indeed not possible at the moment to catch key events in the Quick Pick menu.

  1. One solution could be to create a multi-step quick pick

Open quick pick -> Select Editor -> Enter -> Open / Delete option,
but I don't think this is ideal as it introduces an extra step to open the file.

  1. I also found there are "buttons" you can add to the Quick Pick selector https://code.visualstudio.com/api/references/vscode-api#QuickPickItem

Anyway, I've bound alt+shift+[1-4] to harpoon tabs, and alt+[1-4] to fetch them, and it works amazingly well for me :)
I can simply overwrite the harpoons that I want to "delete", and am using it without the harpoon list menus at the moment.
Thanks a bunch for this extension I didn't know I need this badly :)

1. One solution could be to create a multi-step quick pick

Open quick pick -> Select Editor -> Enter -> Open / Delete option, but I don't think this is ideal as it introduces an extra step to open the file.

Yeah i agree this would not be idea, as it would introduce a possibly unwanted step for all users of the extension.

2. I also found there are "buttons" you can add to the Quick Pick selector https://code.visualstudio.com/api/references/vscode-api#QuickPickItem

This sounds like an interesting idea, I will test it out when I get find the time for it.

Thanks a bunch for this extension I didn't know I need this badly :)

No problem! I'm just happy that people are using it 😄

I have implemented this through the button we talked about. It will there in the next release