Author Topic: No indent on 'with' statement in python  (Read 2296 times)

JakeMontgomery

  • Community Member
  • Posts: 79
  • Hero Points: 8
No indent on 'with' statement in python
« on: May 08, 2014, 05:39:14 PM »
Using SE v18.0.1.2 (with hotfix_se1801_27_cumulative), I get incorrect indenting in python when using the with statement. For example:
Code: [Select]
with open("/tmp/text") as f:
with the cursor after the :, hitting enter puts the cursor a column 1, instead of indented.
This can be fixed (AFAICT) by adding with to the list in the PYTHON_BLOCK_WORDS variable in python.e.

I thought this might be helpful to anyone else doing python development, and perhaps it could be fixed in the next hotfix, so I don't need to keep patching it.

patrick

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1818
  • Hero Points: 151
Re: No indent on 'with' statement in python
« Reply #1 on: May 09, 2014, 06:12:19 PM »
That looks good, I'll drop that in later so it will make the next hotfix.  Thanks for catching that.