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
Ctrl-R in Insert Mode doesn't work? #50
Comments
Anything involving the Ctrl key in Vrapper is always a pain. If Eclipse has a key binding for a Ctrl key then it performs that operation and never tells Vrapper the key was pressed. The only way for Vrapper to receive a Ctrl key press is if you explicitly unbind it from Eclipse first. I'll accept this as a feature request but it's another feature where users would have to modify their Eclipse settings for it to work at all. That doesn't mean it's exceedingly difficult to implement, but most users probably wouldn't know it exists. And I'm just rambling/complaining, this is a valid feature request. :) |
Thanks for the quick response. Is this only a problem in insert mode? Because in normal mode, Ctrl-R works as expected (Redo) even though I didn't unbind Ctrl-R in Eclipse. On the page http://vrapper.sourceforge.net/documentation/?page=3 there is already a passage about quirks (incompatibilities), but it seems to be somewhat incomplete or misleading. For instance, Ctrl-R should be added there, and where it says "visual mode" doesn't it really mean or include "normal mode"? The list should also differentiate between those things that will work when unbinding the corresponding Eclipse key, those that are not implemented yet, but may be implemented some day, and those that will probably never work because of some restrictions in the Eclipse environment. I think if this passage is made a bit more elaborate and detailed, it will help a lot. |
Well I apologize... I was totally wrong. I thought Ctrl+R performing the redo was Eclipse's default action and that it wasn't implemented in Vrapper. I just looked at the code though (which I should do before opening my mouth) and Ctrl+R is mapped to the 'redo' operation only in NormalMode. That's why it only works in NormalMode and not InsertMode. If this was an Eclipse keybinding then the operation would be performed regardless because Eclipse doesn't know or care about Vrapper modes. Also, I don't see any reference to Ctrl+R in our documentation. We really should define a list of the Ctrl keybindings that Vrapper defines which don't conflict with default Eclipse settings. This feature request shouldn't be too bad now that I know we don't have to worry about Eclipse blocking us. And you're right, the documentation needs to be updated regarding Ctrl keybindings. Hopefully I'll be able to play with this over the weekend. Thanks! |
You can ignore this comment, I just wanted a place to stick this until I have time to update the documentation. The following Ctrl keybindings are defined in Vrapper: CDT/JDT optional plugins Normal Mode Insert Mode Visual Mode Command Mode Search Mode |
Ok, I've implemented this feature and updated the unstable update site to include it. Please install the unstable version of Vrapper (0.19.20120323) and play with it a bit. Let me know how it goes. I still need to update the documentation so I won't close this Issue yet. |
Thanks a lot. It works except that Also, when I open an editor with the unstable version, I get an alter with an "Argument cannot be null" message. This is what I found in the logs:
|
Thanks for testing this so quickly! I've made a change to expose the default register Note that I committed my change for the |
FYI. I updated http://vrapper.sourceforge.net/documentation/?page=3 with a better description of which Ctrl commands are available in which mode. I don't think it's exactly the type of information you were looking for but at least now it's more explicit about the fact that |
The better description is helpful, thanks. After uninstalling vrapper and installing the current unstable version again, I can't reproduce the error any more. I'll open a separate bug report if it happens again. |
After a while, the error happened again. Seems to occur only sporadically or under certain conditions like when Vrapper is disabled. Anyway, I have created a separate bug report #51 for this. |
This feature is now implemented. Closing. |
Thanks for the quick implementation. That's a really useful feature. |
Ctrl-R is not working for me in insert mode. When I press Ctrl-R in insert mode, I expect a quote character to be displayed on the status bar and vrapper waiting for a register key (see :h i_ctrl-r in vim), but that does not happen.
The text was updated successfully, but these errors were encountered: