mac item2自定义光标移动快捷键,移动行首行尾,按单词跳转

Posted chenkeyu

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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

以上是关于mac item2自定义光标移动快捷键,移动行首行尾,按单词跳转的主要内容,如果未能解决你的问题,请参考以下文章

Mac下Vim编辑快捷键小结(移动光标)

LinuxTerminal中输入一行命令快速移动光标至行首行尾

vim 实践

Mac下Vim编辑快捷键小结

Vim快速移动光标至行首和行尾

ubuntu vi 键入上下变成AB