Text editing and navigation hotkey enhancements


#1

I would really appreciate some additional hotkeys to enhance Defold’s editing experience. These are suggestions inspired by standard editors like Sublime Text, and Intellij Idea.

Deleting text:

  • Command + backspace = delete all text on line to the left of the cursor. Or deleting the entire line of text including the newline would be acceptable since removing a full line of code is a common action.
  • Option + backspace = delete the word to the left of the cursor.

Selecting text:

  • Shift + Option + Up/down = Selects the next line, and additional up/down pressed continue to select the next line. Currently it stops at one line of text. Shift + Option + Left/right works as expected, but up/down stop at one line.

Navigation:

  • Shift + Command + [ or ] = Open the previous or next tab in the editor
  • Command + [ or ] = Move cursor to the user’s last location based on a recorded history, with support for forwards ‘]’ or backwards ‘[’ in history. Even if a tab was closed, the tab will be re-opened and the cursor will move to the last location in the file. The history is not so precise in recording every cursor movement. It does record tab changes and clicks. This one comes from intellij idea and I just love this feature. It’s fairly complex in behavior so I encourage trying it in intellij to see how it works.

Thank you.


#2

Yes, there’s definitely more we can do with keyboard shortcuts. There’s actually already quite a few suggestions among our reported issues: https://github.com/defold/editor2-issues/issues?utf8=✓&q=is%3Aissue+is%3Aopen+shortcut

While we appreciate editor feedback here on the forum it is actually even better to get it reported directly into our public issue tracker for the editor, either directly via the GitHub link above or from within the editor using Help->Report Issue


#3

Roger that, thanks for the reply.


#4

Hi, I’m using defold 2.0 game engine. Have you found out the hotkeys to navigate between opened file tabs? On VSCode I’d use cmd+1/cmd+2/cmd+3 etc.


#5

I believe tab switching shortcuts are missing. We’ll hopefully have time to fix this soon.


#6

But ctrl tab on windows does switch tabs one by one as we do in google chrome, isn’t it ?


#7

Ah, indeed it does!


#8

Thanks for the reply! I’m using Atom for the time being, as it provides better defold plugin/autocomplete as compared to VSCode.