Sublime Forum

Deselect 'Select all' at the same place

#1

Hi,
When I click ctrl+a the only way to deselect is to click on arrow keys but the screen will be moved to the beginning or end of the document. Is there a way to deselect and remain on the same place?

1 Like

#2

I know how to do it creating a package to do it.


Fixed Clear Selections/main.py

import sublime
import sublime_plugin

class FixedClearSelectionsCommand(sublime_plugin.TextCommand):

    def run(self, edit):

        # print( 'Calling FixedClearSelections...' )
        self.view.sel().clear()

Default.sublime-keymap

[
    { 
        "keys": ["ctrl+shift+o"], "command": "fixed_clear_selections",
    },
]
1 Like

#3

Just press ctrl+u for soft_undo

3 Likes

#4

ctrl+u works, thanks.

1 Like