Store output into a custom variable (was: New Variable {{statusbar:get}}) #127
Replies: 2 comments 4 replies
-
This is a really nice idea! 😎 I'd like to make it a bit more general so that it could work regardless of output channel, i.e. output does not have to go to the statusbar. Instead, where ever it goes, it could be captured by some mechanism, and there could be some new variable that can read the previous output. Just recently, I've had an idea about making it possible do define multiple output channels. So, you could define e.g. output to status bar and to a file at the same time. Now that I'm thinking more about this, we could also add custom variables as an output channel. I don't know yet what naming rules there would be for custom variables as I just invented the idea while typing, but let's say for now that it could be something like this: New output channel named Custom variable, which lets a user define a variable name that starts with Multiple shell commands could write to a same output variable if wanted, and the variable would always give the latest value that was written to it. When a shell command writes to a variable, the variable will forget its current value and get a new value. Multiple different variables could be used to avoid overwriting if needed. So, I came up with a bit different proposal than what you had in mind. Let's work this out so that we can make sure to have a solution for your use case! 🌞 Thanks and have a nice day, too! 🙂 I'll read your other messages later - maybe tomorrow or after a few days as I have some exams in school that hurt my eager to spend time with this plugin. 😆 |
Beta Was this translation helpful? Give feedback.
-
It's finally becoming an output channelI have created a new output channel called Assign custom variables, which will be released in SC
|
Beta Was this translation helpful? Give feedback.
-
Hello @Taitava !!!!!
This is something that is in my mind since you launch the output statusbar .
The main idea is a variable to get the content that was previously inserted in the statusbar by the output statusbar
it's a second clipboard that I can temporary store text than use the new variable to get the content from the status bar and use in the note with our fantastics outputs (caret positions or clipboard)
My Workflow
Many times when writing about one topic I have to navigate between many notes and stop to paste the content in the target note.
My idea is to use this new variable to help to store more content when researching:
SC#1 - echo {{selection}} [output:statusbar]
SC#2 - echo {{statusbar:get}}\s{{clipboard}} [output:current file: caret position]
I have more complex workflows for this new variable that I'm thinking about but is not 100% closed in my head (using this new variable to create inline embed content) that will use
Event : After Active Leaf has changed
but I have to think moreLet me know what you think :)
Have a great day!
Beta Was this translation helpful? Give feedback.
All reactions