使用 ctrl 和 shift 在 Sublime 中选择文本
Selecting text in Sublime with ctrl and shift
我最近开始使用 Sublime Text,有一件事真的让我很吃力。当使用 CTRL 和 SHIFT 按箭头 selecting 文本时,我遇到了这种(对我来说)意想不到的行为。
举例来说,我有这样的行:
<div>
<p>Some text</p>
</div>
我的插入符号位于
之后的第一行末尾。我按住 CTRL + SHIFT 并按 RIGHT ARROW 两次(一次跳转到 Some text
所在的行,第二次跳转到 select spaces/tabs 并在 Some text 之前着陆
) 但奇怪的是
有什么方法可以配置吗?我已经使用 VS 和 WebStorm 很长时间了,所以这是一种机械动作,Sublime 中的这个小东西真的让我很沮丧。
首先,打开Preferences -> Key Bindings-User
。如果文件完全为空,或者只包含左方括号和右方括号 [ ]
,请将内容更改为以下内容:
[
{ "keys": ["ctrl+right"], "command": "move", "args": {"by": "subwords", "forward": true} },
{ "keys": ["ctrl+shift+right"], "command": "move", "args": {"by": "subwords", "forward": true, "extend": true} }
]
如果您已经有一些自定义键绑定,请将以下行添加到开头,紧跟左括号 [
:
{ "keys": ["ctrl+right"], "command": "move", "args": {"by": "subwords", "forward": true} },
{ "keys": ["ctrl+shift+right"], "command": "move", "args": {"by": "subwords", "forward": true, "extend": true} },
确保在完成后保存文件。这将为您提供您习惯的行为。
我最近开始使用 Sublime Text,有一件事真的让我很吃力。当使用 CTRL 和 SHIFT 按箭头 selecting 文本时,我遇到了这种(对我来说)意想不到的行为。
举例来说,我有这样的行:
<div>
<p>Some text</p>
</div>
我的插入符号位于
之后的第一行末尾。我按住 CTRL + SHIFT 并按 RIGHT ARROW 两次(一次跳转到
Some text
所在的行,第二次跳转到 select spaces/tabs 并在Some text 之前着陆
) 但奇怪的是
有什么方法可以配置吗?我已经使用 VS 和 WebStorm 很长时间了,所以这是一种机械动作,Sublime 中的这个小东西真的让我很沮丧。
首先,打开Preferences -> Key Bindings-User
。如果文件完全为空,或者只包含左方括号和右方括号 [ ]
,请将内容更改为以下内容:
[
{ "keys": ["ctrl+right"], "command": "move", "args": {"by": "subwords", "forward": true} },
{ "keys": ["ctrl+shift+right"], "command": "move", "args": {"by": "subwords", "forward": true, "extend": true} }
]
如果您已经有一些自定义键绑定,请将以下行添加到开头,紧跟左括号 [
:
{ "keys": ["ctrl+right"], "command": "move", "args": {"by": "subwords", "forward": true} },
{ "keys": ["ctrl+shift+right"], "command": "move", "args": {"by": "subwords", "forward": true, "extend": true} },
确保在完成后保存文件。这将为您提供您习惯的行为。