ArianaKhit / text-snippets-obsidian

Snippets plugin for obsidian
190 stars 23 forks source link

"Space" doesn't expand anymore #47

Open Jopp-gh opened 2 years ago

Jopp-gh commented 2 years ago

Expansions aren't possible anymore using space or tab both on mobile and desktop devices. Older version of text snippets, allowed text expansion via "space" or "tab" key

Writing text needs the "Space" button as expander, everything else is cumbersome, because alternatives require 2 fingers. This issue is even worse on mobile!

I'd argue that even the "tab" button is cumbersome because not so easy and quickly accessibile than the space bar button

RobertGoulding commented 2 years ago

I installed Text Snippets today, and found the same thing. Only Ctrl-Tab will expand, not Space or Tab. As the OP notes, Space is really necessary to auto-expand abbreviations as you type.

neel-maniar commented 2 years ago

yup, tab doesn't work for me either!

tedmiston commented 2 years ago

I tried this plugin on mobile with space expansion enabled and noticed that no expansion happened and wondered if it just didn't work on mobile at all.

Hopefully this bug explains that issue too.

edofe99 commented 2 years ago

Any chance on getting this plugin actually working?

FlynnD273 commented 2 years ago

I'm pretty sure as of the latest update, it does work as intended.

edofe99 commented 2 years ago

I'm pretty sure as of the latest update, it does work as intended.

https://user-images.githubusercontent.com/62611612/186849008-d8cb3bb8-1742-4fcf-839a-113e31b5c9a8.mov

...

Oskiator commented 2 years ago

Hey ! I just installed the plugin, but as mentionned above, space and tab doesn't work for me either. Only Ctrl+Tab. It would be great also to have an option to autoexpand when writting some snippets. I make a separate feature request for that.

FlynnD273 commented 2 years ago

You've enabled these switches in the plugin settings? It works perfectly for me. image

edofe99 commented 2 years ago

You've enabled these switches in the plugin settings? It works perfectly for me. image

Yes, even tried disabling all plugins and reloading app, nothing. Edit: I'm on macos last version of monterey running Obsidian v0.15.9

FlynnD273 commented 2 years ago

I'm on Windows running 0.15.9. Do you have any other plugins? Perhaps a separate plugin is conflicting? Or even a theme? Try the default theme and disabling all other community plugins, perhaps?

edofe99 commented 2 years ago

I'm on Windows running 0.15.9. Do you have any other plugins? Perhaps a separate plugin is conflicting? Or even a theme? Try the default theme and disabling all other community plugins, perhaps?

Disabled all plugins and set on default theme, nothing, even on iPhone it won’t work.

Perhaps if the creator of the plug-in is willing to investigate I’m aviable to share my vault for further investigations.

mretier commented 2 years ago

Same here, tried a completely new vault on windows, Obsidian v0.15.9

Arax20 commented 2 years ago

It's not a plugin conflict, the issue is due to obsidian moving from CodeMirror 5 to 6 which breaks the function used to detect keypresses:

this.cmEditors = [];
this.registerCodeMirror((cm) => {
  this.cmEditors.push(cm);
  cm.on('keydown', (cm, event) => this.handleKeyDown(event));
});

SekoiaTree's fork (make sure you're on the patch-1 branch) fixes this if you're willing to manually install the plugin.

mretier commented 2 years ago

I installed the SekoiaTree's fork. However, when testing the plugin in a new Vault in Obsidian 0.15.9 on Windows, Tab and Space still don't work.

Arax20 commented 2 years ago

You have to run npm run build to rebuild from main.ts I think, main.js doesn't have the fix

mretier commented 2 years ago

@Arax20 I tried your suggestion, but receive the following error message (ran command in Windows powershell in the directory that contains the plugin files):

npm run build

> text-snippets-obsidian@0.1.1 build > rollup --config rollup.config.js

'rollup' is not recognized as an internal or external command, operable program or batch file.

edofe99 commented 2 years ago

Hi, thank's for temporary solution but I'll not do it because I'm not able. Do you know if admin will release an official update of this plugin? Thanks.

jeansordes commented 2 years ago

I've found a solution

I've built the file on my machine, and extracted the main.js file, you can get it below : https://gist.githubusercontent.com/jeansordes/9ccd17911d1743b4aaecd20a858d84e5/raw/57eafae03af2215a64591a23489de4419e527b62/main.js

This fils is meant to replace the following file : .obsidian/plugins/text-snippets-obsidian/main.js

This will do the job until the owner of this project accept the merge request

RobertGoulding commented 1 year ago

It works beautifully with that fix - thank you!

cenosito commented 1 year ago

I've found a solution

I've built the file on my machine, and extracted the main.js file, you can get it below : https://gist.githubusercontent.com/jeansordes/9ccd17911d1743b4aaecd20a858d84e5/raw/57eafae03af2215a64591a23489de4419e527b62/main.js

This fils is meant to replace the following file : .obsidian/plugins/text-snippets-obsidian/main.js

This will do the job until the owner of this project accept the merge request

This works for me! Thanks

greenwar commented 10 months ago

I've found a solution

I've built the file on my machine, and extracted the main.js file, you can get it below : https://gist.githubusercontent.com/jeansordes/9ccd17911d1743b4aaecd20a858d84e5/raw/57eafae03af2215a64591a23489de4419e527b62/main.js

This fils is meant to replace the following file : .obsidian/plugins/text-snippets-obsidian/main.js

This will do the job until the owner of this project accept the merge request

This worked! Plugin still broken until I patched with this. Thank you!

jaysonteng commented 7 months ago

I've found a solution

I've built the file on my machine, and extracted the main.js file, you can get it below : https://gist.githubusercontent.com/jeansordes/9ccd17911d1743b4aaecd20a858d84e5/raw/57eafae03af2215a64591a23489de4419e527b62/main.js

This fils is meant to replace the following file : .obsidian/plugins/text-snippets-obsidian/main.js

This will do the job until the owner of this project accept the merge request

thank you very much, it works.