How to edit 'column select' shortcut in Sublime text 3 portable

空扰寡人 提交于 2021-01-04 08:51:00

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!