zoukankan      html  css  js  c++  java
  • sublime模式下开启vim并修改esc

    首先我用的是sublime text2

    sublime下开启vim模式:

    在Preference -> Setting-User里面加上

    1 "ignored_packages": 
    2 [ 
    3 ]

    就可以使用一些vim的基本功能了。

    修改ESC:

    esc超级远按起来超级不方便, 所以我们可以把esc修改掉。

    如果把esc修改成shift+space的话, 在Preference -> Browse Packages 里面, 最下面找到Vintage文件, 然后在里面找到default,sublime-keymap, 在最后加上

     1 ,
     2     { "keys": ["shift+space"], "command": "exit_insert_mode",  
     3         "context":  
     4         [                 
     5             { "key": "setting.command_mode", "operand": false },  
     6             { "key": "setting.is_widget", "operand": false }  
     7         ]  
     8     },  
     9   
    10     { "keys": ["shift+space"], "command": "hide_auto_complete", "context":  
    11         [  
    12             { "key": "auto_complete_visible", "operator": "equal", "operand": true }  
    13         ]  
    14     },  
    15   
    16     { "keys": ["shift+space"], "command": "vi_cancel_current_action", "context":  
    17         [  
    18             { "key": "setting.command_mode" },  
    19             { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": false },  
    20             { "key": "vi_has_input_state" }  
    21         ]  
    22     } 

    开头的逗号不要忘记..这样shift+space也就有了esc的功能。

    然而我是将Caps Lock 这个改成了ESC, 但是sublime貌似没有办法改, 所以我直接把电脑的Caps Lock给改掉了...

    Windows Registry Editor Version 5.00
     
     [HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlKeyboard Layout]
     "Scancode Map"=hex:00,00,00,00,00,00,00,00,02,00,00,00,01,00,3a,00,00,00,00,00

    新建一个文本文档然后把上面的代码复制进去, 另存为XXX.reg。 然后打开那个文档重启电脑就可以了 =.=。

  • 相关阅读:
    js实现粘贴板复制
    oracle分页查询
    [小技巧]window10删除此电脑左侧栏中的非磁盘文件夹
    [web]2019第一起数据泄露事件
    [xml]AttributeError: 'xml.etree.ElementTree.Element' object has no attribute 'getroot'
    [python]Mongodb
    [urllib]urlretrieve在python3
    [flask]邮件配置-20171227
    [PowerShell]Python虚拟环境激活失败
    [git]git入门
  • 原文地址:https://www.cnblogs.com/yohaha/p/5247245.html
Copyright © 2011-2022 走看看