Currently, I use iTerm on OS X. My terminal looks something along these lines:

My terminal

I came across this picture of a terminal setup on GitHub, and I wanted to imitate it:

Target terminal

Specifically, I wanted to change the padding/margin along the left side/bottom side of the window. While the picture in question appears to utilize OSX's default Terminal, I'm hoping it can be done in iTerm as well, although an OSX Terminal-specific solution would work too.

I've tried looking through iTerm and OSX Terminal's preferences (especially under the "Window" section on iTerm, but I have looked elsewhere), and I have yet to find an option for adjusting where the characters start along the left side.

I've also tried to implement this programmatically in Bash:

bash -l | sed 's/^/ /'

This seems to work fairly well, although it only indents program output, not my prompt line (and I'm having trouble setting such a piped command as my login shell).

Also, it only adjusts stdout, not stderr and piping it with bash -l 2>&1 simply hides all of Bash's output altogether.

Have I just overlooked some setting in iTerm/OSX Terminal? Is there any other way to set an "inner text area" within the Terminal window (i.e. set padding along the sides)?

  • Well, for your prompt you could always try adding export PS1=" $PS1" (give or take a space) to ~/.profile
    – lzam
    Commented Sep 11, 2014 at 23:33
  • Yes, I figured that would work out pretty easily, but there's no good way to indent the rest of the output, unfortunately.
    – Caleb Xu
    Commented Sep 11, 2014 at 23:51

3 Answers 3


If anyone comes up at this question, this functionality is available via this plugin for iTerm2:


And from iTerm 3.1 on (currently in alpha), you can have it as an advanced option in height of top and bottom margins and width of left and right margins.

  • This answer would be improved by describing the location of these preferences.
    – Chris Page
    Commented Jun 29, 2018 at 4:08

Seems like an option, although involves some compile& build hassle http://hackr.it/articles/prettier-gutter-in-iterm-2/

i.e., you have to clone https://github.com/gnachman/iTerm2.git and then patch sources/PTYTextView.h

< #define MARGIN  5
> #define MARGIN  15
< #define VMARGIN 2
> #define VMARGIN 12

and then make it.

  • Still easier changing two variables than meddling around with a bunch of messy pile of shell script. Thanks!
    – Caleb Xu
    Commented Feb 1, 2015 at 22:10
  • Still works for me. Only caveat is that in the current beta builds, the "cursor guide" (persistent line highlight) doesn't go full-bleed. cloudup.com/cD9Leds1Wof Commented Dec 26, 2015 at 3:26
  • Those defines now reside in iTermTextDrawingHelper.h Commented Aug 24, 2016 at 4:17
  • Just to provide an update, these defines no longer work. You can find margin settings in the Advanced section of the preferences.
    – Caleb Xu
    Commented Jan 28, 2017 at 23:37

For anyone still with this issue like I was. On iterm:

  • Go to settings.
  • Click on Appearance tab

Play around with Side Margings and Top & Bottom Margins


  • Works well to remove the left margin but the one on the right of my window is still there. Any idea how to remove it?
    – lajarre
    Commented May 8 at 12:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .