问题
I am a novice to Sublime text. Previously I used notepad++. I use column selection frequently. In notepad++ it comes to me handy with alt
+ left mouse click
which I can drag up to my wished selection.
In Sublime text, it is shift
+ right mouse click
and drag up to wished selection for Windows. I want to change it to alt
+ left mouse click
as I have used it in notepad++.
I tried searching in preferences > key bindings
in sublime text. But couldn't find mouse-key mappings there. I am using portable version of Sublime text 3 on Windows.
回答1:
Go to Preferences > Browse Packages...
then create a new file called Default (Windows).sublime-mousemap
in the User
folder.
Insert the following:
[
{
"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