前言
我在寫文章的時候,非常經常利用 home 與 end 這兩個按鍵,
來快速前往行首與行尾,
但 sublime 預設的 home、end 是到整頁的頭與尾,
但我們還是可以透過修改的方式,
達到「home(到行首)」,「end(到行尾)」的功能
修改使用者自定義按鍵
從 Rreferences 打開 Key Bindings,
並從個人的設定中加入以下設置,並儲存:
[
{ "keys": ["home"], "command": "move_to", "args": {"to": "bol", "extend": false} },
{ "keys": ["end"], "command": "move_to", "args": {"to": "eol", "extend": false} }
]
如下圖:
上面的指令內容,就是我們把 home、end 這兩個指令,
去映射到 bol (begin of column,我猜的)、 eol (end of column,我猜的)、
這樣就完成囉!
我熟悉的快速行首行尾 home、end 鍵終於回來了!!!