V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
jaymiao
V2EX  ›  Sublime Text

sublime 删除单词和持续选中

  •  
  •   jaymiao · 2015-10-26 15:22:39 +08:00 · 2881 次点击
    这是一个创建于 3102 天前的主题,其中的信息可能已经有所发展或是发生改变。

    不喜欢用 sublime 的 vim 模式现在比较需要的是
    1. 删除单词就和 vim 中的 d+w 功能一样,直接在 key_mapping 中写个映射就能用了,这个答案请不要给出 cmd+d 选中单词再 delete
    2. 从光标持续向后选中 这个答案不要 cmd + shift + ->

    上面两个问题需要的答案是能够在 key_mapping 中映射的按键的 command,请各位 sublime 使用者作答,也别问为什么不用 vim 或者 vim 模式,每个人有自己选择。

    2 条回复    2015-10-27 10:43:37 +08:00
    jfcherng
        1
    jfcherng  
       2015-10-26 19:39:48 +08:00
    1.
    { "keys": ["ctrl+alt+'"], "command": "delete_word", "args": { "forward": true } },

    2.

    { "keys": ["ctrl+alt+shift+l"], "command": "move", "args": { "by": "word_ends", "extend": true, "forward": true } },

    你想要的答案可在 sublime console 中使用 sublime.log_commands(True) ,按下按鍵便會印出命令。
    上面是我自己使用的映射。
    jaymiao
        2
    jaymiao  
    OP
       2015-10-27 10:43:37 +08:00
    @jfcherng 非常好用,感谢
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3324 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 12:32 · PVG 20:32 · LAX 05:32 · JFK 08:32
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.