phibr0 / obsidian-macros Goto Github PK
View Code? Open in Web Editor NEWGroup multiple Commands into one Macro.
License: MIT License
Group multiple Commands into one Macro.
License: MIT License
Thanks for this wonderful plugin....
Is there a particular reason why it requires two commands to be added, before a macro can be saved?
if (this.coms.length >= 2 && command.name && command.icon) {
const cbtn = createEl("button", { text: "Create Macro" })
btnDiv.appendChild(cbtn);
cbtn.addEventListener("click", () => {
this.addCommand();
});
}
I was wanting to iterate on a new command, and wanted to start by adding only one command, and later modifying it (by editing the json file).
It took me several attempts to work out why clicking the x
button at top-right didn't save the macro after I'd added a command... I kept losing the name, icon and command.
Eventually I added a second non-sense unwanted command, and then the "Create Macro" button appeared.
Single-command macros have value in providing shorter names - or aliases - to existing commands, I feel.
Unless there is a particular reason to required two commands, I feel the UI would be clearer if the "Create Macro" command appeared after the first command were added.
(Even better would be for it to be present-but-disabled until it can be selected - although I don't know if that is possible)
Thanks again!
Thanks for this nice plugin! It works perfectly when executing, but there are some bugs when creating macros. I think it may be caused by adding duplicate commands.
One bug is showed in the gif below, that is when adding one command, duplicate commands are inserted (notice that multiple decrease opacity
commands in the gif are added manually one by one without any problem, and the buggy zoom in
insertion was happened when editing the created macro)
Another bug is that when adding a new macro (with the former one having duplicate commands), commands in the new macro are inserted into the former one, and are duplicated. Please see the following image
Hey! I recently installed the plugin, but I'm not able to create any macros. The modal only has a cancel button and I can't add anything that I add. I've tried deleting the plugin, disabling, restarting Obsidian, etc.
Here is a screen cap:
A lot of commands involve a selection of text somewhat, but right now selection is thrown off once the first command is finished, so the next one is incorrect. I wonder if it can be fixed somehow?
I am trying to automate search and replace, and trying to send "text" to search/replace field, I am not sure if that is something that I could do with this plugin.
Instead of chaining-commands, I need to pass "values" and automate task if possible.
Thank you!
I have a big vault, and nested in that a folder that also acts as a nested vault. Most of the .obsidian
folder in the nested vault is just a link to the main vault.
However, when try using the macro I set up in the main vault it doesn't work in the nested vault. And when I then try setting up the macro in the nested vault, it won't work in the main vault anymore.
E.g. I have a macro that toggles a word **bold**
and then **==bold & highlighted==**
. I set this up for a hotkey and within just one vault it works perfectly, but with the nested vault it doesn't work. The nested vault still includes the hotkey for that macro, but not the macro itself, even though the plugin is just a link to the plugin in the main vault.
Not sure if this is clear, but is there any chance someone could help with this?
Thanks :)
Hello,
I noticed an error in the console from this plugin at startup with:
Error message at startup TypeError: Cannot read property 'name' of undefined
plugin:macro-plugin:2736 Uncaught (in promise) TypeError: Cannot read property 'name' of undefined
at eval (plugin:macro-plugin:2736)
at Array.forEach (<anonymous>)
at eval (plugin:macro-plugin:2734)
at Array.forEach (<anonymous>)
at MacroSettingsTab.display (plugin:macro-plugin:2732)
at SettingsSearch.getTabResources (plugin:settings-search:170)
at SettingsSearch.buildPluginResources (plugin:settings-search:120)
at eval (plugin:settings-search:122)
eval @ plugin:macro-plugin:2736
eval @ plugin:macro-plugin:2734
display @ plugin:macro-plugin:2732
getTabResources @ plugin:settings-search:170
buildPluginResources @ plugin:settings-search:120
eval @ plugin:settings-search:122
setTimeout (async)
buildPluginResources @ plugin:settings-search:122
eval @ plugin:settings-search:122
setTimeout (async)
buildPluginResources @ plugin:settings-search:122
eval @ plugin:settings-search:122
setTimeout (async)
buildPluginResources @ plugin:settings-search:122
eval @ plugin:settings-search:105
(anonymous) @ app.js:1
(anonymous) @ app.js:1
(anonymous) @ app.js:1
s @ app.js:1
Promise.then (async)
l @ app.js:1
s @ app.js:1
Promise.then (async)
l @ app.js:1
(anonymous) @ app.js:1
m @ app.js:1
t.loadLayout @ app.js:1
(anonymous) @ app.js:1
(anonymous) @ app.js:1
(anonymous) @ app.js:1
s @ app.js:1
Promise.then (async)
l @ app.js:1
s @ app.js:1
Promise.then (async)
l @ app.js:1
s @ app.js:1
Promise.then (async)
l @ app.js:1
s @ app.js:1
Promise.then (async)
l @ app.js:1
s @ app.js:1
Thanks for this useful plugin!
I think it would be a great addition to the plugin if you could add small "utilities" to it, e.g. key strokes or copypasting the clipboard, etc.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.