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

Widen criteria for "jumps" #4815

Closed
seanwarman opened this issue Nov 19, 2022 · 3 comments
Closed

Widen criteria for "jumps" #4815

seanwarman opened this issue Nov 19, 2022 · 3 comments
Labels
A-helix-term Area: Helix term improvements C-enhancement Category: Improvements

Comments

@seanwarman
Copy link

Many movements aren't considered "jumps". For example "]" movements or pressing "%" to select the whole file.

After these commands I'd expect to be able to jump the cursor back to my previous position (which is closer to Vim's functionality).

I would even argue to define more movements as jumps than Vim does. For example cursor movements that include counts like "20k" or "3w", could actually be really useful.

@seanwarman seanwarman added the C-enhancement Category: Improvements label Nov 19, 2022
@kirawi kirawi added the A-helix-term Area: Helix term improvements label Nov 19, 2022
@the-mikedavis
Copy link
Member

the-mikedavis commented Nov 19, 2022

You can accomplish this manually by using C-s, or automatically by changing any command you want to add a jumplist entry to include the push_selection command. For example:

# ~/.config/helix/config.toml
[keys.normal]
"%" = ["select_all", "push_selection"]

The jumplist is not meant to be a replacement for #1596

@seanwarman
Copy link
Author

That's brilliant! Thanks.

@seanwarman
Copy link
Author

In the version of helix I have I had to replace "push_selection" for "save_selection" for this to work.

# ~/.config/helix/config.toml
[keys.normal]
"%" = ["select_all", "save_selection"]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-helix-term Area: Helix term improvements C-enhancement Category: Improvements
Projects
None yet
Development

No branches or pull requests

3 participants