I’ve got the current line I want to edit and the position of the cursor, I want to be able to delete 1 character left of the cursor for each time the method is run.
class DeleteOneCharacterLeftOfCursor(sublime_plugin.TextCommand):
def run(self, edit):
line = self.view.substr(self.view.line(self.view.sel()[0].b))
pos = self.view.sel()[0].begin()
Does anybody know how this can be done?