Closed reagle closed 2 weeks ago
Hi,
thank you for the positive feedback and for taking the time to suggest improvements!
if I understand correctly, repro steps would be:
Escape key is purposely meant to clear all and exit the filter file extension - providing an easy and intuitive way to exit.
There is a command for unfolding all. This is meant to unfold all but maintaining the highlights. I’ll add a feature to make it possible to configure keyboard shortcuts for each of folding styles (e.g. ctrl+foo,ctrl+bar
). This way, you can set a shortcut for unfold all file without removing the highlights.
Let me know if this will work for you.
Once again, thanks for your feedback.
NOT OK: Carrer is moved to the beginning of the file
My issue is not with the cursor. It's that when I escape, the viewport is at the top of the file, rather than where the cursor is. In this clip, the cursor is on line 100, I invoke your filter for all "log." lines, move the cursor to line 261, escape, and my viewport is at the top of the document instead on line 261. Moving the cursor left/right restores the viewport to line 261, but the viewport should automatically be on the cursor location (i.e., show_at_center
).
Regarding nr 2
Sorry for not being clear. Imagine I have already folded some of my functions. Then I use your plugin, escape, and now everything is unfolded, which annoys me because I wanted my earlier folds functions to remain folded. I don't know if it's possible (or worth it really) to save the existing folds and restore those on escaping the filter view/fold.
HI,
I've release a new version (2.1.0) where you will be able to configure what happens after clear command runs.
default options are
{ "on_clear_command_options":{ "unfold_regions": true, "remove_highlights": true, "center_viewport_on_carret": true } }
you can override them as you need.
Hope this meets your expectations.
Excellent! Thank you.
Thank you for this package, neat! I've long used Filter Lines and your plugin doesn't create a new tab/file, rather it folds. This is advantageous for navigating to or editing text in the actual file. Some thoughts:
super+k,super+c
), but perhaps on escape it couldshow_at_center
.