Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Multi-select style actions #807

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

feat: Multi-select style actions #807

wants to merge 4 commits into from

Conversation

tjdevries
Copy link
Member

WIP: Will update this later :)

Also will try and fix:

And I'll add docs when I'm done as well. Hopefully this is backwards compat, so when testing, please let me know if you experience breaking changes.

tjdevries and others added 4 commits April 28, 2021 11:50
Now you can pass the entry that you want to take the action on for both
actions and action sets. This is part 1 of being able to do things like
taking actions on multiple entries, but only writing code for one :)
@fdschmidt93
Copy link
Member

With functional wrappers around selections & entries (see #931 and telescope.actions.utils) and telescope-hop.nvim in place, I'd be happy to take this over @tjdevries :) (after my vacation next week tho) If you prefer to work on that; no worries, I'd still love to see neogit or maybe neorg having full built-in telescope integration 😅

I'd have in mind that, for any action applicable, you should have full flexibility in running them on (i) the currently selected entry, (ii) all entries, (iii) a particular multi selection (if I understand context correctly), (iv) all multi selections. My design would be to ultimately wrap the actions into something like this:

local actions = require 'telescope.actions'
local action_utils = require 'telescope.actions.utils'
telescope.setup {
  defaults = {
    mappings = {
      i = {
        ["<C-v>"] = action_utils.with_selections(actions.select_vertical),
        -- obviously only for builtin.git_status :)
        ["<C-s>"] = action_utils.with_entries(actions.git_staging_toggle)
      },
    },
  },

Let me know what you think :)

@Integralist
Copy link

Looks like this PR might have long gone stale.

Does anyone know if there's a workaround for selecting multiple files in telescope yet as this is quite a key missing feature compared to FZF.

Thanks.

@Conni2461
Copy link
Member

Conni2461 commented Jul 1, 2022

we currently dont have the time to finish this in a somewhat good interface, so it also works for extensions. Its not planned for telescope 0.1 and is scheduled for post 0.1. See #1938

There is an issue with workarounds for it #1048 provided by the community

@rkulla
Copy link

rkulla commented Sep 2, 2023

+1 very much looking forward to this being official. Being able to select multiples (with TAB) but not being able to open them still is a bummer. Especially for a feature I use multiple times a day every day but I will try the workarounds.

@max397574
Copy link
Contributor

I think for now sending to quickflist is the best alternative when you can't open the files directly

@rkulla
Copy link

rkulla commented Sep 2, 2023

I think for now sending to quickflist is the best alternative when you can't open the files directly

Yeah, I can stand that with vim-bqf's features but it's still a different feature all together. Luckily I have both now thanks to vim-bqf and this workaround

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants