Script Editor Keyboard Shortcuts

Started by edmundito, Mon 06/02/2012 05:43:25

Previous topic - Next topic

edmundito

Hey did anyone else notice that the script editor has the same keyboard shortcuts as the SciTE editor (since I think it's based on it, right?) Anyway if you're curious here they are:

http://www.scintilla.org/SciTEDoc.html (Scroll down to keyboard shortcuts)

Magnify text size.   Ctrl+Keypad+
Reduce text size.   Ctrl+Keypad-
Restore text size to normal.   Ctrl+Keypad/
Cycle through recent files.   Ctrl+Tab
Indent block.   Tab
Dedent block.   Shift+Tab
Delete to start of word.   Ctrl+BackSpace
Delete to end of word.   Ctrl+Delete
Delete to start of line.   Ctrl+Shift+BackSpace
Delete to end of line.   Ctrl+Shift+Delete
Go to start of document.   Ctrl+Home
Extend selection to start of document.   Ctrl+Shift+Home
Go to start of display line.   Alt+Home
Go to end of document.   Ctrl+End
Extend selection to end of document.   Ctrl+Shift+End
Go to end of display line.   Alt+End
Expand or contract a fold point.   Ctrl+Keypad*
Select to next bookmark.   Alt+F2
Select to previous bookmark.   Alt+Shift+F2
Find selection.   Ctrl+F3
Find selection backwards.   Ctrl+Shift+F3
Scroll up.   Ctrl+Up
Scroll down.   Ctrl+Down
Line cut.   Ctrl+L
Line copy.   Ctrl+Shift+T
Line delete.   Ctrl+Shift+L
Line transpose with previous.   Ctrl+T
Selection duplicate.   Ctrl+D
Find matching preprocessor conditional, skipping nested ones.   Ctrl+K
Select to matching preprocessor conditional.   Ctrl+Shift+K
Find matching preprocessor conditional backwards, skipping nested ones.   Ctrl+J
Select to matching preprocessor conditional backwards.   Ctrl+Shift+J
Previous paragraph. Shift extends selection.   Ctrl+[
Next paragraph. Shift extends selection.   Ctrl+]
Previous word. Shift extends selection.   Ctrl+Left
Next word. Shift extends selection.   Ctrl+Right
Previous word part. Shift extends selection   Ctrl+/
Next word part. Shift extends selection.   Ctrl+\
Rectangular block selection.   Alt+Shift+Movement
Extend rectangular selection to start of line.   Alt+Shift+Home
Extend rectangular selection to end of line.   Alt+Shift+End

I haven't tried all of these, but a lot of them seem to work and others do not. Is it possible that we can get these in the manual? only a few are documented.

monkey0506

Probably the reason "some work and others do not" is that it's based on an older version of Scintilla with some specializations. Not technically a reason for it to not have these items listed in the manual for reference though.

The AGS script editor also allows vertical selections if you hold down Alt and drag a selection (ie. you can select the first two characters of several lines of code, and hit backspace to uncomment them).

There are many features of using AGS that aren't properly documented. Some are unsupported "features", but others, like this, are technically "by-design" and were probably more of an oversight or simply evaluated as too low priority to spend CJ's time documenting all of them. Now though, there's no reason we couldn't include such things. ;)

RickJ

The standalone Scintilla editor makes a good choice for the external editor feature.  To make it fully functional, I think,  it would only be necessary to publish the ctags file and some documentation explaining how to use it.   

edmundito

Ooh, can you explain how to do this? I'd be cool to put this up in the wiki or something.

Anyway, I played around with the editor and here's what works and is not documented in the manual:
Magnify text size.   Ctrl+Keypad+
Reduce text size.   Ctrl+Keypad-
Restore text size to normal.   Ctrl+Keypad/
Delete to start of word.   Ctrl+BackSpace
Delete to end of word.   Ctrl+Delete
Delete to start of line.   Ctrl+Shift+BackSpace
Delete to end of line.   Ctrl+Shift+Delete
Go to start of document.   Ctrl+Home
Extend selection to start of document.   Ctrl+Shift+Home
Go to start of display line.   Alt+Home
Go to end of document.   Ctrl+End
Extend selection to end of document.   Ctrl+Shift+End
Scroll up.   Ctrl+Up
Scroll down.   Ctrl+Down
Line copy.   Ctrl+Shift+T
Line delete.   Ctrl+Shift+L - Actually cuts the line, too!
Previous paragraph. Shift extends selection.   Ctrl+[
Next paragraph. Shift extends selection.   Ctrl+]
Previous word. Shift extends selection.   Ctrl+Left
Next word. Shift extends selection.   Ctrl+Right
Previous word part. Shift extends selection   Ctrl+/
Rectangular block selection.   Alt+Shift+Movement

Here's what doesn't work:
Expand or contract a fold point.   Ctrl+Keypad* - Not sure if it works in 3.2!
Select to next bookmark.   Alt+F2
Find selection.   Ctrl+F3
Find selection backwards.   Ctrl+Shift+F3
Line cut.   Ctrl+L - Replaced with Open Game...
Line transpose with previous.   Ctrl+T
Find matching preprocessor conditional, skipping nested ones.   Ctrl+K
Select to matching preprocessor conditional.   Ctrl+Shift+K
Find matching preprocessor conditional backwards, skipping nested ones.   Ctrl+J - Instead it the rest of the text to a new line
Select to matching preprocessor conditional backwards.   Ctrl+Shift+J
Next word part. Shift extends selection.   Ctrl+\ - Even if the one above does work!
Extend rectangular selection to start of line.   Alt+Shift+Home - Doesn't work as expected
Extend rectangular selection to end of line.   Alt+Shift+End

I guess I can put this on the wiki for power users, too...

RickJ

Quote
Expand or contract a fold point.   Ctrl+Keypad* - Not sure if it works in 3.2!
Probably works with the Alan Drake version that has the folding feature.

SMF spam blocked by CleanTalk