-
Notifications
You must be signed in to change notification settings - Fork 0
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
add the shortcut "Toggle between editor and sidebar" to the plugin #40
Comments
Is this to show hide the editor or sidebar, so that only one is visible, similar to the lua script that hides the editor? |
Yes, that's correct. By pressing the shortcut the view changes to a view, where only one is visible. If the shortcut is pressed again, there will be still only one visible. |
I would rather do this as a lua script. There would be several scripts, corresponding with the multiple issues that you opened, that interact with each other. |
OK, but what are the reasons in short not to integrate it in Geany Preview? |
In the last lua-script (xiota/geanylua-scripts#4) the focus feature was not solved. In #37 I mentioned this:
And that was also a reason for me why to integrate the shortcut in Geany Preview, so not as lua-script, because the focus feature is already solved in the shortcut "Toggle focus between the editor and preview". |
Focus is problematic. Something in the preview tab ends up in focus, but whether it's exactly what you want is hit and miss. I think you mentioned that elsewhere when you tried to do keyboard navigation. |
Till now focus is only problematic when the mouse comes into action (see xiota/geany-tab-style#6 and #15). |
Unfortunately at the moment it seems to be that the focus feature can't be solved (xiota/geany-tab-style#6), so now there's only the crisscross feature left that could be realized. Would it be possible to create lua-scripts for #37, #38 and #40? |
Today I prefer this name as shortcut because it is more clear about what it is: |
focus-feature
|
Clear separation Additional shortcut No crisscross feature any more Conclusion Entering Exit |
The advantage of the shortcut |
When the shortcut is active (specially in the only-editor-mode): |
Would it be possible to program the four shortcuts down below (with the focus feature #40 (comment)) till the end of 2022?
|
This can probably be done with the lua scripts. |
I have also to rethink about this shortcut. |
I recognize now that I don't need those shortcuts any more (the current shortcut "Toggle editor" is enough for me). Nevertheless I will open new issues for the shortcuts mentioned above on geanylua-scripts during the next days. |
Please open only one issue for all four (or however many you decide you'd like) on the lua scripts github. Please keep the description brief. You can also link back to the issues here. Thank you. BTW: PPA has been updated with a new version. You can read the commit log for a brief description of the changes. |
reasons
Because of #20, editing a long HTML-document, the change will not directly appear in the Preview, it could be better that some users want to code in the only-one-view-modes, so only-editor-view or only-sidebar-view. For this situation, two shortcuts would be needed, "Toggle sidebar" #37 and "Toggle editor" #38 (that both don't exist at the moment inside the plugin). But one shortcut would be better. Two other situations where it could be also useful: 1) webpage that has a big width, and 2) because maybe one don't want to be distracted by the Preview while typing.
entering
It should start what was in focus just before pressing the shortcut, but only if the only-view is not already active. If the only-view is already active because for example the shortcut "Toggle editor" was pressed just before, then the counterpart should be shown (so, to stay in this example, if in the only-editor-view the shortcut "Toggle between editor and sidebar" is pressed, then after pressing the shortcut, the only-sidebar-view should appear). That means that the state file of the two shortcuts ("Toggle sidebar" and "Toggle editor") need to be checked first, if there are active, and if one of them is active, then the one should be de-activated.
leaving
The exit of the loop would be possible with the shortcuts "Toggle editor" or "Toggle sidebar".
Example:
If the only-sidebar-view is active, and if the shortcut "Toggle editor" is pressed, then "Toggle editor" need to be pressed 2x, to see editor and preview side-by-side.
If the only-sidebar-view is active, and if the shortcut "Toggle sidebar" is pressed, then editor and preview will appear side-by-side.
For the leaving-scenarios the state file of the two shortcuts "Toggle editor" and "Toggle sidebar" need to be extended, because they need to check first if "Toggle between editor and sidebar" is active. That means that a state file for the shortcut "Toggle between editor and sidebar" should exist.
documentation
It should be mentioned in the documentation, for example on https://github.com/xiota/geany-preview/blob/main/docs/CQA.md, that in case the shortcut "Toggle between editor and sidebar" was set, but neither for "Toggle editor" nor for "Toggle sidebar" a shortcut was set, the ways how to leave the only-view is, a) by restarting Geany, or b) that this need to be done first: set a shortcut either for "Toggle sidebar" or for "Toggle editor", and then press 1x or 2x the corresponding shortcut.
overview
This would be the possible list of the shortcuts for the navigation between editor and sidebar inside the plugin:
Toggle focus between editor and sidebar (the shortcut already exist in the plugin) xiota/geany-tab-style#5 #34 (comment)
Toggle sidebar #37
Toggle editor #38
Toggle between editor and sidebar (this issue)
development
First #37 and #38 need to be solved, then the solutions need to be checked for some weeks, before to start to solve this issue, because it could be that new problems will appear.
The text was updated successfully, but these errors were encountered: