code-google-com / editra-plugins

Automatically exported from code.google.com/p/editra-plugins
0 stars 0 forks source link

IPyShell Improper automatic indentation #50

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Type in some code

def Hello(msg):
        print "hello %s" % msg
                |

Issue 1:

It seems to automatically indent with Tab characters with a width set to 8
characters. Using 4 spaces would be more standard.

Issue 2:

Hitting Enter after the 'print' line will once again indent another level
of indentation, when it should just line up with the 'print' statement. The
extra level of indentation would be correct if it was a (if, for, while)
statement but not for a print.

Please use labels and text to provide additional information.

Original issue reported on code.google.com by CodyPrec...@gmail.com on 24 May 2008 at 1:40

GoogleCodeExporter commented 9 years ago
Duplicate bug report submitted in editra's bug tracker at:

http://code.google.com/p/editra/issues/detail?id=113

Original comment by CodyPrec...@gmail.com on 28 May 2008 at 3:29

GoogleCodeExporter commented 9 years ago
4 spaces is the standard for ipython this is a confirmed bug.
For issue 2
Do you mean you've got that?:
In [1]: if True:
   ...:     print "ok"
   ...:
   ...:
ok

In [2]:

Original comment by laurent....@gmail.com on 28 May 2008 at 9:34

GoogleCodeExporter commented 9 years ago
For Issue 1 you should be able to fix it by simply calling

SetUseTabs(False)
SetIndent(4)

When creating the StyledTextCtrl

In the second issue it was because I backspaced the 8 spaced tab to 4 spaces 
then hit
enter which then put in an 8 space tab on the next line instead of matching the 
4
spaces of indentation I had in the line above. Fixing issue one will likely fix 
this
for all intense and purposes.

cody

Original comment by CodyPrec...@gmail.com on 28 May 2008 at 9:46

GoogleCodeExporter commented 9 years ago
Thanks! I was looking how to change the tab size :)

Original comment by laurent....@gmail.com on 28 May 2008 at 9:51

GoogleCodeExporter commented 9 years ago

Original comment by laurent....@gmail.com on 1 Jun 2008 at 11:18

GoogleCodeExporter commented 9 years ago
Move old 'fixed' issues to verified

Original comment by CodyPrec...@gmail.com on 3 Feb 2009 at 8:18