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

Allow toggling keyboard shortcuts #784

Closed
wcerfgba opened this issue Sep 19, 2020 · 0 comments · Fixed by #796
Closed

Allow toggling keyboard shortcuts #784

wcerfgba opened this issue Sep 19, 2020 · 0 comments · Fixed by #796

Comments

@wcerfgba
Copy link
Contributor

wcerfgba commented Sep 19, 2020

I like the default Paredit keymap, but I find myself needing to use the standard VSCode editing shortcuts a lot as well. For example, when editing a comment or a string, I would like to move by word using the Ctrl+<ArrowKey> shortcuts.

I have implemented an additional config option and keyboard shortcut to allow toggling keyboard shortcuts on or off, so users can easily toggle -- similar to modal editing in Vim.

PR incoming! 🚀

wcerfgba pushed a commit to wcerfgba/calva that referenced this issue Sep 19, 2020
Closes BetterThanTomorrow#784

We introduce a `calva.paredit.enabled` config option and a
`paredit.toggleenabled` command which allows toggling Paredit on and off
wile preserving the current mode. The paredit keybindings are updated
to only activate when the `paredit:enabled` context key is true, in
addition to the existing conditions on the keymap. Finally, the Paredit
StatusBar component is updated to receive a `KeyMapConfig` object
containing `keyMap` and the new `enabled` boolean, and a new path is
added in the UI state management to handle this case as distinct from
the 'none' keyMap case.
wcerfgba pushed a commit to wcerfgba/calva that referenced this issue Sep 20, 2020
Closes BetterThanTomorrow#784

We introduce a `calva.paredit.keybindingsEnabled` config option and a
`paredit.toggleKeybindingsEnabled` command which allows toggling Paredit
keybindings on and off while preserving the current mode. The Paredit
keybindings are updated to only activate when the
`paredit:keybindingsEnabled` context key is true, in addition to the
existing conditions on the keymap. Finally, the Paredit StatusBar
component is updated to receive a `KeyMapConfig` object containing
`keyMap` and the new `keybindingsEnabled` boolean, and a new path is
added in the UI state management to handle this case as distinct from the
'none' keyMap case.
wcerfgba pushed a commit to wcerfgba/calva that referenced this issue Sep 20, 2020
Closes BetterThanTomorrow#784

We introduce a `calva.paredit.keybindingsEnabled` config option and a
`paredit.toggleKeybindingsEnabled` command which allows toggling Paredit
keybindings on and off while preserving the current mode. The Paredit
keybindings are updated to only activate when the
`paredit:keybindingsEnabled` context key is true, in addition to the
existing conditions on the keymap. Finally, the Paredit StatusBar
component is updated to receive a `KeyMapConfig` object containing
`keyMap` and the new `keybindingsEnabled` boolean, and a new path is
added in the UI state management to handle this case as distinct from the
'none' keyMap case.
@wcerfgba wcerfgba changed the title Allow toggling Paredit function independently of mode Allow toggling keyboard shortcuts Sep 21, 2020
wcerfgba pushed a commit to wcerfgba/calva that referenced this issue Sep 21, 2020
Closes BetterThanTomorrow#784

We introduce a `calva.keybindingsEnabled` config option and a
`calva.toggleKeybindingsEnabled` command which allows toggling
keybindings on and off. The keybindings are updated to only activate
when the `calva:keybindingsEnabled` context key is true, in addition to
the existing conditions on the keymap.
wcerfgba pushed a commit to wcerfgba/calva that referenced this issue Sep 22, 2020
Closes BetterThanTomorrow#784

We introduce a `calva.keybindingsEnabled` config option and a
`calva.toggleKeybindingsEnabled` command which allows toggling
keybindings on and off. The keybindings are updated to only activate
when the `calva:keybindingsEnabled` context key is true, in addition to
the existing conditions on the keymap.
@PEZ PEZ closed this as completed in 482f318 Oct 11, 2020
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.

1 participant