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

feature request: Allow for configuring prompt keywords for accepting change #114

Closed
1 task done
hkupty opened this issue May 25, 2023 · 1 comment
Closed
1 task done
Labels
enhancement New feature or request

Comments

@hkupty
Copy link

hkupty commented May 25, 2023

Did you check existing requests?

  • I have searched the existing issues

Describe the feature

I would like the ability to configure oil to prompt me with [Y]es/[N]o instead of [O]k/[C]ancel.

I searched but I couldn't find anything on that, so sorry if I'm asking for something that exists already..

The reason for that is so it matches the default (and usual muscle memory) of y for accepting instead of o.
I've noticed that for several times I've got stuck with the cursor pending because I pressed o in the confirmation screen when it should've been o instead.

Of course, leaving that as a configuration as I believe some people are already used to o/c :)

Provide background

No response

Additional details

No response

@hkupty hkupty added the enhancement New feature or request label May 25, 2023
@stevearc
Copy link
Owner

stevearc commented Jun 1, 2023

It's easy enough to add a mapping for y

vim.api.nvim_create_autocmd("FileType", {
  pattern = "oil_preview",
  callback = function(params)
    vim.keymap.set("n", "y", "o", { buffer = params.buf, remap = true, nowait = true })
  end,
})

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

2 participants