Sublime Forum

How to change column select key bind?

#1

Actually, to i select a column i must do Shift+Right Click:

2020-11-15_00-52-32

Would like to ask, how I could change this key bind to Alt+Left Click as on Notepadd++.

I have found this code on StackOverflow:

[
    {
        "button": "button1", "modifiers": ["alt"],
        "press_command": "drag_select",
        "press_args": {"by": "columns"}
    },
    {
        "button": "button1", "modifiers": ["alt", "ctrl"],
        "press_command": "drag_select",
        "press_args": {"by": "columns", "additive": true}
    },
    {
        "button": "button1", "modifiers": ["shift", "alt"],
        "press_command": "drag_select",
        "press_args": {"by": "columns", "subtractive": true}
    },
]

https://stackoverflow.com/questions/39505914/how-to-edit-column-select-shortcut-in-sublime-text-3-portable#:~:text=In%20Sublime%20text%2C%20it%20is,to%20wished%20selection%20for%20Windows.

But it did not work here.

When I press Alt+Left-Click or Alt+Right-Click, nothing happens.
Even without the code above when pressing the keys mentioned above nothing happens.

My actual Default (Windows).sublime-mousemap:

[
    {
      "keys": ["ctrl+s"], "command": "run_multiple_commands", "args": {"commands": [ {"command": "save"}, {"command": "create_backup_copy" } ] }
    },

	  // toggle fold all
    { 
      "keys": ["f12"], "command": "fold_all"
    },
        
	  //toggle fold current code block
  	{ 
  		"keys": ["f11"], "command": "toggle_fold_current"
	},

    //alt+ left click column select
    {
        "button": "button1", "modifiers": ["shift"],
        "press_command": "drag_select",
        "press_args": {"by": "columns"}
    },

    {
        "button": "button1", "modifiers": ["shift", "ctrl"],
        "press_command": "drag_select",
        "press_args": {"by": "columns", "additive": true}
    },

    {
        "button": "button1", "modifiers": ["shift", "alt"],
        "press_command": "drag_select",
        "press_args": {"by": "columns", "subtractive": true}
    },
    
    //re-open recent file
    { 
    	"keys": ["ctrl+shift+t"], "command": "open_recent_file", "args": {"index" : 0} 
	},

]
0 Likes