본문 바로가기

카테고리 없음

맥에서 alt+ 화살표로 단어 스킵하기

Switch to iTerm2. It's free and much nicer than plain old terminal. Also it has a lot more options for customization, like keyboard shortcuts.

Also I love that you can use cmd and 1-9 to switch between tabs. Try it and you will never go back to regular terminal :)

How to set up custom keyboard preferences in iterm2

  • Install iTerm2
  • Launch and then go to preference pane.
  • Choose the keyboard profiles tab
  • You will either need to copy the profile to something new and then delete the arrow key shortcuts such as ^ right / left arrow or if you don't care about a backup just delete them from the default profile.
  • Next make sure your modified profile is selected (starred)

Picture 1.png

  • Now choose the keyboard tab (very top row)

iTerm 2

  • Click on the plus button to add a new keyboard shortcut
  • In the first box type CMD + left arrow
  • In the second box choose "send escape code"
  • In the third box type the letter B

Picture 2.png

  • Repeat with desired key combinations. escape + B moves one word to the left, escape + fmoves one word to the right.
  • you may also wish to set up cmd+d to delete the word in front of the cursor with escape + d

I often hit the wrong button (cmd / control / alt) with an arrow key and so i have my arrow key combinations with those buttons all set to jump forward and back words, but please do what fits you best.