diff --git a/plugin/PySnipEmu/TextObjects.py b/plugin/PySnipEmu/TextObjects.py index 3d1726e..2c6b5f8 100644 --- a/plugin/PySnipEmu/TextObjects.py +++ b/plugin/PySnipEmu/TextObjects.py @@ -224,9 +224,7 @@ class TextObject(object): self._children.sort() - ################# - # Parsing below # - ################# + # Parsing below def _get_start_end(self, val, start_pos, end_pos): def _get_pos(s, pos): line_idx = s[:pos].count('\n') @@ -312,6 +310,16 @@ class TextObject(object): return val +class StartMarker(TextObject): + """ + This class only remembers it's starting position. It is used to + transform relative values into absolute position values in the vim + buffer + """ + def __init__(self, start): + end = Position(start.line, start.col) + TextObject.__init__(self, None, start, end, "") + class Mirror(TextObject): """ @@ -356,7 +364,6 @@ class Transformation(Mirror): return "Transformation(%s -> %s)" % (self._start, self._end) - class TabStop(TextObject): """ This is the most important TextObject. A TabStop is were the cursor @@ -369,11 +376,6 @@ class TabStop(TextObject): return "TabStop(%s -> %s, %s)" % (self._start, self._end, repr(self._current_text)) -class StartMarker(TextObject): - def __init__(self, start): - end = Position(start.line, start.col) - TextObject.__init__(self, None, start, end, "") - class SnippetInstance(TextObject): """ A Snippet instance is an instance of a Snippet Definition. That is,