【问题标题】:Sublime Text - Keyboard shortcut to go to next line or end of line after autocomplete?Sublime Text - 自动完成后转到下一行或行尾的键盘快捷键?
【发布时间】:2015-04-02 03:05:54
【问题描述】:

在 Sublime Text 2(或 3)中,是否有某种键盘快捷键(制表符?回车?)从 | 表示的光标开始:

$var->catch('someName|');

$var->catch('someName');|

$var->catch('someName');
|

【问题讨论】:

    标签: sublimetext2 sublimetext sublimetext3


    【解决方案1】:

    对于您的第一个场景,您可以稍微修改此答案: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 }
        ]   
    }
    

    当下面有空行时,我对第二个示例的回答有效。否则,它将光标移动到下一个非空行的末尾。

    【讨论】:

      猜你喜欢
      • 2014-07-28
      • 1970-01-01
      • 2012-08-31
      • 2012-07-20
      • 2013-07-18
      • 1970-01-01
      • 2014-11-23
      • 2019-08-06
      • 1970-01-01
      相关资源
      最近更新 更多