Mac – Setting Home and End of Line in Terminal

In Mac Terminal:

  • fn + left arrow: scroll to top
  • fn + right arrow: scroll to the bottom
  • fn + up arrow: page up
  • fn + down arrow: page down

 

I would like to set the action of the fn + left arrow as to be Home of Line as well as End of Line for fn + right arrow. So you can open the Terminal Preference –> Settings –> Keyboard Widget.

 

Double click the key and set the Action to send string to shell: with the following values.

  • home key: \033OH
  • end key: \033OF

 

You can now try it out in the Terminal. You can even use these keys in vi. Please note that you have to set it for different Terminal Theme

Done =)

Reference: Mac OSX Terminal Page Up/Down + Home/End of line

About these ads

2 thoughts on “Mac – Setting Home and End of Line in Terminal

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s