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

Add another key-binding to execute commands directly. #11

Closed
LinArcX opened this issue Dec 16, 2021 · 1 comment · May be fixed by #12
Closed

Add another key-binding to execute commands directly. #11

LinArcX opened this issue Dec 16, 2021 · 1 comment · May be fixed by #12

Comments

@LinArcX
Copy link

LinArcX commented Dec 16, 2021

Hi. I'm using cheatsheet.nvim and mostly use it to call/run my custom commands and functions.

The only annoying issue is that it always filled in the command line if the selection row is a command.

I think you designed it in this way to let users edit the commands before run it? But me personally (for 90% of time) don't need to edit commands and just need to run them immediately.

In my opinion, we can add another keybinding like <Ctrl-r> (or whatever you prefer) for filling the command line and keep the <ENTER> to execute commands directly.

@LinArcX LinArcX changed the title It's better to execute commands directly. Add another key-binding to execute commands directly. Dec 16, 2021
@sudormrfbin
Copy link
Owner

Hi @LinArcX ! Thanks for the PR, but I added a more configurable way of changing the keybinds in 9716f9a which also adds Alt-Enter as a default keybind for directly executing commands. Rebinding is also possible, so if you want to use Enter to directly execute and Alt-Enter to fill the command line:

require('cheatsheet').setup({
    telescope_mappings = {
        ['<CR>'] = require('cheatsheet.telescope.actions').select_or_execute,
        ['<A-CR>'] = require('cheatsheet.telescope.actions').select_or_fill_commandline,
    }
})

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 a pull request may close this issue.

2 participants