如何使用Sublime Text 3的鼠标图设置?


8

我发现有关如何在Web上的各个地方使用“.sublime-mousemap”文件的分散信息,但没有全面的。

为Sublime Text 3指定鼠标设置有哪些选项?

Answers:


10

不是问题的完整解决方案,但我至少可以建议查看默认的鼠标图以获得一些学习价值。

如果在你的文件系统中找不到它(就像在我的情况下那样),我发现有一个PackageResourceViewer插件,可以通过以下方式打开它:

Ctrl+Shift+P- >“PackageResourceViewer:Open Resource” - >“Default” - >“Default(... OS ...).sublime-mousemap”。


此答案有助于检查和解决与“默认设置”相关的挑战。
Osmund Francis 2016年

3

在Windows 10,我可以覆盖的默认设置C:\Users\Cees.Timmerman\AppData\Roaming\Sublime Text 3\Packages\User\Default (Windows).sublime-mousemap

在保存该文件时,Sublime将使用它,或者如果语法错误则显示错误消息。

这是链接死亡时的默认内容:

[
    // Basic drag select
    {
        "button": "button1", "count": 1,
        "press_command": "drag_select_callback"
    },
    {
        "button": "button1", "count": 1, "modifiers": ["ctrl"],
        "press_command": "drag_select_callback",
        "press_args": {"additive": true}
    },
    {
        "button": "button1", "count": 1, "modifiers": ["alt"],
        "press_command": "drag_select_callback",
        "press_args": {"subtractive": true}
    },

    // Select between selection and click location
    {
        "button": "button1", "modifiers": ["shift"],
        "press_command": "drag_select_callback",
        "press_args": {"extend": true}
    },
    {
        "button": "button1", "modifiers": ["shift", "ctrl"],
        "press_command": "drag_select_callback",
        "press_args": {"additive": true, "extend": true}
    },
    {
        "button": "button1", "modifiers": ["shift", "alt"],
        "press_command": "drag_select_callback",
        "press_args": {"subtractive": true, "extend": true}
    },

    // Drag select by words
    {
        "button": "button1", "count": 2,
        "press_command": "drag_select_callback",
        "press_args": {"by": "words"}
    },
    {
        "button": "button1", "count": 2, "modifiers": ["ctrl"],
        "press_command": "drag_select_callback",
        "press_args": {"by": "words", "additive": true}
    },
    {
        "button": "button1", "count": 2, "modifiers": ["alt"],
        "press_command": "drag_select_callback",
        "press_args": {"by": "words", "subtractive": true}
    },

    // Drag select by lines
    {
        "button": "button1", "count": 3,
        "press_command": "drag_select_callback",
        "press_args": {"by": "lines"}
    },
    {
        "button": "button1", "count": 3, "modifiers": ["ctrl"],
        "press_command": "drag_select_callback",
        "press_args": {"by": "lines", "additive": true}
    },
    {
        "button": "button1", "count": 3, "modifiers": ["alt"],
        "press_command": "drag_select_callback",
        "press_args": {"by": "lines", "subtractive": true}
    },

    // Shift + Mouse 2 Column select
    {
        "button": "button2", "modifiers": ["shift"],
        "press_command": "drag_select_callback",
        "press_args": {"by": "columns"}
    },
    {
        "button": "button2", "modifiers": ["shift", "ctrl"],
        "press_command": "drag_select_callback",
        "press_args": {"by": "columns", "additive": true}
    },
    {
        "button": "button2", "modifiers": ["shift", "alt"],
        "press_command": "drag_select_callback",
        "press_args": {"by": "columns", "subtractive": true}
    },

    // Mouse 3 column select
    {
        "button": "button3",
        "press_command": "drag_select_callback",
        "press_args": {"by": "columns"}
    },
    {
        "button": "button3", "modifiers": ["ctrl"],
        "press_command": "drag_select_callback",
        "press_args": {"by": "columns", "additive": true}
    },
    {
        "button": "button3", "modifiers": ["alt"],
        "press_command": "drag_select_callback",
        "press_args": {"by": "columns", "subtractive": true}
    },

    // Simple chording: hold down mouse 2, and click mouse 1
    {
        "button": "button1", "count": 1, "modifiers": ["button2"],
        "command": "expand_selection", "args": {"to": "line"},
        "press_command": "drag_select_callback"
    }
]

对于sublime的便携版本,我创建了以下文件:。\ Sublime \ Data \ Packages \ User
Elijah W. Gagne
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.