gorn.ch

Tobias Ebnöther's personal blog

Living with Terminal.app

Ok. My Terminal.app escapade has a bit gone out of hand so I decided to make a new post with all settings I changed.

Open your Terminal.app preferences and set it to xterm (xterm-color doesn't work very well in most places).

Open the window settings and delete all Settings for page up / down, home, end and delete (with all modifier variations).
Now set it up like this:
Home:		   \033[~1
End: \033[~4

Shift + Home: scroll to start of buffer
Shift + End: scroll to end of buffer

Delete: \033[~3

Page Up: \033[~5
Page Down: \033[~6

Shift + Page Up: scroll to previous page in buffer
Shift + Page Down: scroll to next page in buffer

To get a nice behaviour on the shell now edit your ~/.inputrc like this:
# Be 8 bit clean.
set input-meta on
set output-meta on
set convert-meta off

# allow the use of the Home/End keys
"\e[1~": beginning-of-line
"\e[4~": end-of-line

# allow the use of the Delete/Insert keys
"\e[3~": delete-char
"\e[2~": quoted-insert

# mappings for "page up" and "page down"
# to step to the beginning/end of the history
"\e[5~": beginning-of-history
"\e[6~": end-of-history

At last to get Shift+Page working with screen add the following lines to your ~/.screenrc:
termcapinfo xterm ti@:te@
defscrollback 1 #Will be handled localy

I learned a lot from this article but it was a bit imprecise concerning to the page up / down buttons and didn't provide the screenrc options. That's why I decided to make a new post.

Update:
To remove the scrollbar while not losing the buffer in your Terminal.app edit the following lines in your .term or .plist file:

<key>Scrollbar</key>
<string>NO</string>
Related Entries:
Fixing the delete key in Terminal.app
Nice screenrc and common keystokes
NetNewsWire Lite vs Vienna memory usage
tail -f to growl
xchat on OSX / Command as alt
Comments (5)  Permalink

Fixing the delete key in Terminal.app

Well it's quite annoying that the delete (forward-delete) key in default Apples Terminal.app doesn't work correctly but it is when SSHing to another machine. So here is my (quite bad) solution. I configure the Terminal.app to send "\033[3~" for delete. Then I add the following line to my ~/.inputrc:

"\e[3~": delete-char

When SSHing to another machine now the delete key may be broken. Just at the same line on that machine (that's why it is a quite bad solution but I just set my machines consequently to ^? / \e[3~ for backspace / delete).

A solution to nicely forward page up / down will follow as an update to this article.
Related Entries:
Living with Terminal.app
NetNewsWire Lite vs Vienna memory usage
Nice screenrc and common keystokes
tail -f to growl
xchat on OSX / Command as alt
 Permalink
1-2/2
Powered by Flux CMS