【发布时间】:2015-04-02 03:05:54
【问题描述】:
在 Sublime Text 2(或 3)中,是否有某种键盘快捷键(制表符?回车?)从 | 表示的光标开始:
$var->catch('someName|');
到
$var->catch('someName');|
或
$var->catch('someName');
|
【问题讨论】:
标签: sublimetext2 sublimetext sublimetext3
在 Sublime Text 2(或 3)中,是否有某种键盘快捷键(制表符?回车?)从 | 表示的光标开始:
$var->catch('someName|');
到
$var->catch('someName');|
或
$var->catch('someName');
|
【问题讨论】:
标签: sublimetext2 sublimetext sublimetext3
对于您的第一个场景,您可以稍微修改此答案:https://stackoverflow.com/a/19957050/1569064(注意在 operand 值中添加了单引号 ' 和分号 ;
// Move to end of line
{
"keys": ["shift+enter"], "command": "move_to", "args": {"to": "eol", "extend": false}, "context":
[
{ "key": "following_text", "operator": "regex_contains", "operand": "^[)\"';\\]\\}\\$]", "match_all": true },
{ "key": "auto_complete_visible", "operator": "equal", "operand": false }
]
},
// Move to next line
{
"keys": ["ctrl+shift+enter"], "command": "move", "args": {"by": "stops", "empty_line": true, "forward": true}, "context":
[
{ "key": "following_text", "operator": "regex_contains", "operand": "^[)\"';\\]\\}\\$]", "match_all": true },
{ "key": "auto_complete_visible", "operator": "equal", "operand": false }
]
}
当下面有空行时,我对第二个示例的回答有效。否则,它将光标移动到下一个非空行的末尾。
【讨论】: