Skip to content

GustJc/godot_gdscript_editor_shortcuts

Repository files navigation

Gdscript Editor shortcuts Addon

Very simple plugin that let's you move around your code really fast with extra code shortcuts.

Use page-up or page-down to jump to the next empty line.
You can also hold shift to to jump to func definitions.

Initially inspired by PICO-8 script editor where you use the 'page up/down' keys to move across functions.

Use Ctrl+pageUpDn to indentations blocks. (ifs/fors/funcs)
Use Alt+pageUpDn to navigate blocks. (ifs/fors/funcs)

Shortcuts

Empty line & Func jumper

  • Page Down : Go to next empty line
  • Page Up : Go to previous empty line
  • Shift + Page Down : Go to next 'func'
  • Shift + Page Up : Go to previous 'func'

Auto complete colons

  • Ctrl + Enter : Add (:) colon at end and create new line below (if needed)

Tip: You can turn safe_colon off inside the code to always add (:) colon instead of guessing. Tip: If you do so, change the editor shortcut of ui_text_newline_blank to something else like alt + enter to create the newline without the colon. Tip: This addon also fixes the autocomplete hint not disappearing when creating a new blank line.

Move between indents and blocks

  • Ctrl + Page Up : Go to the begining of current Block
  • Ctrl + Page Down : Go to end begining of current the Block

Tip: Using goto block if already at the begining/end goes to the next valid line outside it.

  • Alt + Page Up : Go to the begining of the Block (no matter the indent)
  • Alt + Page Down : Go to the begining of the Block (no matter the indent)

Summary

  • No modifier for empty line movement
  • Shift for FUNC movement
  • Control for indented block movement
  • Alt for unindented block movement

Tip: Can switch the shift/no modifier actions with Project Settings (see below)

Configuration

You can set the Shift to Move Space Behavior configuration in the ProjectSettings/Plugins/Gdscript Block Jumper.

If you enable this, the scroll commands will be switched.

PageUp/Down will scroll to func and shift+PageUp/Down will jump to empty lines

Todo

  • Add ability to select lines while jumping around
  • Add configurable hotkeys (note: careful because of Godot bug in project setting resources)
  • Use some option+arrow combination to move, if configurable hotkeys doesn't work for that.

About

Godot addon. Makes page-up and page-down keys scroll to the next/previous func definition.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors