sassanh / qnvim

Neovim backend for Qt Creator
MIT License
134 stars 8 forks source link

Use normal QtCreator Shortcuts #13

Closed tom-anders closed 5 years ago

tom-anders commented 5 years ago

In FakeVim, I can still use most of the QtCreator shortcuts, like F2 for following a symbol or Ctrl+K for opening the locator. However, with qnvim this doesn't seem to work. Is there a way to unmap some shortcuts in qnvim to send them directly to QtCreator?

sassanh commented 5 years ago

@tom-anders unfortunately neovim doesn't provide what's needed to achieve this in its API: https://github.com/neovim/neovim/issues/8029

Because neovim doesn't let us know if a key sequence has been consumed or has been ignored we can't pass ignored key sequences to Qt Creator.

Currently there's a workaround though, you can redefine those shortcuts in your qnvim.vim file, take a look at this as an example:

https://github.com/sassanh/qnvim/blob/e147ec83baf22eb294925d05fa8405c1432ed191/.qnvimrc#L24

Similarly you can assign a shortcut to whatever Qt Creator action you want, you can find the name of Qt Creator actions in keyboard shortcuts settings page in Qt Creator

tom-anders commented 5 years ago

Ah nice, exactly what I was looking for, thanks!