timhor / obsidian-editor-shortcuts

Obsidian plugin to add keyboard shortcuts commonly found in code editors such as Visual Studio Code (vscode) or Sublime Text
MIT License
356 stars 25 forks source link

Detecting if cursor is within a codeblock #41

Closed thelegend09 closed 2 years ago

thelegend09 commented 2 years ago

I appreciate that you specify "Ctrl + Enter for 'Insert line below' may conflict with the default shortcut for Toggle checklist status; changing/removing one of the bindings is recommended."

In Obsidian, I'd love to be able to use Ctrl + Enter for "Insert line below" when I'm in a code block, but keep it for "Toggle checklist status" when I'm anywhere else.

Not sure if/how that is possible, though.

timhor commented 2 years ago

Hmm unfortunately I can't really see a way to make that happen since the 'Toggle checklist status' functionality exists outside this plugin, so one hotkey would inevitably override the other.

thelegend09 commented 2 years ago

I get it. Too bad.

Thanks for all the other amazing functionalities though!