acejump / AceJump

🅰️ single character search, select, and jump
https://plugins.jetbrains.com/plugin/7086-acejump
GNU General Public License v3.0
1.22k stars 91 forks source link

ideavim command for example "c" in normal mode not working with acejump selection #76

Closed staekblw closed 8 years ago

staekblw commented 8 years ago

Thanks for this great tool.

I use acejump selection with the SHIFT key, after the selection, I want to use idea vim command c to delete the selection, however it not delete the whole selection.

mickaelperrin commented 8 years ago

Indeed, it would be good that when using SHIFT key it will automatically make the selection available in vim.

However, you can use a workaround and switch to visual mode by hitting v before launching AceJump.

breandan commented 8 years ago

Thanks for the feedback! I'll try to see if there is a way to expose text selection to IdeaVim. Right now we are using editor.selectionModel.setSelection(editor.caretModel.offset, toOffset) to update the caret selection model. @vlasovskikh Could you clarify if there is a better way to integrate with IdeaVim's selection model? (cf. AceJumper.kt)

vlasovskikh commented 8 years ago

@breandan IdeaVim doesn't work directly with IntelliJ's selections. It has to activate its own "visual selection" mode in order to be able to work with them. Right now it doesn't activate this mode on events about setting new selection. I believe fixing https://youtrack.jetbrains.com/issue/VIM-510 and https://youtrack.jetbrains.com/issue/VIM-696 would imply that IdeaVim were able to work with such events.

breandan commented 8 years ago

@vlasovskikh Great, thanks for clarifying.

Pausing until further progress is made integrating IdeaVim's selection model with IntelliJ IDEA's selection model. Although it may be possible to deal with IdeaVim directly via an extension - PRs are always welcome. Please refer to VIM-510 and VIM-696 for updates.