Giter VIP home page Giter VIP logo

obsidian-macros's Introduction

obsidian-macros's People

Contributors

phibr0 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

obsidian-macros's Issues

Allow single-command macros

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!

Bug: Duplicate commands

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)

macros bug

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

image

Modal only has a cancel button

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:

Kapture.2021-08-18.at.10.47.26.mp4

Keep the selection

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?

Any Possibility I could send "text" to some commands

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!

Macros in nested vaults don't seem to work. Any help?

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 :)

Error message at startup `TypeError: Cannot read property 'name' of undefined` with Obsidian 0.15.1

Hello,

I noticed an error in the console from this plugin at startup with:

  • Obsidian 0.15.1 (Insider)
  • Macros version 0.1.0 (current version)

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

FR: Add small utilities like Keypresses

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.