mac item2自定義光標移動快捷鍵,移動行首行尾,按單詞跳轉


To jump between words and start/end of lines in iTerm2 follow these steps:

  • iTerm2 -> Preferences ( + ,)
  • Open the “Keys” tab
  • Add the following Global Shortcut Keys

Move cursor one word left

  • Keyboard Combination:  + 
  • Action: Send Hex Code
  • Code: 0x1b 0x62

Move cursor one word right

  • Keyboard Combination:  + 
  • Action: Send Hex Code
  • Code: 0x1b 0x66

Move cursor to beginning of line

  • Keyboard Combination:  + 
  • Action: Send Hex Code
  • Code: 0x01

Move cursor to end of line

  • Keyboard Combination:  + 
  • Action: Send Hex Code
  • Code: 0x05

Delete word

  • Keyboard Combination:  + ←Delete
  • Action: Send Hex Code
  • Code: 0x1b 0x08

Delete line

  • Keyboard Combination:  + ←Delete
  • Action: Send Hex Code
  • Code: 0x15

Undo

  • Keyboard Combination:  + z
  • Action: Send Hex Code
  • Code: 0x1f

Don't forget to remove the previous bindings:

  • Open the “Profiles” tab
  • Click the sub-tab ”Keys”
  • Remove the mappings for key combinations  +  and  + 

參考文檔: https://stackoverflow.com/questions/6205157/iterm-2-how-to-set-keyboard-shortcuts-to-jump-to-beginning-end-of-line


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM