ehuss / Sublime-Wrap-Plus

Enhanced "wrap lines" command for Sublime Text 2 or 3.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Spaces are inserted for indent in Python docstring when the previous indents are tabs.

davidselassie opened this issue · comments

In my Python docstrings, if I start with

before

Then select this line

selection

and wrap, I get

after

Since the rest of the indentation is using tabs, it'd be nice to have that extra level also be tabs. I know spaces make sense when aligning with bullet points, but these extra indentations aren't lined up with anything in the first line.

A minor complexity for implementing this is that _extract_prefix would need to compute tab stops to determine the proper number of tabs and spaces to insert. That's not very difficult, but the function is already quite hairy.