Skip to content

Commit 834064c

Browse files
authored
pythongh-89362: Doc IDLE menu and search (python#95697)
Update menu item position and capitalization. Add paragraph about search. For help.html, include save-as addition.
1 parent 787498c commit 834064c

File tree

2 files changed

+52
-32
lines changed

2 files changed

+52
-32
lines changed

Doc/library/idle.rst

+25-17
Original file line numberDiff line numberDiff line change
@@ -61,17 +61,17 @@ New File
6161
Open...
6262
Open an existing file with an Open dialog.
6363

64-
Recent Files
65-
Open a list of recent files. Click one to open it.
66-
6764
Open Module...
6865
Open an existing module (searches sys.path).
6966

67+
Recent Files
68+
Open a list of recent files. Click one to open it.
69+
7070
.. index::
71-
single: Class browser
71+
single: Module browser
7272
single: Path browser
7373

74-
Class Browser
74+
Module Browser
7575
Show functions, classes, and methods in the current Editor file in a
7676
tree structure. In the shell, open a module first.
7777

@@ -89,7 +89,7 @@ Save As...
8989
Save the current window with a Save As dialog. The file saved becomes the
9090
new associated file for the window. (If your file namager is set to hide
9191
extensions, the current extension will be omitted in the file name box.
92-
If the new filename has no '.', '.py' and .'txt' will be added for Python
92+
If the new filename has no '.', '.py' and '.txt' will be added for Python
9393
and text files, except that on macOS Aqua,'.py' is added for all files.)
9494

9595
Save Copy As...
@@ -117,6 +117,9 @@ Undo
117117
Redo
118118
Redo the last undone change to the current window.
119119

120+
Select All
121+
Select the entire contents of the current window.
122+
120123
Cut
121124
Copy selection into the system-wide clipboard; then delete the selection.
122125

@@ -128,9 +131,6 @@ Paste
128131

129132
The clipboard functions are also available in context menus.
130133

131-
Select All
132-
Select the entire contents of the current window.
133-
134134
Find...
135135
Open a search dialog with many options
136136

@@ -159,19 +159,24 @@ Expand Word
159159
Expand a prefix you have typed to match a full word in the same window;
160160
repeat to get a different expansion.
161161

162-
Show call tip
162+
Show Call Tip
163163
After an unclosed parenthesis for a function, open a small window with
164164
function parameter hints. See :ref:`Calltips <calltips>` in the
165165
Editing and navigation section below.
166166

167-
Show surrounding parens
167+
Show Surrounding Parens
168168
Highlight the surrounding parenthesis.
169169

170170
.. _format-menu:
171171

172172
Format menu (Editor window only)
173173
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
174174

175+
Format Paragraph
176+
Reformat the current blank-line-delimited paragraph in comment block or
177+
multiline string or selected line in a string. All lines in the
178+
paragraph will be formatted to less than N columns, where N defaults to 72.
179+
175180
Indent Region
176181
Shift selected lines right by the indent width (default 4 spaces).
177182

@@ -198,12 +203,7 @@ New Indent Width
198203
Open a dialog to change indent width. The accepted default by the Python
199204
community is 4 spaces.
200205

201-
Format Paragraph
202-
Reformat the current blank-line-delimited paragraph in comment block or
203-
multiline string or selected line in a string. All lines in the
204-
paragraph will be formatted to less than N columns, where N defaults to 72.
205-
206-
Strip trailing whitespace
206+
Strip Trailing Chitespace
207207
Remove trailing space and other whitespace characters after the last
208208
non-whitespace character of a line by applying str.rstrip to each line,
209209
including lines within multiline strings. Except for Shell windows,
@@ -474,6 +474,14 @@ are restricted to four spaces due to Tcl/Tk limitations.
474474
See also the indent/dedent region commands on the
475475
:ref:`Format menu <format-menu>`.
476476

477+
Search and Replace
478+
^^^^^^^^^^^^^^^^^^
479+
480+
Any selection becomes a search target. However, only selections within
481+
a line work because searches are only performed within lines with the
482+
terminal newline removed. If ``[x] Regular expresion`` is checked, the
483+
target is interpreted according to the Python re module.
484+
477485
.. _completions:
478486

479487
Completions

Lib/idlelib/help.html

+27-15
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ <h3><a href="../contents.html">Table of Contents</a></h3>
9191
<li><a class="reference internal" href="#editor-windows">Editor windows</a></li>
9292
<li><a class="reference internal" href="#key-bindings">Key bindings</a></li>
9393
<li><a class="reference internal" href="#automatic-indentation">Automatic indentation</a></li>
94+
<li><a class="reference internal" href="#search-and-replace">Search and Replace</a></li>
9495
<li><a class="reference internal" href="#completions">Completions</a></li>
9596
<li><a class="reference internal" href="#calltips">Calltips</a></li>
9697
<li><a class="reference internal" href="#code-context">Code Context</a></li>
@@ -237,13 +238,13 @@ <h3>File menu (Shell and Editor)<a class="headerlink" href="#file-menu-shell-and
237238
</dd>
238239
<dt>Open…</dt><dd><p>Open an existing file with an Open dialog.</p>
239240
</dd>
240-
<dt>Recent Files</dt><dd><p>Open a list of recent files. Click one to open it.</p>
241-
</dd>
242241
<dt>Open Module…</dt><dd><p>Open an existing module (searches sys.path).</p>
243242
</dd>
243+
<dt>Recent Files</dt><dd><p>Open a list of recent files. Click one to open it.</p>
244+
</dd>
244245
</dl>
245246
<dl class="simple" id="index-1">
246-
<dt>Class Browser</dt><dd><p>Show functions, classes, and methods in the current Editor file in a
247+
<dt>Module Browser</dt><dd><p>Show functions, classes, and methods in the current Editor file in a
247248
tree structure. In the shell, open a module first.</p>
248249
</dd>
249250
<dt>Path Browser</dt><dd><p>Show sys.path directories, modules, functions, classes and methods in a
@@ -255,10 +256,13 @@ <h3>File menu (Shell and Editor)<a class="headerlink" href="#file-menu-shell-and
255256
do Save As instead.</p>
256257
</dd>
257258
<dt>Save As…</dt><dd><p>Save the current window with a Save As dialog. The file saved becomes the
258-
new associated file for the window.</p>
259+
new associated file for the window. (If your file namager is set to hide
260+
extensions, the current extension will be omitted in the file name box.
261+
If the new filename has no ‘.’, ‘.py’ and ‘.txt’ will be added for Python
262+
and text files, except that on macOS Aqua,’.py’ is added for all files.)</p>
259263
</dd>
260264
<dt>Save Copy As…</dt><dd><p>Save the current window to different file without changing the associated
261-
file.</p>
265+
file. (See Save As note above about filename extensions.)</p>
262266
</dd>
263267
<dt>Print Window</dt><dd><p>Print the current window to the default printer.</p>
264268
</dd>
@@ -278,6 +282,8 @@ <h3>Edit menu (Shell and Editor)<a class="headerlink" href="#edit-menu-shell-and
278282
</dd>
279283
<dt>Redo</dt><dd><p>Redo the last undone change to the current window.</p>
280284
</dd>
285+
<dt>Select All</dt><dd><p>Select the entire contents of the current window.</p>
286+
</dd>
281287
<dt>Cut</dt><dd><p>Copy selection into the system-wide clipboard; then delete the selection.</p>
282288
</dd>
283289
<dt>Copy</dt><dd><p>Copy selection into the system-wide clipboard.</p>
@@ -287,8 +293,6 @@ <h3>Edit menu (Shell and Editor)<a class="headerlink" href="#edit-menu-shell-and
287293
</dl>
288294
<p>The clipboard functions are also available in context menus.</p>
289295
<dl class="simple">
290-
<dt>Select All</dt><dd><p>Select the entire contents of the current window.</p>
291-
</dd>
292296
<dt>Find…</dt><dd><p>Open a search dialog with many options</p>
293297
</dd>
294298
<dt>Find Again</dt><dd><p>Repeat the last search, if there is one.</p>
@@ -309,17 +313,21 @@ <h3>Edit menu (Shell and Editor)<a class="headerlink" href="#edit-menu-shell-and
309313
<dt>Expand Word</dt><dd><p>Expand a prefix you have typed to match a full word in the same window;
310314
repeat to get a different expansion.</p>
311315
</dd>
312-
<dt>Show call tip</dt><dd><p>After an unclosed parenthesis for a function, open a small window with
316+
<dt>Show Call Tip</dt><dd><p>After an unclosed parenthesis for a function, open a small window with
313317
function parameter hints. See <a class="reference internal" href="#calltips"><span class="std std-ref">Calltips</span></a> in the
314318
Editing and navigation section below.</p>
315319
</dd>
316-
<dt>Show surrounding parens</dt><dd><p>Highlight the surrounding parenthesis.</p>
320+
<dt>Show Surrounding Parens</dt><dd><p>Highlight the surrounding parenthesis.</p>
317321
</dd>
318322
</dl>
319323
</section>
320324
<section id="format-menu-editor-window-only">
321325
<span id="format-menu"></span><h3>Format menu (Editor window only)<a class="headerlink" href="#format-menu-editor-window-only" title="Permalink to this heading"></a></h3>
322326
<dl class="simple">
327+
<dt>Format Paragraph</dt><dd><p>Reformat the current blank-line-delimited paragraph in comment block or
328+
multiline string or selected line in a string. All lines in the
329+
paragraph will be formatted to less than N columns, where N defaults to 72.</p>
330+
</dd>
323331
<dt>Indent Region</dt><dd><p>Shift selected lines right by the indent width (default 4 spaces).</p>
324332
</dd>
325333
<dt>Dedent Region</dt><dd><p>Shift selected lines left by the indent width (default 4 spaces).</p>
@@ -338,11 +346,7 @@ <h3>Edit menu (Shell and Editor)<a class="headerlink" href="#edit-menu-shell-and
338346
<dt>New Indent Width</dt><dd><p>Open a dialog to change indent width. The accepted default by the Python
339347
community is 4 spaces.</p>
340348
</dd>
341-
<dt>Format Paragraph</dt><dd><p>Reformat the current blank-line-delimited paragraph in comment block or
342-
multiline string or selected line in a string. All lines in the
343-
paragraph will be formatted to less than N columns, where N defaults to 72.</p>
344-
</dd>
345-
<dt>Strip trailing whitespace</dt><dd><p>Remove trailing space and other whitespace characters after the last
349+
<dt>Strip Trailing Chitespace</dt><dd><p>Remove trailing space and other whitespace characters after the last
346350
non-whitespace character of a line by applying str.rstrip to each line,
347351
including lines within multiline strings. Except for Shell windows,
348352
remove extra newlines at the end of the file.</p>
@@ -565,6 +569,13 @@ <h3>Automatic indentation<a class="headerlink" href="#automatic-indentation" tit
565569
<p>See also the indent/dedent region commands on the
566570
<a class="reference internal" href="#format-menu"><span class="std std-ref">Format menu</span></a>.</p>
567571
</section>
572+
<section id="search-and-replace">
573+
<h3>Search and Replace<a class="headerlink" href="#search-and-replace" title="Permalink to this heading"></a></h3>
574+
<p>Any selection becomes a search target. However, only selections within
575+
a line work because searches are only performed within lines with the
576+
terminal newline removed. If <code class="docutils literal notranslate"><span class="pre">[x]</span> <span class="pre">Regular</span> <span class="pre">expresion</span></code> is checked, the
577+
target is interpreted according to the Python re module.</p>
578+
</section>
568579
<section id="completions">
569580
<span id="id3"></span><h3>Completions<a class="headerlink" href="#completions" title="Permalink to this heading"></a></h3>
570581
<p>Completions are supplied, when requested and available, for module
@@ -1021,6 +1032,7 @@ <h3><a href="../contents.html">Table of Contents</a></h3>
10211032
<li><a class="reference internal" href="#editor-windows">Editor windows</a></li>
10221033
<li><a class="reference internal" href="#key-bindings">Key bindings</a></li>
10231034
<li><a class="reference internal" href="#automatic-indentation">Automatic indentation</a></li>
1035+
<li><a class="reference internal" href="#search-and-replace">Search and Replace</a></li>
10241036
<li><a class="reference internal" href="#completions">Completions</a></li>
10251037
<li><a class="reference internal" href="#calltips">Calltips</a></li>
10261038
<li><a class="reference internal" href="#code-context">Code Context</a></li>
@@ -1141,7 +1153,7 @@ <h3>Navigation</h3>
11411153
<br />
11421154
<br />
11431155

1144-
Last updated on Jul 03, 2022.
1156+
Last updated on Aug 05, 2022.
11451157
<a href="/bugs.html">Found a bug</a>?
11461158
<br />
11471159

0 commit comments

Comments
 (0)