Ticket #1684 (new enhancement)

Opened 1 year ago

Last modified 4 weeks ago

[with bundle, needs work] Intelligent indentation when user presses "enter".

Reported by: boothby Assigned to: boothby
Priority: minor Milestone: sage-3.2.2
Component: notebook Keywords: editor_wstein
Cc:

Description

Common IDE feature:

  1. if the cursor is in an indented block, pressing "enter" should add a line which has the same indentaion as the previous line.
  2. if the cursor is in a line with, for example, an "if" statement, pressing enter should increase indentation on the next line.

Attachments

1684.1.hg (3.6 kB) - added by boothby on 01/04/2008 03:26:34 PM.
First installment, implements item 1.

Change History

01/04/2008 03:26:34 PM changed by boothby

  • attachment 1684.1.hg added.

First installment, implements item 1.

01/05/2008 12:40:31 AM changed by boothby

Patch ruins IE compatability, do not use. :(

01/13/2008 05:43:56 AM changed by mhansen

  • summary changed from Intelligent indentation when user presses "enter". to [with bundle, with negative review] Intelligent indentation when user presses "enter"..

06/19/2008 09:27:45 PM changed by craigcitro

  • keywords set to editor_wstein.
  • summary changed from [with bundle, with negative review] Intelligent indentation when user presses "enter". to [with bundle, needs work] Intelligent indentation when user presses "enter"..

07/19/2008 11:42:01 AM changed by jason

I'm not sure of your logic to accomplish #2 (I couldn't seem to find it in the bundle), but it seems that it would be easy to just indent more on the next line if the current line ends in a ":".

11/04/2008 12:25:10 PM changed by mabshoff

There is also an attempt to do this at #4440.

Cheers,

Michael