squeak-smalltalk / squeak-object-memory

Issues and assets related to the Squeak object memory.
https://bugs.squeak.org
MIT License
12 stars 1 forks source link

Cmd+Enter in Smalltalk editor to start a new line above the current line #5

Open j4yk opened 2 years ago

j4yk commented 2 years ago

As a programmer I would like to have a convenience shortcut to start a new line of code above the current line without leaving the keyboard or having to use the cursor keys to first get to the right position to start a new line above.

When automatic indentation is enabled, the newly opened line should be indented as appropriate to the line above.

Example:

line one.
lin|e two.
   ^---- cursor

Press Cmd+Enter (or a similarly reachable shortcut):

line one.
|
^---- cursor
line two.

The behavior should be roughly equivalent to moving the cursor to the end of the line above the current one, then pressing Enter.

Eclipse has a similar shortcut. In vim it exists as the command O. It can be useful at times, for example if you want to introduce temporary variables or want to add a comment above the current line.