New plugin: Code Editor Shortcuts

Hey everyone!

I just released my first plugin: Code Editor Shortcuts.

If you’re used to the editing and selection shortcuts that come with Visual Studio Code or Sublime Text, this should help you feel more at home with Obsidian’s editor.

It’s now available in the community plugins list and available to install. Feedback and suggestions are welcome!

7 Likes

v1.1.0

  • New feature: transform selection to title case
  • Enhancement: if nothing is selected, transform case acts on the word the cursor is on
  • Enhancement: selection is preserved after transforming case
  • Enhancement: insert line below matches the indentation of the current line

v1.2.0

  • New feature: expand selection to brackets ([], (), {})
  • New feature: expand selection to quotes ('', "", ``)

v1.2.1

  • Bug fix: delete line now works properly on the last line of the file (contributed by @pulsovi)

v1.3.0

  • New feature: go to next/previous heading (contributed by @Dmitriy-Shulha)
  • Bug fix: set cursor at the correct position after delete line (contributed by @pulsovi)

v1.4.0

  • New feature: select word under cursor (contributed by @pulsovi)

v1.4.1

  • Bug fix: expand to brackets now works on the first line
  • Bug fix: go to end of line now works properly for selections spanning more than one line
  • Bug fix: handle specified lowercase articles (‘the’, ‘a’, ‘an’) when converting to title case from uppercase

v1.5.0

  • New feature: copy line up/down (contributed by @mk12)

v1.6.0

  • New feature: delete to end of line (contributed by @RohanM)
  • New feature: move cursor left/right (contributed by @RohanM)
  • New feature: go to previous/next line (contributed by @RohanM)

v1.7.0

  • Enhancement: all commands now work with multiple cursors (with the exception of “Go to next/previous heading”)

v1.8.0

  • New feature: select next occurrence of current selection
  • New feature: select all occurrences of current selection
  • New feature: add cursors to line/selection ends
  • Enhancement: join line from inside a list will automatically remove the list item marker
  • Enhancement: expand selection to quotes or brackets is now available as a combined action
  • Bug fix: select word now works with accented characters
  • Bug fix: join line no longer throws an error when on the last line
  • Bug fix: join line with multiple cursors now sets the new cursor positions correctly

Amendment to v1.8.0 – enhancements were contributed by @pseudometa

1 Like

v1.9.0

  • New feature: delete to start of line
  • Enhancement: select next occurrence will behave differently depending on how the initial selection was made (either matching only the entire word or matching substrings as well – see README for details)
  • Enhancement: automatically scroll to next occurrence when adding to selection
  • Bug fix: select next occurrence now works with selections containing special characters like parentheses

v1.10.0

  • Enhancement: multiple selected lines can be joined in one go
  • Enhancement: markdown quote characters (> ) will be automatically removed when joining lines
  • Bug fix: join lines will now only add a space after the cursor if one does not already exist
  • Bug fix: select next occurrence now works properly with unicode characters

v1.11.0

  • New feature: insert cursor above/below
  • Enhancement: automatically insert markdown list prefix when inserting a line above/below within a list

v1.12.0

  • New feature: toggle case (cycles between uppercase, lowercase and title case – contributed by @MatthewAlner)
  • New feature: toggle line numbers
  • New feature: indent using spaces/tabs (note that this doesn’t convert any existing indentation)
  • Enhancement: automatically insert markdown checklist prefix when inserting a line above/below within a checklist
  • Enhancement: automatically remove markdown checklist prefix when joining lines
  • Bug fix: dividers are no longer treated as list items when inserting markdown list prefix
1 Like

v1.13.0

  • New feature: go to first/last line (contributed by @hdykokd)
  • New feature: go to line number
  • New feature: go to next/previous word
  • New feature: move cursor up/down
  • Bug fix: deleting a line that is longer than the following line now sets the cursor position correctly
1 Like

v1.13.1

  • Enhancement: when on an empty list item, insert line below will delete the line instead of inserting another empty list item
  • Bug fix: select word now works when the cursor is next to a digit
  • Bug fix: when on a line that is long enough to be wrapped, delete line now sets the cursor position correctly

v1.14.0

  • New feature: undo and redo have been made available as hotkeys which can be reassigned
  • Enhancement: undo/redo now batches actions for multiple cursors for insert line above, insert line below, and delete line
  • Bug fix: a line beginning at a trailing newline of a selection will be excluded from being duplicated/deleted or having a cursor added