I like reading my TW with ~60 character tiddler width.
Therefore, my TW-story river is ~40em, with the sidebar at 45em to the right.
But, when editing my tiddlers I like to have preview on.
This makes an unusable ~20em split for the edit and preview panes.
My workaround is to close the sidebar, which maximizes the editor/preview split.
But – I like to use and see the sidebar while editing.
Is there a way to change the story-width, and sidebar-right settings when I’m editing and preview is open?
Another alternative, if the preview you are after is the output, or rendered version, is to generate a preview above the editor, rather than using the side by side preview.
In fact this could be done for any of the previews.
Be carful when writing macros or widgets “TiddlyWiki Scripting” when you have a preview open, you can cause errors.
I tried the “center storyriver when sidebar closed”, but I don’t think that’s what I’m looking for.
My goal is to have a default setup with:
Fixed 40em wide story river when reading
Sidebar at 45em to the right, and takes up remaining space
Editing setup with
Fixed 40em “edit tiddler” on left
Fixed 40em “preview” in middle
Remaining “sidebar” starting at 85em to the right
I briefly tried the following as well:
Open edit and tiddler preview
Use ctrl+shift+right shortcut to toggle sidebar visibility when I want it
The problem I’m seeing with the toggle sidebar approach is that it loses my current paragraph location in the edit tiddler. (i.e., I’m writing section Bar with sidebar hidden, but when I show sidebar the text re-wrapping brings me to section Alpha in tiddler. Then I have to scroll back to my previous edit location)
These are minor-minor usability gripes on my side. TW has been by far my favorite knowledge management tool I’ve come across, I’m just looking to continue making it better for my use cases.
Just for fun I did try to let ChatGPT write the code for me. … It almost got it right using the existing code as an example, and telling it that $:/state/sidebar is the state tiddler used to show and hide the sidebar.
That’s the working code after interchanging yes and no … have fun!
The ChatGPT idea is brilliant. I actually did the same to learn how to “write a global tiddlywiki macro accessible in other tiddlers”. It suggested the $:/tags/ViewTemplate tag that I didn’t realize I needed.
Anyway, I haven’t had much time to play with this yet, but with your pointers I kludged together an example of how I’d like the behavior to work.
I created a tiddler for my two macros.
(Note, hard coded proof of concept at the moment)
Gives me warnings about changing system/shadow tiddlers.
Is there a better approach to get the functionality I’m looking for?
I’m not sure I have the best approach.
Also, there is a remaining bug in the current approach:
If the “tiddler preview state=yes” when the user clicks the “edit tiddler” button, it doesn’t automatically go to my editActions wider width.
What tiddler/function name is it when the “edit tiddler” button is pressed?