ArianaKhit / text-snippets-obsidian

Snippets plugin for obsidian
187 stars 23 forks source link

Snippets fails to expand #60

Open ipxfer opened 1 year ago

ipxfer commented 1 year ago

I'm running Obsidian v1.1.9 on Windows 11 with Snippets v0.12.

Snippets are not expanding and they just get selected. I tried turning off all the community plug-ins, and results in same outcome.

Anyone else having the same issue?

vialcollet commented 1 year ago

Hi I have a similar issue on Windows 10 and Obsidian 1.1.9.

Whatever method I use, snippets won't expand:

This even happens with the demo snippet.

pnchinmay commented 1 year ago

Check your hotkeys Ctrl+Tab might be binded to something else I had the same issue

SunnyOd commented 1 year ago

Same issue here. ctrl+tab has no bindings and space adds a space (after i checked setting on)

tiagobrc commented 1 year ago

Same issue here. I can't expand any snippets.

MechanicalAkhil commented 1 year ago

if you are dependent on this plugin, use legacy editor until this is fixed. settings -> editor -> use legacy editor.

pnchinmay commented 1 year ago

check bindings in .obisidian/hotkeys.json It should have this binding for snippets plugin

  "text-snippets-obsidian:text-snippets": [
    {
      "modifiers": [
        "Mod"
      ],
      "key": "Tab"
    }
  ],

Check whether any other action has got this binding Mod and Tab together

vialcollet commented 1 year ago

Hi

The binding was missing in the json. Adding it solved the issue. In my case, no other binding with the same binding was setup.

Thanks for your help

tiagobrc commented 1 year ago

The easiest thing for me was to change the hotkey of (text snipets: Run snippet replacement) from command + tab to anything else. Then it works.

Thanks!

shayaknyc commented 1 year ago

Hey folks, came here to see if anyone else was having an issue. I'm running Obsidian v1.2.7 on Windows 11. I have the hotkey set for ctrl+tab, but it wasn't in the hotkeys.json file so I manually added it as per https://github.com/ArianaKhit/text-snippets-obsidian/issues/60#issuecomment-1398222516, restarted Obsidian, and it still doesn't work. Am I missing something? Because I have Expand on Tab and Expand on Space toggled on, but after I type the snippet string and hit space or tab, it only adds the space after the string, or indents the whole string. CTRL+Tab does absolutely nothing. I don't really want to revert to the legacy editor.... any ideas?

tondeaf commented 1 year ago

@shayaknyc : ctrl-tab won't work because that will switch tabs. Need to change the hotkeys. That said, doesn't work for me either.

aaryswastaken commented 1 year ago

I managed to make it work with the manual shortcut (Ctrl + Shirt + R for me) but space and tab binding isn't working unless I go to legacy editor which will be deprecated.

Is there a way to make those bindings work on non-legacy editor?

Note: Even with tab disables in the editor settings the binding isn't working