-
Notifications
You must be signed in to change notification settings - Fork 91
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
Add the ability to adjust the position of the cursor after the jump #395
Comments
I mistakenly thought that the end mod is when the cursor after the jump is set immediately after the target character, but it is set at the end of the word ( |
Sure 😆 However this time I actually think the difference is actually significant. My suggestion allows using both modes (caret after the word and word before caret) simultaneously. Having a setting to place the caret at the end would not allow this. If you intend to often enable and disable the setting and want to keep using the same keyboard shortcuts, you would be quicker than changing 3 new keyboard shortcuts. However I think that's an exotic use case. @Gruzchick, do you see other benefits of the approach with single checkbox setting or would you be happy with 3 additional actions as I suggested? |
@Clindbergh I just suggested adding the functionality that I needed, without specifying how it would be implemented. I agree that it will be convenient to make the ability to add additional shortcuts |
Hey @Gruzchick/@Clindbergh, thanks for the feedback, this all seems reasonable to me. If either of you do feel like implementing something, AceJump welcomes PRs! One possibility would be to chain together Vim commands to update the caret position after jumping to some specific location. It would be great if custom actions could be composed together without adding a bunch of configuration settings. This kind of advanced customizability was discussed a while ago and would enable a wider set of scriptable events, @chylex might have some suggestions how to do that. |
I experimented with this a while ago, I still have the old code in a branch https://github.com/chylex/IntelliJ-AceJump/blob/experimental-rework/src/main/kotlin/org/acejump/action/AceTagAction.kt They are still hard-coded actions, but it's more flexible than an object GoToDeclaration : AceTagAction() {
override fun invoke(editor: Editor, searchProcessor: SearchProcessor, offset: Int, shiftMode: Boolean, isFinal: Boolean) {
JumpToWordStart(editor, searchProcessor, offset, shiftMode = false, isFinal = isFinal)
ApplicationManager.getApplication().invokeLater { performAction(if (shiftMode) IdeActions.ACTION_GOTO_TYPE_DECLARATION else IdeActions.ACTION_GOTO_DECLARATION) }
}
} Refactoring current enums to |
Some people will find it more convenient if the cursor is positioned after the character. Like in this plugin
https://plugins.jetbrains.com/plugin/9803-acejump-lite
It would be great to add "jump after" mode.
The text was updated successfully, but these errors were encountered: