问题
Shift + right-click feels unintuitive to me.
How can I tell ST3 to allow Alt + drag to do column selection, like in many other programs?
回答1:
I got this to work on Windows 7 using Sublime Text 3.
I created a file "C:\Users\\AppData\Roaming\Sublime Text 3\Packages\User\Default (Windows).sublime-mousemap", and put this in it:
[
{
"button": "button1","modifiers": ["alt"],
"press_command": "drag_select",
"press_args": {"by": "columns"}
},
]
回答2:
The accepted answer by dwn
is correct, but it is not complete answer.
This is more complex, because sometimes you need select two columns or just unselect some.
You need something like this:
[
{
"button": "button1", "modifiers": ["alt"],
"press_command": "drag_select",
"press_args": {"by": "columns"}
},
{
"button": "button1", "modifiers": ["alt", "shift"],
"press_command": "drag_select",
"press_args": {"by": "columns", "additive": true}
},
{
"button": "button1", "modifiers": ["alt", "ctrl"],
"press_command": "drag_select",
"press_args": {"by": "columns", "subtractive": true}
}
]
Tested on Win 7 and Sublime Text 3
来源:https://stackoverflow.com/questions/27788304/sublime-text-3-windows-column-selection-with-alt