Even smarter tabs (just use what the previous line used)

Sometimes we need to do quick fixes, which is a challenge as some of our files use tabs and the others use spaces.

Is there a trick to get PyCharm to ignore my Code Style preference for Python and just use whatever tab/space combo the previous line used?  Or another take is if inserting a new line between 2 lines of existing code and the tab/space style for those lines match, set the ident style for the new line to match those existing lines.  Call it a "When in Rome, do as the Romans do" mode. :-)

If I should submit a YouTrack feature enhancement request, please let me know.

Cheers,

Rob

2 comments

Unfortunately the IntelliJ Platform formatter core does not support such mode of operation. You're welcome to file a feature request, but I don't think there's much chance of it being implemented in the near future.

0

yole wrote:

Unfortunately the IntelliJ Platform formatter core does not support such mode of operation. You're welcome to file a feature request, but I don't think there's much chance of it being implemented in the near future.

Yole,

Thanks for the quick reply.  And I appreciate the honesty.  I did write up the enhancement request as http://youtrack.jetbrains.net/issue/IDEA-80065

Everyone else,

For those that would like to see this feature get added, please got to YouTrack http://youtrack.jetbrains.net/issue/IDEA-80065 and vote for it.  Thanks!

Cheers,

Rob

0

Please sign in to leave a comment.