It would be nice to have an option which 'force' the Vi Insert mode to be exactly the same as regular kate editing, with the usual kate key bindings. I mean, Vi Insert Mode key bindings are not emulated. For example, a shortcut which isn't available in Vi Insert Mode is: "ctrl+shift+left" (word selection). With this option, Vi Mode could be seem as a super set of kate functionalities (since nothing is different in Vi Insert Mode, plus adding the power of Vi Normal/Visual Mode). I find this specially useful, for example, in kdevelop where there are many shortcuts that can be still used when Vi Mode is selected. Currently, after Vi Mode is selected (in the Kate configuration panel) the user defined shortcuts aren't available (probably this is a different bug/request). This approach is successfully used in vintage, the vim plugin for sublime. Reproducible: Always
I'm honestly not specially in favor of this. Call me a vim purist if you want :) I'm not marking this as "WONTFIX" or anything like that because if someone steps in and writes a good patch I might change my mind :) Thanks for the bug report anyways :)
Yes, I agree it shouldn't be the default option, but I would like to have it. I am not familiar with the development process but I would like to try. Could you (or someone else) point me out where I should look as an starting point? I mean, at some point the shortcuts are redefined for the insert mode, where is this happening in the code? Thanks!
Hi Pablo, the vi-mode should only "eat" the keys that are doing something. If it's not interested in those it let's the shortcut system to done it's job. Try to turn of "Let Vi commands override Kate shortcuts", maybe that's what you are looking for.
Hi Michal, Thanks for the answer! When I turn off "Let Vi commands override Kate shortcuts" option, it is almost what I am looking (for insert mode) except that some shortcuts doesn't work, e.g.: "shift+left" (char selection) and "ctrl+shift+left" (word selection). This might be a different bug. So, even with this option off, there are some differences with the regular kate editing. And the real problem with this option is that I want to have the vim navigation like "ctrl+d" and "ctrl+u". I would rather prefer to have two different options: 1. "Let Vi commands override Kate shortcuts" (in normal mode) 2. "Let Vi commands override Kate shortcuts" (in insert mode). Or another text like: "Vi insert mode as regular kate editing." I've tried to "fix" this request myself, but I couldn't figure out where the vi-mode "eats" the keys. I think it is in 'KateView::deactivateEditActions()'. Another place I was looking at is: part/view/kateviewinternal.cpp:2337: if ( getViInputModeManager()->getCurrentViMode() == InsertMode but then... I don't know what to do :P Thanks!
As for the where to find the code responsible for this, it's in the KateViewInternal::eventFilter and KateViewInternal::keyPressEven which unfortunatelly is one of the most complicated parts. And on top of that KateView::deactivateEditActions plays it's role too. As for the ovveride switch, we could probaly end up in with more fine grained key binding system in the future. But it's not a near future.
Dear user, this wish list item is now closed, as it wasn't touched in the last two years and no contributor stepped up to implement it. The Kate/KTextEditor team is very small and we can just try to keep up with fixing bugs. Therefore wishs that show no activity for two years or more will be closed from now on to keep at least a bit overview about 'current' wishs of the users. If you want your feature to be implemented, please step up to provide some patch for it. If you think it is really needed, you can reopen your request, but keep in mind, if no new good arguments are made and no people get attracted to help out to implement it, it will expire in two years again. We have a nice website kate-editor.org that provides all the information needed to contribute, please make use of it. For highlighting improvements our user manual shows how to write syntax definition files. Greetings Christoph