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

Show pseudo-pending text for ms/mr/md commands #3223

Closed
AceofSpades5757 opened this issue Jul 28, 2022 · 5 comments · Fixed by #4077
Closed

Show pseudo-pending text for ms/mr/md commands #3223

AceofSpades5757 opened this issue Jul 28, 2022 · 5 comments · Fixed by #4077
Labels
A-helix-term Area: Helix term improvements C-enhancement Category: Improvements

Comments

@AceofSpades5757
Copy link
Contributor

Describe your feature request

Add contextual pop-ups, just like when the Match box pops up after pressing m for when Helix is waiting for the input to the next command, like Surround delete.

So, after a user presses m and then d to do a surround delete, it would be nice to have another box either show their available options, or at least give some instructions on what to do next. This could also help with more advanced subcontexts, such as if there was a regex surround delete.

image

@AceofSpades5757 AceofSpades5757 added the C-enhancement Category: Improvements label Jul 28, 2022
@the-mikedavis
Copy link
Member

Surround-delete works on the character pressed after md. There isn't any need to add future expressive power to surround-delete; you can use sub-selections (s) to achieve anything you would want with a regex or special characters.

@AceofSpades5757
Copy link
Contributor Author

@the-mikedavis Thanks. Instead of a pop-up, some sort of indicator would be nice to show that Helix is waiting for additional input to finish the command.

@AceofSpades5757
Copy link
Contributor Author

What about the keys, on the bottom-right of the window, staying until either an input, or canceling?

This is what it looks like after hitting m to open the Match context menu.

image

This character(s) is removed when pressing things like d for surround delete, or r for replace. It would be nice to leave these keys there to indicate that the user is still in the middle of a key sequence.

image

@the-mikedavis
Copy link
Member

Pseudo-pending seems appropriate for this, especially since we use it elsewhere with m commands 👍

If you'd like to take a shot at this, the field is pseudo_pending: Option<String> and you can find an example usage in helix_term::commands::select_textobject.

@the-mikedavis the-mikedavis changed the title Add pop-ups for contexts beyond match Show pseudo-pending text for ms/mr/md commands Aug 10, 2022
@the-mikedavis the-mikedavis added the A-helix-term Area: Helix term improvements label Aug 10, 2022
@AceofSpades5757
Copy link
Contributor Author

I'll take a crack at it.

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

Successfully merging a pull request may close this issue.

2 participants