Skip to content
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

Unable to do df motion with ideavim #397

Open
megawubs opened this issue Feb 18, 2022 · 4 comments
Open

Unable to do df motion with ideavim #397

megawubs opened this issue Feb 18, 2022 · 4 comments

Comments

@megawubs
Copy link

Describe the bug
Unable to do df motion with ideavim.

To Reproduce
Steps to reproduce the behavior:

  1. Install & Enable the AceJump plugin
  2. Add the following to .ideavimrc:
" Press `f` to activate AceJump
map f :action AceAction<cr>
" Press `F` to activate Target Mode
map F :action AceTargetAction<cr>
" Press `g` to activate Line Mode
map g :action AceLineAction<cr>

(taken from the readme)
4. Go to a file with some text. Hit df and see action AceAction being pasted on the current cursor position

Expected behavior
I expect to be able to use the df[char] vim motion to delete forward to a given char.

Screenshots
image

Desktop (please complete the following information):

  • OS: macOS Monterey
  • IDE and version: PHPStorm 2021.3.2
  • AceJump version: 3.8.5
@megawubs megawubs added the bug label Feb 18, 2022
@breandan
Copy link
Collaborator

breandan commented Feb 18, 2022

Thank you for reporting. The documentation for IdeaVim bindings could be improved, but I don't think this is a bug with AceJump specifically. If you want to delete to a character using the suggested .ideavimrc configuration, first type f to activate AceJump, then search for some text. When it comes time to make the final jump, press and hold Shift, then type the tag character to select all text from the current cursor position to that destination. Finally, press x to delete the text. Does that make sense?

@megawubs
Copy link
Author

Thanks, and yes it makes sense! I just have to retrain my brain to not use df anymore.

But I still find it odd that the text action AceAction is pasted at the current cursor position. It looks like it tries to do something, but fails

@breandan
Copy link
Collaborator

breandan commented Feb 18, 2022

Yes, that is odd. I can reproduce, but I think it might be an issue for IdeaVim. Perhaps we could suggest better defaults. There are other mappings that only apply in certain modes.

@chylex
Copy link
Collaborator

chylex commented Jul 27, 2023

I did implement support (or hack) for supporting IdeaVim with d/c/y followed by AceJump commands in my fork: https://github.com/chylex/IntelliJ-AceJump/blob/c31ba609099058c3f7fa38255e58b5e40a0817de/src/main/kotlin/org/acejump/vim/AceVimHandler.kt

If there's interest, I can look into adding support into upstream AceJump, though having support from IdeaVim's side sounds like a better idea, so maybe I could look into a PR for IdeaVim first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants