Mirtoff / pyscripter

Automatically exported from code.google.com/p/pyscripter
0 stars 0 forks source link

completion: add trailing colon with if,forwhile,etc. as does with braces and quotes #614

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
With statements like 'for, if, while...' it would be nice if a trailing colon 
(:) was appended to right of the insert cursor position similar to how braces 
and quotes are currently auto completed.

Also similar to braces, pressing [Enter] in the interactive interpreter would 
skip to end of line before issuing a new line instead of inserting newline at 
the current cursor position.

I find myself continually reaching for the [End] or right-arrowing when the 
statement is in fact already complete except for the colon. In the example 
below, the caret (^) is the cursor position at the point in time when the code 
is complete for the human, yet two movements plus a character entry need to be 
acted out before the statement can be passed to python. 

The braces at right of cursor have already been placed there by auto completion.

{{{
for c in chr(range(65,91^))
}}}

I'm using Portable PyScripter 2.4.3.0 on Win7 with Python 3.2.
This an enhancement request not a defect.

((great program by the way, thanks for sharing it!))

Original issue reported on code.google.com by map...@gmail.com on 14 Feb 2012 at 10:17

GoogleCodeExporter commented 9 years ago

Original comment by pyscripter on 14 Feb 2012 at 10:40