Skip to main content

Questions tagged [iterm2]

iTerm2 is an open source Terminal replacement for OS X

Filter by
Sorted by
Tagged with
217 votes
17 answers
139k views

With Bash + iTerm2, how to name tabs?

In iTerm2 (Build 1.0.0.20120203), I typically open several tabs, each of which has split panes , and is about one particular theme of work, for example revision control, coding, managing files, mysql ...
qazwsx's user avatar
  • 9,039
166 votes
5 answers
1.2m views

Where is the .zshrc file on Mac?

I’m using iTerm and wanted to customize the look of my terminal window using Oh My ZSH!. And according to the documentation I need to change the ~/.zshrc file and add a ZSH_THEME value: Once you ...
Leon Gaban's user avatar
  • 2,615
157 votes
8 answers
78k views

How can I get control+left arrow to go back one word in iTerm2?

I was reading up in the Linux manual and I noticed that it said I could use control+left and control+right to move forward and back words in the terminal while editing. "Pressing Ctrl plus the Left ...
cwd's user avatar
  • 18.2k
83 votes
4 answers
25k views

iTerm2 (version 3): Individual history per tab?

I’m using iTerm2 (version 3) and like it. But something that it has been doing for a while that's really annoying is that the command history is shared between tabs. E.g., in your first tab, run ...
Alan H.'s user avatar
  • 2,848
81 votes
9 answers
173k views

Setting iTerm2 as the default terminal (OSX Lion)

I would like to set iTerm2 instead of terminal.app as my default terminal. Go2Shell for example let you open a terminal to the current directory in Finder. I want to ba able to use iterm2 instad of ...
politicus's user avatar
  • 1,007
62 votes
8 answers
109k views

Color scheme not applied in iTerm2

I haven't been able to apply any color scheme to iTerm2. It looks like that the Basic Colors are applied, but the ANSI Colors are not (as shown in Preferences>Profiles>Colors). Using Mac OSX 10.7....
Panagiotis Panagi's user avatar
60 votes
5 answers
45k views

How can I partially clear my terminal scrollback?

I want to partially clear my terminal scrollback history, but only from where I have selected with my mouse in the scrollback and up. Is this possible? I'm on a Mac, and I use iTerm2 and Terminal.
Javid Jamae's user avatar
57 votes
8 answers
17k views

Is there a keyboard shortcut to alternate between color schemes in iTerm2

I am using the Solarized color scheme in iTerm2 and it comes with two themes: one with a light background for daytime hours and one with a dark background for nighttime hours. I am currently ...
Richard Jones's user avatar
57 votes
4 answers
57k views

Increase/Decrease Font Size in iTerm2

Issue: I use laptop on the go, and connect to external monitor when in the office. Given that the external monitor is very large, I need to increase fonts in the existing iTerm2 window (usually one) ...
van's user avatar
  • 673
54 votes
2 answers
7k views

Disable Cmd+Enter on iTerm 2

I'm using iTerm 2 on Mac, and whenever I press Command + Return the thing goes full screen. My big fat fingers can't help it, so I really need to turn it off. Any suggestions? Thanks in advance
Mark Stewart's user avatar
52 votes
4 answers
14k views

How do I get the numpad to work in vim using iterm2 on osx with term=xterm?

My numpad works in iterm2 (bash), but it inserts characters instead of numbers in insert mode for vim. How can I get vim to recognise the correct escape codes. I have tried editing the escape codes ...
J0hnG4lt's user avatar
  • 1,591
48 votes
5 answers
31k views

Pasting 'required text' into terminal emulator results in '^[[200~required text~'

I have noticed that when pasting into a terminal emulator, both on macOS (using Terminal.app or iTerm2.app) or in Linux (using urxvt) sometimes I get extra characters. The characters are always the ...
lx07's user avatar
  • 2,978
45 votes
6 answers
33k views

iTerm 2 window resizing

My iTerm 2 window is up against the menubar at the top of the screen. When I resize the window vertically from the top to the bottom, a small gap is always left. It never resizes down fully to the ...
jordelver's user avatar
  • 2,321
43 votes
3 answers
18k views

Mac OS X: Command-Tab doesn't switch back to fullscreen app

Using the Spaces style fullscreen mode in OS X, I can easily Command-Tab out of a fullscreen app, but trying to Command-Tab back in doesn't take me back to that space, only switches the Menu Bar to ...
mrmagooey's user avatar
  • 531
43 votes
2 answers
23k views

iTerm command click to open with Atom

I am trying to figure out how to change iTerm function when CMD+Clicking on a file in an iTerm window to have it open in my default editor, Atom. Currently, the CMD+click function in iTerm opens ...
rylectro's user avatar
  • 533
42 votes
6 answers
29k views

ALT+arrow moving between words in zsh and iTerm2

I logged in on one of hosting provider servers and noticed ALT + left and ALT + right moved between words in a shell prompt in GNU Screen. What kind of key bindings I need to configure and where to ...
Mikko Ohtamaa's user avatar
42 votes
6 answers
10k views

