def run(self, edit): state = VintageState(self.view) if state.mode == MODE_VISUAL: state.store_visual_selections() self.view.run_command('collapse_to_direction') self.view.run_command('dont_stay_on_eol_backward') state.enter_normal_mode()
def run(self, edit): state = VintageState(self.view) if state.mode == MODE_VISUAL: state.store_visual_selections() self.view.run_command('collapse_to_direction') self.view.run_command('dont_stay_on_eol_backward') state.enter_normal_mode()
def run(self, edit): state = VintageState(self.view) if state.mode == MODE_VISUAL: state.store_visual_selections() # When returning to normal mode from select mode, we want to keep the non-Vintageous # selections just created unless it's the last one. if not (state.mode == MODE_SELECT and len(self.view.sel()) > 1): self.view.run_command('collapse_to_direction') self.view.run_command('dont_stay_on_eol_backward') state.enter_normal_mode()
def run(self, edit): state = VintageState(self.view) if state.mode == MODE_VISUAL: state.store_visual_selections() # When returning to normal mode from select mode, we want to keep the non-Vintageous # selections just created. if state.mode != MODE_SELECT: self.view.run_command('collapse_to_direction') self.view.run_command('dont_stay_on_eol_backward') state.enter_normal_mode()