obsidian-vimrc-support icon indicating copy to clipboard operation
obsidian-vimrc-support copied to clipboard

editor obcommands don't modify selections

Open jbytes1027 opened this issue 1 year ago • 2 comments

editor obcommands don't respect selections like their respective obsidian keybindings do. For instance, Ctrl+b by default toggles bold formatting of the current selection in visual mode, but obcommand editor:toggle-bold in visual mode with a selection simply inserts **** wherever the cursor was in normal mode. This makes these commands pretty useless. The problem with the surround commands is that you can't toggle on and off a surround.

jbytes1027 avatar May 18 '23 18:05 jbytes1027

I have the same issue. I have a Templater command with tp.file.selection(), and it doesn't work either.

MiracleXYZ avatar Feb 25 '24 05:02 MiracleXYZ

Got this working here. Though I changed obcommand from an editor command to an action commands.

jbytes1027 avatar Feb 25 '24 13:02 jbytes1027