diff --git a/Doc/library/idle.rst b/Doc/library/idle.rst index 384d2bf57dc5a7..449e54f067ecf9 100644 --- a/Doc/library/idle.rst +++ b/Doc/library/idle.rst @@ -146,7 +146,7 @@ Go to Line Show Completions Open a scrollable list allowing selection of keywords and attributes. See - Completions in the Tips sections below. + :ref:`Completions ` in the Editing and navigation section below. Expand Word Expand a prefix you have typed to match a full word in the same window; @@ -154,7 +154,8 @@ Expand Word Show call tip After an unclosed parenthesis for a function, open a small window with - function parameter hints. + function parameter hints. See :ref:`Calltips ` in the + Editing and navigation section below. Show surrounding parens Highlight the surrounding parenthesis. @@ -278,8 +279,8 @@ Configure IDLE Code Context (toggle)(Editor Window only) Open a pane at the top of the edit window which shows the block context - of the code which has scrolled above the top of the window. Clicking a - line in this pane exposes that line at the top of the editor. + of the code which has scrolled above the top of the window. See + :ref:`Code Context ` in the Editing and Navigation section below. Window menu (Shell and Editor) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -310,8 +311,8 @@ Turtle Demo Run the turtledemo module with example Python code and turtle drawings. Additional help sources may be added here with the Configure IDLE dialog under -the General tab. See the "Help sources" subsection below for more -on Help menu choices. +the General tab. See the :ref:`Help sources ` subsection below +for more on Help menu choices. .. index:: single: Cut @@ -359,6 +360,8 @@ Squeeze the code above and the prompt below down to a 'Squeezed text' label. +.. _editing-and-navigation: + Editing and navigation ---------------------- @@ -431,6 +434,9 @@ are restricted to four spaces due to Tcl/Tk limitations. See also the indent/dedent region commands in the edit menu. + +.. _completions: + Completions ^^^^^^^^^^^ @@ -475,6 +481,8 @@ much can be found by default, e.g. the re module. If you don't like the ACW popping up unbidden, simply make the delay longer or disable the extension. +.. _calltips: + Calltips ^^^^^^^^ @@ -503,6 +511,25 @@ In an editor, import statements have no effect until one runs the file. One might want to run a file after writing the import statements at the top, or immediately run an existing file before editing. +.. _code-context: + +Code Context +^^^^^^^^^^^^ + +Within an editor window containing Python code, code context can be toggled +in order to show or hide a pane at the top of the window. When shown, this +pane freezes the opening lines for block code, such as those beginning with +``class``, ``def``, or ``if`` keywords, that would have otherwise scrolled +out of view. The size of the pane will be expanded and contracted as needed +to show the all current levels of context, up to the maximum number of +lines defined in the Configure IDLE dialog (which defaults to 15). If there +are no current context lines and the feature is toggled on, a single blank +line will display. Clicking on a line in the context pane will move that +line to the top of the editor. + +The text and background colors for the context pane can be configured under +the Highlights tab in the Configure IDLE dialog. + Python Shell window ^^^^^^^^^^^^^^^^^^^ @@ -768,6 +795,8 @@ with the default subprocess if at all possible. Help and preferences -------------------- +.. _help-sources: + Help sources ^^^^^^^^^^^^ diff --git a/Lib/idlelib/help.html b/Lib/idlelib/help.html index e2bf773478e8a5..b5f12d1a6f65f5 100644 --- a/Lib/idlelib/help.html +++ b/Lib/idlelib/help.html @@ -202,13 +202,14 @@

Edit menu (Shell and Editor)Completions in the Editing and navigation section below.
Expand Word
Expand a prefix you have typed to match a full word in the same window; repeat to get a different expansion.
Show call tip
After an unclosed parenthesis for a function, open a small window with -function parameter hints.
+function parameter hints. See Calltips in the +Editing and navigation section below.
Show surrounding parens
Highlight the surrounding parenthesis.
@@ -314,8 +315,8 @@

Options menu (Shell and Editor)Code Context in the Editing and Navigation section below.
@@ -344,8 +345,8 @@

Help menu (Shell and Editor)Help sources subsection below +for more on Help menu choices.

Context Menus

@@ -383,7 +384,7 @@

Help menu (Shell and Editor) -

Editing and navigation

+

Editing and navigation

Editor windows

IDLE may open editor windows when it starts, depending on settings @@ -445,7 +446,7 @@

Automatic indentationSee also the indent/dedent region commands in the edit menu.

-

Completions

+

Completions

Completions are supplied for functions, classes, and attributes of classes, both built-in and user-defined. Completions are also provided for filenames.

@@ -480,7 +481,7 @@

Completions -

Calltips

+

Calltips

A calltip is shown when one types ( after the name of an accessible function. A name expression may include dots and subscripts. A calltip remains until it is clicked, the cursor is moved out of the argument area, @@ -502,6 +503,21 @@

Calltips +

Code Context

+

Within an editor window containing Python code, code context can be toggled +in order to show or hide a pane at the top of the window. When shown, this +pane freezes the opening lines for block code, such as those beginning with +class, def, or if keywords, that would have otherwise scrolled +out of view. The size of the pane will be expanded and contracted as needed +to show the all current levels of context, up to the maximum number of +lines defined in the Configure IDLE dialog (which defaults to 15). If there +are no current context lines and the feature is toggled on, a single blank +line will display. Clicking on a line in the context pane will move that +line to the top of the editor.

+

The text and background colors for the context pane can be configured under +the Highlights tab in the Configure IDLE dialog.

+

Python Shell window

With IDLE’s Shell, one enters, edits, and recalls complete statements. @@ -733,7 +749,7 @@

Running without a subprocess

Help and preferences

-

Help sources

+

Help sources

Help menu entry “IDLE Help” displays a formatted html version of the IDLE chapter of the Library Reference. The result, in a read-only tkinter text window, is close to what one sees in a web browser. @@ -801,6 +817,7 @@

Table of Contents

  • Automatic indentation
  • Completions
  • Calltips
  • +
  • Code Context
  • Python Shell window
  • Text colors
  • @@ -899,7 +916,7 @@

    Navigation



    - Last updated on Nov 12, 2018. + Last updated on Dec 19, 2018. Found a bug?
    diff --git a/Misc/NEWS.d/next/IDLE/2018-12-20-00-14-15.bpo-35521.x32BRn.rst b/Misc/NEWS.d/next/IDLE/2018-12-20-00-14-15.bpo-35521.x32BRn.rst new file mode 100644 index 00000000000000..120de7f6c84418 --- /dev/null +++ b/Misc/NEWS.d/next/IDLE/2018-12-20-00-14-15.bpo-35521.x32BRn.rst @@ -0,0 +1,2 @@ +Document the IDLE editor code context feature. Add some internal references +within the IDLE doc.