Sublime Forum

Moving cursor

#1

Is there an alternative way to move a cursor x characters forward programmatically in plugin code other than repeating the following statement x times?:

self.view.run_command(“move”, {“by”: “characters”, “forward”: True, “extend”: False})

0 Likes

#2

You can reposition the cursors by modifying view.sel().

0 Likes