Converts indentation to spaces respecting Vim settings.
(self, indent)
| 26 | return self.spaces_to_indent(line_ind) |
| 27 | |
| 28 | def indent_to_spaces(self, indent): |
| 29 | """Converts indentation to spaces respecting Vim settings.""" |
| 30 | indent = indent.expandtabs(self._tabstop) |
| 31 | right = (len(indent) - len(indent.rstrip(" "))) * " " |
| 32 | indent = indent.replace(" ", "") |
| 33 | indent = indent.replace("\t", " " * self._tabstop) |
| 34 | return indent + right |
| 35 | |
| 36 | def spaces_to_indent(self, indent): |
| 37 | """Converts spaces to proper indentation respecting Vim settings.""" |
no test coverage detected