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

Enter into folder remap to 'l' #103

Closed
JoseConseco opened this issue Feb 23, 2022 · 4 comments
Closed

Enter into folder remap to 'l' #103

JoseConseco opened this issue Feb 23, 2022 · 4 comments
Labels
enhancement New feature or request

Comments

@JoseConseco
Copy link

Is your feature request related to a problem? Please describe.
Often in other file browsers h and l are mapped to go up and enter into folder respectively.

Describe the solution you'd like

["h"] = fb_actions.goto_parent_dir,  --  yep I iknow it conflicts with show hidden - I remapped it to H
["l"] = actions.select_default,

where :
local actions = require "telescope.actions"

Not a big change but this helped me move into tele- file browser. Grat pugin btw.

@JoseConseco JoseConseco added the enhancement New feature or request label Feb 23, 2022
@fdschmidt93
Copy link
Member

Great plugin btw.

Thanks!

I nevertheless generally agree. My idea was coinciding overhauling mappings (cf #65) with additional features (integrated terminal previewer, toggling file size, time last editted, these sorts of things), though I'm focused on other things atm because for my usage the plugin just works well enough already. So it might take some more time when I'm more free.

@JoseConseco
Copy link
Author

ok I did not checked the pull requests. Good to see u agree with these suggestions. closing this then.

@convers39
Copy link

Is there any plan to merge the PR, not sure why my remapping did not work.

local actions = require "telescope.actions"
local fb_actions = require("telescope").extensions.file_browser.actions

    file_browser = {
      hidden = true,
      hijack_netrw = true,
      grouped = true,
      select_buffer = true,
      sorting_strategy = "ascending",
      initial_mode = "normal",
      default_selection_index = 2,
      mappings = {
        i = {
          ["<C-h>"] = fb_actions.goto_parent_dir,
          ["<C-l>"] = actions.select_default,
          ["<C-H>"] = fb_actions.toggle_hidden,
        },
        n = {
          ["h"] = fb_actions.goto_parent_dir,
          ["l"] = actions.select_default,
          ["H"] = fb_actions.toggle_hidden,
          -- your custom normal mode mappings
        },
      },
    },

@jamestrew
Copy link
Collaborator

["<C-h>"] = fb_actions.goto_parent_dir,
["<C-H>"] = fb_actions.toggle_hidden,

<C-H> and <C-h> are equivalent to vim/nvim so the second ctrl + h is overwriting your first action.
I think other mappings your have should be working.

Is there any plan to merge the PR, not sure why my remapping did not work.

No, we're encourage users to tweak mappings to fit their needs and generally avoid tweaking the default mappings.
I can help if any other issues you might be having with mappings but otherwise, I'll consider this issue closed.

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

No branches or pull requests

4 participants