Skip to content

Conversation

@yerlaser
Copy link
Contributor

@yerlaser yerlaser commented Nov 21, 2025

Please note this is not a replacement for goto_word - that is still the fastest way to navigate within the document window.

However, I was always frustrated by how primitive f/F/t/F family of commands are to select portions of line(s).
This PR allows me to fully replace f/F/t/T in my personal keybindings for a much faster and precise selections within the current or adjacent lines.

Some more details:

  1. When there are multiple selections/cursors the commands bail out to their built-in counterparts
  2. The jump labels should not clash with characters next to the searched one. This allows to narrow the search by adding additional search characters
  3. Pressing Enter moves/extends to end of line similar to what built-in commands do
  4. I don't use and test the non-extend variants and include them here only for completeness
  5. This PR adds the following commands: flash_forward, extend_flash_forward, flash_backward, extend_flash_backward, flash_forward_till, extend_flash_forward_till, flash_backward_till, extend_flash_backward_till

Overall, the code is highly unoptimized and surely contains bugs, hence making it a draft.
And I can understand that the chances of its inclusion are low.
But it's still quite useful for me and I thought it could benefit others, too.

And last but not least many thanks to @shybovycha for the original implementation in this (now rejected) PR: #14644

@CalebLarsen
Copy link
Contributor

This feels like it is still in the spirit of the previous PR which was rejected. I think that this should belong in a plugin, not in helix proper.

@yerlaser
Copy link
Contributor Author

I posted it because it might be useful for some.
But, the PR is not ready yet.
I want to reuse as much existing code as possible so it will become a variant of built-in commands.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants