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

remapping 'close sidebar' to single key like 'q' breaks typing #157

Open
alok opened this issue Aug 24, 2020 · 2 comments
Open

remapping 'close sidebar' to single key like 'q' breaks typing #157

alok opened this issue Aug 24, 2020 · 2 comments
Labels
good first issue Good for newcomers vim

Comments

@alok
Copy link

alok commented Aug 24, 2020

If I map q to close the sidebar but then try to type anything in that sidebar that requires me to press q in insert mode, it types the letter q and exits.

@tntmarket
Copy link
Contributor

tntmarket commented Aug 27, 2020

Currently, the "close sidebar" shortcut works in all modes. Maybe we should make it only work in normal mode: I think it'd just mean changing map to nmap here: https://sourcegraph.com/github.com/roam-unofficial/roam-toolkit@master/-/blob/src/ts/core/features/vim-mode/commands/panel-commands.ts#L20:1

@tntmarket tntmarket added good first issue Good for newcomers vim labels Aug 27, 2020
@Stvad
Copy link
Member

Stvad commented Aug 27, 2020

I think it's actually nice to have it working in insert mode. That said - as this issue highlights - it's not very meaningful to allow 1-char mappings for insert mode.
I think ultimately it'd be nice to allow people to select what modes given shortcut applies in

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers vim
Projects
None yet
Development

No branches or pull requests

3 participants