mkaz.com home photography web dev about

My iTerm Notes

Author: Marcus Kazmierczak
Created On: July 7th, 2005
Updated On: April 27th, 2007

Updated: I've switched back to iTerm. The latest version improves on performance and using SSHKeyChain solves the ssh issue I had, both of which made me previously leave iTerm.

Using Bookmarks

The bookmarks in the latest iTerm is much improved. You can set the title of each tab and have different profiles (colors) for each bookmark. Also short cut keys for bookarmks, though I found the CMD+CTRL+D which I was trying to use for my database machine wasn't working. Plus I had trouble mapping key maps to servers.

So I ended up using the following script to launch new tabs. I create a bookmark for each server, setting the bookmark name as the server and setting bookmark command to "ssh -X -l USERNAME server.site.com".

I use the following iterm script to run bookmark by typing "iterm server"

iterm

#!/bin/bash

if [ "$#" = "0" ]; then
echo "Usage: iterm bookmarkname" && exit 1
fi

osascript <<ENDSCRIPT
on run argv
 tell application "iTerm"
  activate
   tell the first terminal
   launch session "$1"
   end tell
  end tell
 end run
ENDSCRIPT
Keys and Colors

I found I had to set my TERM to dtterm in order for vim to handle my arrow keys properly.

Add the following to your .bashrc or .profile

export TERM=dtterm
alias ls='ls -G'
alias ll='ls -hl'

The ll alias will pick up the -G color switch in the ls alias.


Vim

Add the following to your .vimrc

syntax on

" for light backgrounds
colorscheme default

" for dark backgrounds
colorscheme elflord


Related Links: