Blog entries tagged “terminal”

Sunday, january 24th, 2010

iTerm: word shortcuts

In a terminal, I need both the “option” key to access alternate glyphs, like “•”, “∞” and French accents, like “é”, and to act like a “meta” key, which essentially sends an “escape” character followed by the key value.

Obviously a key can’t be two things at the same time, at least on Os X. On other Unix-like systems, you often have the left “alt” playing the role of the meta key, and the right “alt” playing the “altgr” role.

Some of the shortcuts I use the most are word navigation, using meta-left-arrow and meta-right-arrow, and word deletion, with meta-backspace (or “meta-delete” on Macs) to delete the word on the left, and meta-d to delete the word on the right.

So here are my recipies to bind those keys in iTerm.

Read the whole post…
Posted at 02:23
Tags: iTerm · osx · terminal
Sunday, january 24th, 2010

iTerm: extend the “send text” action

iTerm's key mapping system allows for a number of possible “actions”:

  • “send escape sequence” simply sends a “\e” followed by the text as-is;
  • “send hex code” scans for one 8-bit code, and sends that;
  • “send text” allows for “\e” (escape), “\n” (newline), “\a” (bell), and “\t” (tab), and normal text.

The goal of this small patch is to add two escape sequences to the “send text” action:

  • “\\” to send a single backslash;
  • “\xAA” or “\xBBBB” to send an arbitrary unicode character specified in hexadecimal.

For example, to bind the conventional “backward-kill-word” to option-delete (or alt-delete or meta-delete, or “backspace” on PC keyboards), you can simply add a key mapping for “delete”, checking “option”, selecting “send text” as the action, and typing, in the text box, “\e\x7f”.

From then on, hitting option-delete will delete the word on the left of the cursor :)

Read the whole post…
Posted at 01:30
Anglais seulement
Tags: iTerm · osx · terminal
Tuesday, january 29th, 2008

rxvt-unicode on Os X

I've done most things using CLIs: Commodore 64 don't have GUIs or mouses (well.. there was GeOS ), AmigaOS is quite UNIX+X11-like, and I can't live with Windows without Cygwin installed.

When I bought my MacBook, one of the first things I did was to launch the terminal. My last meal crawling its way back through my throat forced me to close it fast!

Ok... it's not that bad, but it doesn't seem to allow turning off that annoying bold and use 16 colors instead. The option "Use Option as Meta Key" is nice, but at the same time a pain... how am I supposed to type @, , {, [, … without a normal "alt" key? (BTW I'm mostly using a "French Canada" keymap) On the other hand, I'm not used to type ESC followed by left-arrow or w or … I want my meta key!

Then there's iTerm. It can turn off bold and use 16 colors. Not bad.. but I can't seem to get a working meta key.

So my quest is over... I want rxvt-unicode back! It supports everything and have the greatest UTF-8 support I've ever seen: Hit Control-Shift and 2022 and you get •, hit Control-Shift and click on the bullet, and you get an overlay saying "2022".

After being asked by a few friends about how to get rxvt-unicode working under Os X, I decided to dump this in my newly born blog.

Thus, in this article, I'm going to describe (tersely and yet verbosely enough, I hope) how I launch various X11 or shell applications like gnuplot, urxvt, ssh to server <insert_server_name_here> or gucharmap using QuickSilver.

Be warned that I'm assuming at least some knowledge on how to use a terminal, what is a shell, and such.

Read the whole post…
Posted at 16:15
Anglais seulement
Tags: linux · osx · osx-tricks · terminal · unicode · utf-8