“^[[O” and “^[[I” appearing on iTerm2 when focus lost

I’m using iTerm2 2.1.1 on Yosemite. No tmux. When iTerm loses focus (when switched to another application by Cmd-Tab or clicking another window), a ^[[I and ^[[O seems to be sent to the terminal. ...
osyoyu's user avatar
  • 529
41 votes
3 answers
27k views

How to automatically restore window arrangement from last time in iTerm?

I have two old Macs, both have iTerm2 installed and could automatically restore window arrangement (tabs with different directories and colors) from last time after launch. I forget what ...
Jing Li's user avatar
  • 513
39 votes
3 answers
26k views

Remote server, iTerm2, and tmux integration

I want to be able to start a tmux session on a remote server, and then use iTerm2's native windows and split screens on my local machine. For example, let's say my remote server has a tmux session ...
Nick's user avatar
  • 577
37 votes
1 answer
9k views

Disable autocomplete hints on iTerm2

I would like to disable the autocomplete history things that come up on the iTerm, as shown in the picture below: I would like to get rid of the blue hint that comes up when I start typing a command ...
Konrad's user avatar
  • 767
36 votes
4 answers
93k views

Zsh prompt with current working directory

In bash I have my PROMPT set like so PS1="$(scutil --get ComputerName) \W\\$ " Where I only see the computer name and only the name of the current directory that I am in, not the full path and a $ ...
Anton Kastritskiy's user avatar
32 votes
2 answers
24k views

How do I disable the beep/bell sound in iTerm2 in macbook?

The shell in macbook makes annoying beep/bell/boop sounds. For the OEM terminal, this answer works on disabling this annoying sounds: https://stackoverflow.com/questions/19166539/i-want-to-disable-...
rrlamichhane's user avatar
30 votes
8 answers
25k views

iterm2 - open new tab with same profile

I'm switching from Terminal.app Pretty straightforward, but I can't find it in the settings: I'd like that when I open a new tab (with cmd-t (or btw also with oh-my-zsh's osx plugin's tab command)), ...
lajarre's user avatar
  • 544
30 votes
2 answers
19k views

How to make command+arrow go to begining and end of line in iterm2?

With the default settings, command + arrow_left switches to the tab on the left. How to change it so that it puts the cursor at the beginning of the line instead ?
Benjamin Crouzier's user avatar
29 votes
3 answers
19k views

How can I prevent the iTerm2 hotkey window from losing focus?

Is there a way to prevent the iTerm2 hotkey window from losing focus when another window is clicked? I'm aware of this question already, but the answer does not work for me. Unchecking "Hotkey window ...
alexwforsythe's user avatar
29 votes
2 answers
11k views

Copy the output of the last command in iTerm2

With the default Terminal.app, one can select the previous command output with Cmd + Shift + A and then copy it with Cmd + C (source). Is there a similar shortcut for iTerm2?
Juuso Ohtonen's user avatar
28 votes
6 answers
54k views

More crisp font for iTerm on OSX

On iTerm on OSX Mountain Lion the default Monaco font is not very good for white on black text Aliased text is ugly Anti-aliased text is too bold I would prefer more crisp anti-aliased font. So... ...
Mikko Ohtamaa's user avatar
26 votes
4 answers
30k views

Can I use the `<cmd>` key in terminal Vim at all?

Following on from my other recent question: How do I map <cmd>-<shift>-f to run Ack plugin in Vim? Is is possible to use the <cmd> key in Vim at all? If Vim doesn't recognise the ...
jordelver's user avatar
  • 2,321
25 votes
3 answers
6k views

iTerm2: Alt-Dot functionality with Cmd-Dot

Is there any known way to achieve the "insert last command argument"-functionality that is usually available in Bash by typing Alt-. (Alt and period) on OSX using iTerm2? The ways I know this should ...
krystah's user avatar
  • 1,657
24 votes
7 answers
15k views

Programmatically set the color of a tab in iTerm2?

My daily workflow includes me Launching iTerm2 Creating 3 tabs Setting one tab each to red, orange and yellow Changing to a specific path in each tab I would like to script this process; shell, ...
John Kramlich's user avatar
24 votes
2 answers
13k views

Enter key prints ^M in certain situations in iTerm

I am using iTerm2 on a Macbook Pro running MacOS Mojave. In certain situations, such as when doing a git add -p, pressing return ends up printing ^M instead of performing the action. Stage this hunk ...
Sinstein's user avatar
  • 397
24 votes
4 answers
16k views

iterm2: Ctrl-C doesn't work sometimes

I'm using iTerm2 on Mac OSX (10.10.5). Recently I encounter something very strange: after using iTerm2 for a while, Ctrl-C would stop working. Initially it was fine. Only after a certain period of ...
lang2's user avatar
  • 2,282
22 votes
6 answers
26k views

Is there any way to set the default font to 16pts in iTerm2?

I am going through several fonts such as “Consolas” and “Source Code Pro” and noticed in iTerm2 there is no way to set default size to 16pts. Only 9pt, 10pt, 11pt, 12pt, 13pt, 14pt, 18pt, 24pt,... are ...
CodeCrack's user avatar
  • 273
22 votes
1 answer
2k views

Mouse click only works once with iterm2/tmux/mosh

I'm trying to set up iTerm2 + mosh + tmux to do my remote work. I can get everything to connect up, but for some reason, the mouse response is funky. If I split my tmux window so I have two panes and ...
Wesley Bland's user avatar
21 votes
5 answers
17k views

Is it possible to use vim key bindings in iterm2?

I want to use w for next word and b for previous word. If I could do more than that I would be even happier. I use bash if that matters.
user1283776's user avatar
  • 1,021
20 votes
3 answers
8k views

Rename Iterm2 tab from within tmux

I can use the following function to rename a iterm2 tab and that works great. function rename_tab { echo -ne "\033]0;"$@"\007" } However, if I run this function while in a tmux session, then ...
chevett's user avatar
  • 338
20 votes
2 answers
23k views

Powerline Patched Fonts on OSX 10.9.3 - iTerm2 & Chrome

I'm looking for a working solution for rendering powerline characters on OSX in iTerm2 and Chrome. There's a lot of documentation around I've attempted to use several methods, none seem to work ...
nfarrar's user avatar
  • 351
19 votes
5 answers
11k views

iTerm2 shows up on every Space. How to keep it from doing so?

For some reason, iTerm2 windows show up on every one of my "Spaces" (aka Desktops). Right clicking on its icon in the Dock and looking at "Options" reveals "Assign To: None", just like every other ...
duckworthd's user avatar
18 votes
2 answers
17k views

Open multiple tabs in iTerm2 with a specific directories

I would like to know if this is possible. I want to set up some script or command that will open 5 tabs and each tab that will open will have their own directory specified All in the same window ...
Ali's user avatar
  • 1,351
17 votes
5 answers
13k views

iTerm2 Vim alt+right/left arrow

As a Linux user, I am very used to jump from word to word in vim/nano using ALT+left or right. This doesn't seem to work properly using iTerm, I am using zsh, I tried adding; bindkey -e bindkey '^[[...
seds's user avatar
  • 271
16 votes
2 answers
13k views

How to open Go2Shell preferences in Mac OSX?

I'm trying to change my default Go2Shell terminal to iTerm2. I've read that Go2Shell preferences are only accessible from the command line, but I'm struggling to find what command actually needs to ...
user72923's user avatar
  • 897
15 votes
2 answers
5k views

Delete iTerm saved window arrangement

I have saved a window arrangement in iTerm2 that I want to remove. I found this file: ~/Library/Preferences/com.googlecode.iterm2.plist but it isn't really editable. How can I delete a window ...
sathishvj's user avatar
  • 457
15 votes
1 answer
8k views

Select full word in iTerm2 using alt + shift + arrow

Following this advice, I've configured Iterm2 to delete the word when Alt + Backspace. I would like to build a similar functionality for combinations of Alt + Shift + ← | →. With respect to those ...
Konrad's user avatar
  • 767
15 votes
4 answers
8k views

mac os x byobu vertical split using iTerm, tmux, zsh

How to get vertical split on Mac OS X in byobu? Ctrl + F2 is not working. It open new window instead of spliting the current. In oposite spliting horizontaly with shift + F2 works ok.
andilabs's user avatar
  • 571
13 votes
3 answers
19k views

iTerm2 Background image and split panes

Is it possible to have a background image for the whole window and not every split pane itself? I can't find how to do it anywhere.
Gricha's user avatar
  • 243
13 votes
1 answer
15k views

How to restore my iterm2/zsh session after restart?

I use oh-my-zsh with iTerm2 on osx and I'd like them to retain the same tabs with the same directories and hopefully the same textual history after a restart. Currently after a restart iTerm reopens ...
Ittai's user avatar
  • 247
12 votes
6 answers
11k views

Vim configuration slow in Terminal & iTerm2 but not in MacVim

Ideally, I want to use Vim from Terminal or iTerm2. However, it becomes unbearably slow so I had to resort to using MacVim. There is nothing wrong with MacVim, however my workflow would be much ...
Jey Balachandran's user avatar
12 votes
1 answer
11k views

Iterm2 : how to display status bar

In the Iterm2 online docs: Go to Preferences > Profiles > Session. Turn on Status bar enabled. but I don't find this setting in the preference pane: Preferences screenshot Obviously the version ...
Brice's user avatar
  • 223
11 votes
1 answer
4k views

Disable mouse reporting in a terminal session after tmux exits unexpectedly

I currently use iTerm2 and frequently SSH into remote servers and start a tmux session. On all of those servers, when SSH'ing into them, I automatically create a tmux config that enables mouse ...
Matthew O'Riordan's user avatar
11 votes
2 answers
11k views

iTerm2 vim cannot map alt key

I'm having trouble trying to map the alt-key bindings on vim in iTerm2. I want to map shortcuts for switching between buffers like this: map <A-Right> <C-w>l map <A-Left> <C-w>...
Eddy's user avatar
  • 3,397

1
2 3 4 5
8