Zachatoo / obsidian-css-editor

Edit CSS snippets in Obsidian.
MIT License
57 stars 2 forks source link

Add comment keyboard shortcut #6

Closed Zachatoo closed 1 year ago

Zachatoo commented 1 year ago

Add a keyboard shortcut for commenting in a CSS file.

Default to Meta + /, but allow it to be customizable if possible.

Zachatoo commented 1 year ago

Did some discovery. Turns out the toggle comment keybind already works if Obsidian's default keybind for toggle comments is turned off or changed to another keybind.

Ideally, the CSS Editor plugin should follow the same keybind as setup in Obsidian settings, and should override Obsidian's command when run in a CSS Editor View.

Or, at the very least, if Obsidian has any keybinds for Meta + /, to ignore it when in a CSS Editor View.

Zachatoo commented 1 year ago

Found a solution for ignoring Obsidian keybinds while in a CSS Editor View, this is sufficient for my needs at the moment. Released in 0.5.0.