OSX crazy Terminal.app

First of all, I have to say I love my Mac. But if there’s something that drives me crazy, is the Terminal.app’s keybindings.

After being a Linux user for some years, the way Terminal.app works makes me get crazy. Here’s how to put everything working like it sould:

First of all, open ~/.profile in a text editor. Add the following line  to the beginning of the file:

TERM=linux

Then, get to the Terminal preferences menu->Settings->Keyboard. Change the following keys to those actions. Simply click on Edit->Action: Send String to shell.

Change the following:                                To:

home                                              33[1~

end                                                  33[4~

page up                                          33[5~

page down                                     33[6~

control cursor right                     33f

control cursor left                        33b

Now it all should work fine.

To make 33 appear, simply press ESC on the text area.

If you get to screw Terminal.app, simply delete the file ~/Library/Preferences/com.apple.terminal.plist to reset the settings. (164)

/ February 25, 2010 / Uncategorized

Comments

  1. Jack Perry - April 11, 2012 @ 15:38

    Thanks A LOT for this! One difference on my machine, though: using 33[1~ for home doesn’t work the way I expect; I have to use 33[H. Likewise, I have to use 33[F for end.

    Reply
    • admin - April 12, 2012 @ 01:22

      Hi Jack! Glad it was useful for you :)
      Regards,
      Pedro

      Reply

Leave a Reply

Your email address will not be published / Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>