[issue18875] Idle: Auto insertion of the closing parens, brackets, and braces

2020-07-20 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

I found this in Notepad++ under Settings -> Preferences -> Auto-completion -> 
Auto-insert with separate checkboxes for (, {, [, ', ", html/xml tags, and up 
to 3 custom pairs.  Way too elaborate for IDLE.  The only question to me is 
whether to have just one option for all 5 openers or separate option to 
complete ([{ versus quotes.

Concerns: a) matching triple quotes is a bit baroque, though possible the most 
useful part of the feature; b) except for completing tripple quotes, no 
keystrokes are saved, and then only if one used End to skip three chars at 
once.  On the other hand, at least some people who have use the feather 
elsewhere consider it a net win.

Implementation notes: 1. IDLE editors uses two mechanisms to respond to 
keystrokes.  The delegator mechanism checks all keystrokes and responds to 
some.  IDLE otherwise binds keystrokes to event-handlers or to pseudoevent 
bound to event-handlers.  Perhaps these could be unified and made more 
efficient.

2. In the meanwhile... Menu items are bound to pseudoevents, along with 
corresponding hot heys.  This issue will *not* add a menu entry "Add matching 
closer".  So the openers can be bound directly to event handlers that look at 
the opener.

--
versions: +Python 3.10 -Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18875] Idle: Auto insertion of the closing parens, brackets, and braces

2018-04-05 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

My question about the idea is whether beginners would use this, or if it is the 
sort of 'expert' feature that IDLE should avoid.  I may ask on python-list for 
more opinions.

https://stackoverflow.com/questions/49677886/python-idle-symbol-completion/49684824#49684824
 adds a vote in favor.  It also prompted me to review the patch.

Since I said, 4 years ago, that the feature should be an extension, we have 
converted extensions to features.  So the patch needs re-writing, as I outlined.

(Although there is now an extension configuration dialog, it is no longer a 
dependency of this issue.)

I am not convinced that we need 5 configuration options, especially since I do 
not understand 2 of them ;-).  Do symbol and quote fences need to be separately 
enabled?  Does anyone known what other IDEs do?

--
dependencies:  -IDLE - Add an extension configuration dialog
versions: +Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18875] Idle: Auto insertion of the closing parens, brackets, and braces

2017-09-28 Thread Tal Einat

Change by Tal Einat :


--
nosy:  -taleinat

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18875] Idle: Auto insertion of the closing parens, brackets, and braces

2017-09-20 Thread Charles Wohlganger

Charles Wohlganger added the comment:

The PR contains all the requested features, as well as mutual deletion 
(requested on PR page), and I have separated out the options for mutual 
deletion triggered by delete or triggered by backspace. I've found in usage 
that it was irritating to have both, but nice to only have one. Let users pick 
one, both, or none.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18875] Idle: Auto insertion of the closing parens, brackets, and braces

2017-09-12 Thread Charles Wohlganger

Changes by Charles Wohlganger :


--
keywords: +patch
pull_requests: +3517
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18875] Idle: Auto insertion of the closing parens, brackets, and braces

2017-07-21 Thread Charles Wohlganger

Changes by Charles Wohlganger :


Added file: http://bugs.python.org/file47031/test_parenclose.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18875] Idle: Auto insertion of the closing parens, brackets, and braces

2017-07-20 Thread Charles Wohlganger

Charles Wohlganger added the comment:

I've uploaded a test file and updated ParenClose.

--
Added file: http://bugs.python.org/file47030/ParenClose.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18875] Idle: Auto insertion of the closing parens, brackets, and braces

2017-07-20 Thread Charles Wohlganger

Changes by Charles Wohlganger :


Added file: http://bugs.python.org/file47029/test_parenclose.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18875] Idle: Auto insertion of the closing parens, brackets, and braces

2017-07-18 Thread Charles Wohlganger

Charles Wohlganger added the comment:

I (foolishly) was committing to master for a different IDLE enhancement. Until 
that one is pulled, I don't think I can make a new PR without it also having 
all the changes from my previous one. 

New uploaded file has docstrings for the ParenClose class and I've run and 
fixed it against pep8 until it gave no errors. Namespaces should conform to 
PEP8, apart from the module name, which must match the class name due to how 
IDLE works with extensions.

--
Added file: http://bugs.python.org/file47023/ParenClose.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18875] Idle: Auto insertion of the closing parens, brackets, and braces

2017-07-17 Thread Louie Lu

Louie Lu added the comment:

Charles, good to saw the patch, would you like to convert it into GitHub PR? 
also, it would have to adjust some coding style to satisfy PEP8. I can help you 
on GitHub to review this patch.

--
nosy: +louielu

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18875] Idle: Auto insertion of the closing parens, brackets, and braces

2017-07-17 Thread Charles Wohlganger

Charles Wohlganger added the comment:

I've written an extension (see file) that does auto insertion of closing 
parens, brackets, braces, ticks, and quotes. It also (optionally) skips the 
closers when they are typed right next to the already exiting one. It also 
takes into account triple-ticks / triple-quotes.

--
nosy: +wohlganger
Added file: http://bugs.python.org/file47021/ParenClose.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18875] Idle: Auto insertion of the closing parens, brackets, and braces

2017-06-29 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
assignee:  -> terry.reedy
nosy:  -BreamoreBoy
versions: +Python 3.6, Python 3.7 -Python 2.7, Python 3.4, Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18875] Idle: Auto insertion of the closing parens, brackets, and braces

2014-10-02 Thread Terry J. Reedy

Terry J. Reedy added the comment:

This would have to be an extension, default off unless overridden, which is why 
I added config-extensions as dependency.

--
dependencies: +IDLE - Add an extension configuration dialog
title: Automatic insertion of the closing parentheses, brackets, and braces - 
Idle: Auto insertion of the closing parens, brackets, and braces
versions: +Python 2.7, Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18875
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com