-
Notifications
You must be signed in to change notification settings - Fork 205
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
Added AlignAnnotations
to VMemu
.
#711
Conversation
Caret as a shortcut is far from ideal because it's a regular character one might wish to use to further filter the menu contents using the built-in menu filtering functionality. I suggest |
I wanted to do something like this back in 2012. The only reason I didn't was my laziness. General thoughts:
|
Sure! As I said, it's for experimenting only. But how about @alabuzhev, I strongly disagree. I use horizontal scrolling in the Find All list left and right. This is why I so strongly insisted on adding fast scrolling. Once again, my most important use case is filtering tall and wide log files and analyzing the result. I eventually want something like TextAnalysisTool.NET in Far (the tool is horribly glitchy and not supported anymore). Granted, full functionality is better to implement as a plugin. However, I am not sure if I will ever have enough drive for that, while the Find All list is almost enough. The only two things I miss are this aligning command and showing each found line exactly once with multiple annotations. Both are easy to implement. Well, maybe saving the filtered lines to a file, but that is probably unrelated to Aligning by default on open is an interesting idea. I'll consider it. |
b8146d3
to
b5d53a1
Compare
4c1c1e2
to
fbba1e7
Compare
fbba1e7
to
ae80959
Compare
9291d56
to
1321ef2
Compare
1321ef2
to
41515b8
Compare
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
41515b8
to
152d7ca
Compare
7ac10b4
to
3d0cc04
Compare
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Closing in favor of #789. |
Summary
This draft PR proposes a new feature: vertically aligning found patterns in the Find All list. Now
VMenu
will align items' annotations vertically on pressing caret character (^
).I, for one, very much need this feature to visually compare the near contexts of the found patterns in a large file. I am especially missing this feature when I analyze large log files and want to find something unusual in the list of otherwise similar log lines.
The new behavior can be experimented with on my dev branch. Any feedback is highly appreciated.
Checklist
If not checked, I accept that this work might be rejected in favor of a different great big ineffable plan.
Details
I have a few questions right away:
Alt+Arrow
,Alt+Shift+Arrow
) changed. Currently, short items do not scroll at all, and long items stick to the list's vertical edges, so that there is never "empty" space between the edge and the item text. With this PR, items can be scrolled far beyond the edges until one last character is visible. This behavior is very natural and desirable when scrolling horizontally the list with aligned annotations. However, it looks very strange on regular menus. Does it make sense to tune this behavior? Maybe add a newVMENU_FLAG
?^
) as a shortcut key. Apparently, it is not very convenient to type (long hand moving). I'd prefer usingNumpad5
or maybeCtrl+Numpad5
but for some reasonNumpad5
is not passed toVMenu
fromDialog::ProcessKey
. Are there any reasons for this limitation? Would it be OK to enableNumpad5
forVMenu
?VMenu::ShowMenu
. Are there any reasons to print text piecemeal changing color as we go, like here? The code will become much simpler if we first print the entire line in normal color, and then print hotkeys and annotations over while setting the print position as necessary. It does not look like the functionGotoXY
is expensive. I can see thatScreenBuf::Write
takes a lock, but with this approach we will have less calls toScreenBuf::Write
. What do you think?