kimtore / pms

Practical Music Search is an interactive Vim-like console client for the Music Player Daemon.
https://ambientsound.github.io/pms/
MIT License
249 stars 23 forks source link

<Esc> or <C-C> should exit visual mode rather than quit #91

Open tremby opened 7 years ago

kimtore commented 7 years ago

Are keyboard bindings something that should have context? And regardless of that, should these keyboard shortcuts be hard-coded?

tremby commented 7 years ago

I realize I'm always beating the vim drum here, sorry if it gets old...

In vim bindings do have context. You can set different bindings for the same keystroke depending which mode you're in. map for all modes (I think?) vs imap, nmap, vmap, etc. It's very powerful. I think (so far at least) PMS only has normal and visual modes, right?

I think it'd definitely be good to allow bindings to have mode context. It'd allow this particular feature.

I don't think I have a strong opinion on whether they should be hard-coded. I think perhaps <Esc> and <C-C> should be, since they have meaning beyond the scope of PMS (and beyond the scope of vim).

tremby commented 7 years ago

Then again, maybe being set up that way by default is enough. No strong opinion.