Ticket #1684 (closed enhancement: invalid)

Opened 5 years ago

Last modified 4 years ago

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

Reported by: boothby Owned by: boothby
Priority: minor Milestone: sage-duplicate/invalid/wontfix
Component: notebook Keywords: editor_wstein
Cc: Work issues:
Report Upstream: Reviewers:
Authors: Merged in:
Dependencies: Stopgaps:

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 Download (3.6 KB) - added by boothby 5 years ago.
First installment, implements item 1.

Change History

Changed 5 years ago by boothby

First installment, implements item 1.

comment:1 Changed 5 years ago by boothby

Patch ruins IE compatability, do not use. :(

comment:2 Changed 5 years ago by mhansen

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

comment:3 Changed 5 years ago by craigcitro

  • Keywords editor_wstein added
  • 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".

comment:4 Changed 5 years ago 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 ":".

comment:5 Changed 5 years ago by mabshoff

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

Cheers,

Michael

comment:6 Changed 4 years ago by boothby

  • Status changed from new to closed
  • Resolution set to invalid

Replaced by #4440.

comment:7 Changed 4 years ago by mabshoff

  • Milestone changed from sage-3.4.1 to sage-duplicate/invalid/wontfix
Note: See TracTickets for help on using tickets.