Hacker News new | past | comments | ask | show | jobs | submit login
ITerm 2 (sites.google.com)
185 points by xtacy on Jan 23, 2011 | hide | past | favorite | 80 comments



"An iTerm2 exclusive feature. Type the start of a word and press Cmd-;. A popup window opens at the cursor position with completion suggestions."

Surely that is best left as a shell feature...

EDIT: if the author is reading this, you link to a page which describes the incorrect way of enabling 256 colors in Vim (http://kevin.colyar.net/2011/01/pretty-vim-color-schemes-in-...). It suggests using `:set t_Co=256`, but that is generally considered by the Vim community (#vim on freenode) as the improper way of doing it. The correct way to do it is to just set your TERM env variable correctly (iterm does come with or support terminfo that indicates 256 color support, right?).


What in particular should one set their TERM variable as to support 256 colors?


Depends on which terminal emulator you're using and which terminfo descriptions are available. (Ubuntu users: install the "ncurses-term" package.)

Xterm: xterm-256color, Putty: putty-256color, Gnome Terminal: gnome-256color, Konsole: konsole-256color, Screen/Tmux: screen-256color

And for anyone interested, the best TERM for Terminal.app is dtterm.


> And for anyone interested, the best TERM for Terminal.app is dtterm.

I'm interested because the home and end key don't work for me, but when I use this, I get

  Error opening terminal: dtterm.
when running a curses app after logging into a Fedora 14 box.


Maybe you don't have a dtterm terminfo description there. You can get it to your remote system using terminfo and tic.


I use TERM=xterm-256color


Having changed this 256 colors seem to work in Vim with the exception of the background color. I presume this is something to do with the default "white on black" theme that iTerm2 is using?


I updated the FAQ to talk about this. You should set background=dark or background=light in your .vimrc.


Features which utilize or cross over multiple shell instances probably belong in the terminal emulator. Autocompletion could be considered one of these if you were editing multiple files on different machines.


Any auto-completion that the terminal emulator could possibly provide will absolutely pale in comparison to what a properly configured shell can do.

Just copy over your shell config file if you're really in a poor situation like that often, and it's pretty trivial to make a script that'll automate it.


Surely a decent shell could provide some additional functionality to terminal using e.g. D-Bus (I'm not sure what standard desktop IPC is in OSX).

I'm not convinced auto-completion is one of them though. But hey, if you like GUI popups better it's certainly hackable!


It's certainly something that could be done, but also something that shouldn't be done. You would have to make modifications to every possible shell the user might want to use, and these would only be a feature usable in a very select few terminal emulators. It creates way more work because, in short, it's a violation of the Unix design philosophy.

EDIT: The way you'd do this is to provide additional functionality to the shell, not to the terminal.


(Haven't noticed your reply; my guess is you won't notice mine now... oh well)

> It's certainly something that could be done, but also something that shouldn't be done.

I was just thinking out loud how it could be done, so I don't see any disagreement here.

> You would have to make modifications to every possible shell the user might want to use, and these would only be a feature usable in a very select few terminal emulators.

Well, it'd be optional addition. Furthermore...

> It creates way more work because, in short, it's a violation of the Unix design philosophy.

Already shells attempt to detect if your terminal support color output, scrolling etc.

Your shell would still go around its usual business (e.g. auto-completion), the only thing that changes is how you're going to present that functionality to the user. And if terminal you're outputting to is happy to provide a popup, then why not use it? I don't see how that violates Unix design philosophy.

> EDIT: The way you'd do this is to provide additional functionality to the shell, not to the terminal.

Yes, that seems to be more accurate. The shell would make use of the additional capabilities provided by terminal.


Can the shell complete text which was rendered with terminal specific escape sequences, i.e. color? Can it complete stdout from child processes (i.e. cat)?


The use case for this is for those things the shell cannot autocomplete. For example, you might want to get a directory listing with ls and then operate on one of the filenames that it outputs. You can retype the filename, which is error-prone, copy-paste it with the mouse (which takes your hands off the keyboard), or type the first few letters and autocomplete. Autocomplete is by far the fastest way to do this.


"The use case for this is for those things the shell cannot autocomplete."

I think you meant terminal emulator.


You seem to assume we only use our terminal to interact with a shell.


Of course not, for programs that don't provide at least readline capabilities, I suggest `rlwrap`.


On neat thing I discovered on accident a few days ago. If you make Iterm2 fullscreen, then alt tab to another application, it stays in full screen mode in the background. So it is basically like having a terminal as your wallpaper.


If you have a rather large monitor, that might put your terminal at a ridiculous size. For quick access to Terminal.app, Quake console style, I use Visor, which slides it down from the top of the screen on a global hotkey:

http://visor.binaryage.com/

One of the handiest SIMBL's I've ever found.


I like Visor, but it doesn't play nice with Witch.app at all, which I use to do per-window alt-tabbing (as opposed to per-application cmd-tabbing, which isn't always what I want since it brings all the windows of an app to the foreground). It also makes cmd-` behave a bit weirdly.


I like http://decimus.net/DTerm/ since it defaults to the CWD of the frontmist document from which youmactivate it.


I love the Quake console reference :D


I keep it fullscreen in a separate space via OS X Spaces. Works well too.


Now that is actually cool.


This is great news. It mystifies me that Apple has such a beautiful UI, but Terminal.app doesn't support 256 colors. It makes vim on a remote machine look like garbage and is inexcusable. I'm anxious to try this out.


Out of curiosity: what do you mean by a "beautiful UI"? It looks like just every other terminal I've used.


He was referring to OSX's UI.


I think he was talking about the rest of the OS.


Split panes and full screen is just _awesome_. I've been experimenting with running a Linux VM with the awesome window manager, solely because I want more or less automatic window management for my terminals. With iTerm 2 I get awesome terminal management without, well, awesome.


I run Terminator (http://www.tenshu.net/terminator/) in a Linux VM for the same reason. Such tremendous overkill. Now I'm tempted to dig out my Mac Mini...


You should try tmux also


GNU screen can also split, but tmux's paning is much nicer, yeah.


I used iTerm a long time ago, but I hated it's font rendering. I imagine that 1.x series improved it at some point, but it's been off my radar so long I never bothered to check again. This, however, is fabulous. I love the ability to tweak the ANSI colors without having to resort to SIMBL hacks.


The biggest problem with iTerm was the fact that if you left it running it would constantly eat up 1-2% of your cpu and never go to idle. This really hurt the battery life on any laptop.


Background CPU utilization is much lower in iTerm2 (though still not quite 0, I'm working on it). And the next version will have support for controlling the thickness of antialiased text, which should resolve some complaints about font rendering.


Very little that screen + bash don't already do. But ill take it because maybe it fixes the bugs iterm has.


256 colors - the only reason I use MacVim instead of vim in the shell.


been using this for a few months now. Fantastic, and George is a great guy and maintainer for this app. Very quick to respond and updates frequently.

Biggest wins?

* 256 color

* xterm mouse reporting

* more configurable - why do I need scrollbars when I always use screen/tmux?

* split panes - as good as screen :)


I remember spending some time with iTerm in the past, and being frustrated when it crashed, but since I found out about controllermate I reverted to terminal.app

My reasons :

* 99% of what I need is there by default (ex: the 4 features here are not important to me)

* stable

* shipped by default, no need to spend time downloading yet another application, following the upgrades etc

* when I need some very special shortcut that terminal.app won't allow me to remap, ex ctrl-numbers, that's a job I can do within controllermate.

Ex: while reading about iterm2 features, I thought this visor key stuff seemed potentially usefull. I did that with CM, mapping the insert key to bring terminal.app to the front, or option-tab to the previous application if it is already focused.

CM is not mandatory : option-arrows can be remapped directly in terminal.app (and there's alwarys esc-b esc-f I know, but when you alt-tab between osx apps to your terminal, sometimes muscle memory sets in)

But some other sequences just can't be done in terminal.app, while they could be useful. Ex: alt delete is esc-d, option-delete is ctrl-k, alt-backspace is ctrl-w, option-backspace is ctrl-u : then bash works just like the OSX default shortcuts

Another one : want to move between tabs? I have been using applescripts in CM (mapped to Ctrl-number, my caps key is the ctrl key) :

tell front window of application "Terminal" to set selected tab to tab 1

To me CM is the best thing since sliced bread.


The only thing that stops me from using regular terminal is that I couldn't figure out how to make it automatically copy-on-select. Is this possible, or do you just use command-c?


It already works, automatically. It just uses a separate pasteboard than the native OSX one. Try selecting in Terminal.app, and then middle-clicking.

If you want it in the OSX pasteboard, you need to use cmd-c.


It may seem like a small detail but for me it has to be the Cmd+1, Cmd+2, and so on to switch tabs as in Chrome - I'd like this keybinding to become standardized across tabbed apps. It seems like such a little little little detail but I really really really think it's super intuitive.

I've never understood the able of screen, yet I've seen its benefits championed over and over, could somebody please God for once enlighten me. Thx!


I have come to love this keybinding as well and try to fit in most applications. I can mentally map 1-9 to different spaces/needs and use them like that.


I'm pretty thrilled with the feedback on the request for a Visor-like feature (eg, quake terminal). If they get that implemented I'll certainly switch from Terminal.app.


Looks good. I really have some problems with Apple's Terminal - using the arrow keys often leads to a corrupted display. For instance, run curl on a long URL, hit up to edit the command and run it again - I end up with the output of the previous command in front of my cursor, or the line floating out in space - it's hard to describe, but something is wrong. Coming from Linux, it's hard to accept that there's only one terminal and it isn't any good! I think I'll use this one all the time now.


Try using TERM=dtterm.


I decided to try this a few weeks ago and have kept using it since then. I'm not really using any fancy features beyond the cmd+click to open URLs, but it is fast and generally works better than Terminal.app. If all you are looking for is an iTerm that is faster and bugfixed, this is exactly that (and more).

edit: Oh, and I should say that I can't recall it crashing even once in this period, and I started out using my own build from git head. So I'd say it at least feels very stable.


Awesome. I use iTerm instead of Terminal primarily for its "Send Input to All Tabs" feature, and it's nice to see the project continue with these performance improvements.


That's a dangerous habit.. even if how you use it is not particularly dangerous. :-)


FYI, iTerm2 is still in alpha. From the site:

"BUT iTerm2 IS IN ALPHA! The stability of iTerm2 varies from release to release. Major features that are planned for the first full release haven't been implemented yet, and until that day it will not receive Beta status. That said, many (hundreds to thousands) of people use iTerm2 every day. While some versions are more stable than others, there have been several trouble-free versions released. It's at least worth a try!"


They're being cautious I guess. I've been using it for a few months now, with test-releases, having it open 24/7, always with a lot of tabs, and it's pretty stable (maybe 3 or 4 crashes). There's regular updates, and new features. Great job they're doing!


thats my primary term for a year now, and it didn't have a single problem. I mostly work in remote shells, Snow Leo.


On the off chance someone clicks the More button and reads this, how do you actually do mouseless selection and copy and pasting? The closest I got was the Cmd+F search feature but it doesn't support regex so I can't exactly search for something like "/opt/local.*$" to select an entire path produced by pwd, for instance.


Regex support is coming. For now, mouseless copy-paste is done with cmd-f to find, then tab or shift-tab to expand the selection.


I love being able rename tabs, I just wish that they would unify the move the cursor keys with the standard OS X keys.

ie: beginning of line -> command + left arrow.

I realize that people are probably used to it, but personally I like minimizing the difference between any context switches I have to make.

Maybe there is an option somewhere I can't yet find.


You should use ctrl-a instead. Then you don't need to take your hands away fr the main part of the keyboard


Also, C-A, C-E, C-K, C-F, C-B, C-P, C-N, C-Y and a few other readline keybindings work in all standard Cocoa text controls.


Yes, this is wonderful. Recently, I've been using emacs as my primary editor and because of muscle memory accidentally used the movement commands in, e.g. composing a new email in Gmail. It worked! C-a (beginning of line), C-e (end of line), C-n (down a line), C-p (up a line) in particular are especially useful. I just used C-p and C-n in composing this comment.

C-k / C-y is weird in Gmail, though. Anyone know why? Try replying to an email, C-k'ing a line, going to the top, and C-y. I can't make heads or tails of the gibberish that ensues!


Movements, like you describe, are left up to the application you're interacting with. This is not a job for a terminal!

The terminal just needs to communicate the keys pressed.


on iterm the command + left shortcut switches tabs

fn + left/right acts as home/end


I've been using this for a little while now. If you've checked the "Prompt for test-release updates" box in the advanced settings preferences you'll get to enjoy split panes. Press command-shift-d to open a new horizontal pane. It's really convenient and very well done.


Question about ITerm : Is there a way to name tabs with just keyboard shortcuts? I find it really helpful to name my tabs when I'm working concurrently on multiple projects but the need to move my cursor is frustrating.


  command i
  type new name
  hit return
  command w
thats the old version, not sure about this new version


Ah, thanks a lot!


The "downloads" page states that the uploaded date for the only file available is January 2009...? Am I missing something here? As good as it may be, I'm not sure I want to waste time using an 2-year old Alpha version.


The date is actually January 09, 2011 rather than January, 2009. It's not very clear, but if you click through it shows the full date.


Ooops, thanks for the clarification. I should have been a little more curious. Looks good so far. I like the shortcuts to bookmarked items. And the different color setups for the bookmarked items.


I always ran into problems when doing full screen applications like aptitude (over ssh) and vim in iTerm1, so I had to switch back to Terminal.app - I hope it is fixed now, and I'll give it a try..


I just tested it out, and it much MUCH more easily fixes the problem that Terminal has with having the escape sequences be correctly mapped to the right action.

example: ^+left-arrow is easy to configure correctly!


I want a terminal that is consistent on all machines.


So do I; I only use Xterm (Ubuntu/Linux, Mac, & Windows).


I didn't know anything about this project but as a long-time iTerm user, I'm in!


I really, really wish something even remotely similar to terminator (http://www.tenshu.net/terminator/) existed on OS X. Yet another reason I find Linux a much more productive dev platform..


Using Macports, you can install it.

port info terminator terminator @0.95, Revision 1 (sysutils)

Description: terminator lets you open multiple terminal emulators in a single window. Homepage: http://www.tenshu.net/terminator/

Library Dependencies: python26, vte, hicolor-icon-theme Platforms: darwin License: GPL-2 Maintainers: ryandesign@macports.org, openmaintainer@macports.org


I don't understand. Doesn't iTerm2 do exactly this?

What would I get by using Terminator that I wouldn't get by using iTerm2? One of the first things I did just now after installing it was create a window that looks almost exactly like the one in the Terminator example screen. Except I use 3 shells rather than 4. A full height shell on the left and 2 half height shells on the right.


You're absolutely right. When I first looked at iTerm2 a few years ago, I could swear this wasn't supported to the extent it is today (horizontal and vertical splits). Apologies for the misleading comment.


From the terminator homepage, it sounds like it is possible to get it running on OS X:

Mac OS X

To install Terminator on Mac OS X you will need to be using the Fink project, and have it configured to allow unstable software. With those requirements satisfied, in a terminal run:

fink install terminator


YES, Terminator was the best of the best. I'm not sure how i get by now..


splitting the window into multiple terminals makes me happy. this is the same functionality I love in Terminator under Linux.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: