因?yàn)橐呀?jīng)習(xí)慣ctrl+e快捷鍵跳轉(zhuǎn)到行尾的功能,所以需要自定義快捷鍵。
自定義的原理是,用一個(gè)命令去覆蓋emmet的快捷鍵ctrl+e的自動補(bǔ)全功能,再把ctrl+e快鍵鍵設(shè)置成mac原有的跳轉(zhuǎn)到行尾的功能。
找到sublime text -> Perferences -> Package Settings -> Emmet -> Key Bindings-User
添加代碼:
[
{
"keys": [
"super+j"
],
"args": {
"action": "expand_abbreviation"
},
"command": "run_emmet_action",
"context": [
{
"key": "emmet_action_enabled.expand_abbreviation"
}
]
},
{
"keys": [
"ctrl+e"
],
"command": "move_to",
"args": {"to": "eol", "extend": false}
}
]