Questions tagged [iterm2]

iTerm2 is an open source Terminal replacement for OS X

Filter by
Sorted by
Tagged with
5 votes
2 answers
4k views

Can I have the terminal prompt at the vertical middle of a window?

I just realized that I hunch over a lot when using the terminal since the prompt is always at the bottom of the terminal window, which is vertically maximized. I would like the prompt to be at the ...
edmz's user avatar
  • 183
1 vote
1 answer
1k views

Everytime I open iTerm my .zshrc file gets a new vscode Path line

# iTerm # CMD + D to split screen (left right) # CMD + D + Shift to split screen (up down) # Add Visual Studio Code (code) export PATH="$PATH:/Applications/Visual Studio Code.app/Contents/...
Leon Gaban's user avatar
  • 2,585
6 votes
1 answer
3k views

Changing the font size of Tab information in Iterm

I use a High Resolution external monitor at work and increase the font size in my terminal for better visibility. But the text on the tab bar is stuck at the default size. Changing the font size does ...
Sinstein's user avatar
  • 387
0 votes
1 answer
450 views

Ctrl+b appearing as '^B' at command line

I noticed this behavior in tmux, but it also happens when I have no session attached. Instead of entering as the command key binding Ctrl+b, ^B is printed to the command line. I don't have a .tmux....
Jeff Groh's user avatar
3 votes
1 answer
894 views

Make cmd-click on a file name in iTerm add that filename to the command

By default, iTerm lets you cmd-click filenames and urls to open them with the system's default app. I want to be able to change that so it adds the filename to the command I'm currently typing. This ...
NoamNelke's user avatar
  • 201
1 vote
0 answers
509 views

Set window title in iTerm with zsh

I am using iTerm2 in my mac with zsh. I have set DISABLE_AUTO_TITLE="true" within .zshrc. Now I can use title to set window and tab titles. But it the title which appears in the title has the running ...
SouvikMaji's user avatar
1 vote
0 answers
142 views

Please make my terminal behave like a word processor because I'm old and jaded

How do I make the terminal input behave like a multi-line word processor that lets me select text, delete some text (no hex codes), move around, then only really send it over the wire when I press ...
Petrus Theron's user avatar
20 votes
5 answers
16k 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
6 votes
2 answers
4k views

Why does iTerm paste when I left click in the terminal

Every so often I come back to a iTerm2 (v3.1.6) terminal window and for whatever reason when I left click anywhere in the window it will paste whatever is on my clipboard. This has happened many times ...
RyanS's user avatar
  • 151
0 votes
1 answer
55 views

How can I change the page depth when using screen on iterm2 to connect to a router?

Let's say I'm connecting to a router with 'screen' through a terminal (iterm2) and I want to view a log or a configuration. It will only display 1 page at a time and I have to press Enter or Space to ...
screampuff's user avatar
7 votes
1 answer
817 views

Can I display whitespace characters in iTerm2

In most text editors I can display whitespace characters, e.g. tabs as arrows ⟶ , spaces as middle dots · Is it possible to do this in iTerm2?
supermitch's user avatar
0 votes
1 answer
4k views

How to update Mac iTerm2 terminal prompt

I am using Mac 10.13.2 High Sierra. I made the following .bash_profile file to see the file path along with the prompt and if it has any Git repository it shows the Git status as well. All is working ...
masiboo's user avatar
  • 229
1 vote
0 answers
151 views

iterm itermplot tmux scroll makes plots disappear

I have a tmux session in my iTerm2 window with a single pane. When I plot something using ipython (with itermplot) it appears as expected. As soon as I switch to scrolling mode ( [ ), the plot ...
Milla Well's user avatar
1 vote
1 answer
793 views

integrate tmux tabs with vim tabs

I'm trying to simplify the way that I navigate between tabs in my terminal. Using ssh <workstation> -t 'tmux -CC attach', I can get iTerm to display tmux tabs as native macOS tabs (and therefore ...
Dan's user avatar
  • 1,088
1 vote
1 answer
199 views

Make alt/option key work as in all other applications

I'm using the alt/option key quite extensively, e.g. square brackets, curly brackets, jumping left/right etc. The only way I've found to set alt/option to behave as it should (as in all other ...
Fellow Stranger's user avatar
1 vote
1 answer
2k views

iTerm2 outputs random characters when the remote tmux exits abnormally

I use tmux on my remote terminal. I found that when the remote terminal was disconnected abnormally (e.g., I just closed my laptop without exiting remote terminal normally), my terminal on iTerm will ...
oujiafan's user avatar
0 votes
1 answer
978 views

iTerm2 shares the same instance across all macOS workspaces

Suddenly after a computer restart, my iTerm behaves differently, as the same iTerm2 instance is shard across all macOS workspaces. If I open a new tab or open a new windows of iTerm2, these will ...
Marius's user avatar
  • 1
1 vote
0 answers
208 views

git show on double click of commit hash in iTerm2

I am using iTerm2 with oh-my-zsh. git log --oneline shows me the git tree: 0b99548e commit A eb980d4c commit B e7e5e043 commit C In order to view a commit, I need to do the following steps: double ...
Alexander Popov's user avatar
2 votes
1 answer
225 views

Unable to start Firefox on CentOS 6 from iterm2 on Mac

I have installed Firefox and xauth on the CentOS 6.6 server as follows: sudo yum install firefox sudo yum install xauth On my Mac, I am using iTerm2.  On my iTerm2 session, I also exported my ...
c g's user avatar
  • 21
1 vote
0 answers
1k views

Inverse bolded % at zsh prompt

This is minor but it's driving me crazy. My prompt is followed by an inverse bolded % like so: I want it to go away. I am using: zsh with oh-my-zsh on iterm2 What I have tried: I found this and ...
Diego's user avatar
  • 11
3 votes
2 answers
2k views

How to remove username segment from powerline

I'd like to show only the dir name. Right now it's like this: I'm using macOS + bash + iTerm. I've tried: editing the ~/.config/powerline/config.json changing the $PS env (which works without ...
Rad'Val's user avatar
  • 165
0 votes
1 answer
1k views

iTerm2 doesn't recognize Ctrl-Left and Ctrl-Right

TLDR; I couldn't get the Micro editor to recognize Ctrl-Left and Ctrl-Right key combinations. I thought I maybe have to add escape sequences to iTerm2 (screenshot). The Keyboard Shortcut input field (...
Linus's user avatar
  • 131
4 votes
1 answer
7k views

How to completely disable iTerm2 pop up messages

I'm using iTerm2 on my Mac, build 3.1.3, and I am working with two tabs. One tab has my Python code in vim. The other one is where I actually run it with python code_here.py. However, each time I ...
ComputerScientist's user avatar
1 vote
0 answers
399 views

syntax highlighting breaks off on vim as you page up/down (on OSX terminal and iterm2)

This is a weird bug the problem is the syntax highlighting (say zenburn) on vim randomly appears and disappears as I page up and down (using ctrlu and ctrld).. for example compare these two renders ...
abbood's user avatar
  • 1,274
0 votes
1 answer
454 views

how do I paste an icon to the terminal

I'm using iterm2 on mac. I'm using the oh-my-zsh and want to add my custom icons like these I wondering if there is a list of all available icons and if mine is not there, how do I add it. I want to ...
WebQube's user avatar
  • 161
81 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,828
0 votes
1 answer
618 views

How to set a background color for the 'tab' character

I want to apply a background color to tabs in iTerm 2. I tried using this: echo -e "\033[42mas\tdf" The above shows "as df" in Mac Terminal with the entire text colored with green background, but ...
adams's user avatar
  • 101
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
9 votes
3 answers
12k views

Custom iTerm appearance doesn't save after quitting iTerm

I'm new to Mac. Recently, I just installed iTerm2 and I also changed some of its fonts and theme (Oh My Zsh). All the changes worked perfectly but when I close iTerm everything reset to its default ...
Huy Le's user avatar
  • 321
8 votes
1 answer
1k views

Moving mouse in iTerm causes characters to be to printed to prompt

I am having an issue with iTerm that happens to me intermittently. When I am using iTerm and I move the mouse up and down, or click a bunch of random characters are printed to the prompt: I am in a ...
Jack Gore's user avatar
  • 181
0 votes
1 answer
214 views

Can not bind Ctrl-o in Bash inside iTerm2 on macOS Sierra

I am not able for the life of me to rebind Ctrl-o on iTerm2/Bash. Here is my stty -a flags for cchars: cchars: discard = ^O; dsusp = ^Y; eof = ^D; eol = <undef>; eol2 = <undef>; erase = ^...
Thanh DK's user avatar
  • 179
1 vote
1 answer
279 views

Error on iTerm2 fish shell load: `function: Illegal function name '-v'`

On iTerm2 load: Last login: ... on ... function: Illegal function name '-v' ~/.iterm2_shell_integration.fish (line 86): function -v _ underscore_change if [ x$_ = xfish ] ...
Pysis's user avatar
  • 1,090
0 votes
1 answer
153 views

Nano opens extremely slow on mac while using ZSH?

Whenever I type try to open a file using nano on my mac while in ZSH, it takes about 4 seconds before nano actually opens and I'm unsure why. Does anyone have suggestions to debug this issue and ...
Nathan F.'s user avatar
  • 115
2 votes
0 answers
654 views

How do I use tmux 2.4's double/triple click to select text with bash/iTerm2?

Following on this question from 2013 and this question from 2015, has anyone identified how to use tmux 2.4's new Support for mouse double and triple clicks to select text without modifier keys? I'm ...
Joel Kulesza's user avatar
1 vote
1 answer
2k views

How Can I Perform ALT + > in Iterm2

In a standard bash shell one can go backwards through the history by hitting the UP key, and forwards by hitting the DOWN key. If you've hit up a bunch and want to get back to the start you can hit ...
machineghost's user avatar
  • 1,102
1 vote
0 answers
253 views

Why does fish shell create a hidden process in iTerm2

I've moved from bash to fish shell in iTerm2. However, whenever I start iTerm2, I receive the following error message: A session ended very soon after starting. Check that the command in profile ...
Long Thai's user avatar
  • 121
5 votes
1 answer
2k views

zsh in iTerm2 showing spaces in place of newlines

I've been using iTerm 2 on a new MacBook for a couple of days with ZSH. When I run a command which produces several lines of output, the second line appears to start after the end of the first. For ...
Matthew Higgins's user avatar
1 vote
0 answers
213 views

Why is a (working) iTerm2 not staying in the Mac taskbar?

I have iTerm2 installed in /Applications on my MacBook Pro (running OSX Sierra), but if I right-click and select the option to pin it to the taskbar and log out and in again, there's some form of the ...
Christos Hayward's user avatar
1 vote
1 answer
577 views

iterm2's drop-down auto command complete doesn't work on remote sessions

On remote hosts via ssh the cmd + ; command works in displaying part of the suggested command but the "Auto Command Completion" feature doesn't. How can I make the shown feature here work on remote ...
Vladimir's user avatar
  • 285
4 votes
1 answer
14k views

What does "Login shell" do?

Recently I experience slow terminal launch time, so I looked into it and found an interesting thing. I am using iTerm on MacBook. There is an option choosing the default behavior: If I chose "Login ...
xhg's user avatar
  • 143
11 votes
3 answers
3k views

Command-L "Clear to the previous mark" equivalent in iTerm2

In Mac OSX there is the command-L command to "clear to the previous mark" I was curious if there is a command equivalent to this in the iTerm2 terminal because I would like to switch over, but I use ...
Avir94's user avatar
  • 111
23 votes
4 answers
15k 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,222
2 votes
1 answer
4k views

Rails "Cannot read termcap database;"

Whenever I start my rails console I'm running into two problems: I'm getting these cryptic errors messages. My control-L isn't working (it's intended use it to clear the screen) Console output: $ ...
mbigras's user avatar
  • 577
2 votes
1 answer
1k views

iTerm Color Scheme | Profile Command

I'm using prezto with iTerm and in my .zshrc, I have the following line that changes the color scheme: sh ~/.vim/plugins/gruvbox/gruvbox_256palette_osx.sh However, sometimes when I click ⌘ + R, I ...
Chin Leung's user avatar
1 vote
1 answer
575 views

The arrow keys, even when disabled in vimrc, type ABCD then go into insert mode. Why?

When I hit the arrow keys in vim I get the behavior illustrated in this illustrated Gif. I would like to only use hjkl to navigate. Any time I hit the arrow keys (up, down, left or right) I want it ...
Nicholas Adamou's user avatar
4 votes
2 answers
869 views

iTerm2: Get the tab number from bash shell

For the day to day work, I login to a remote machine from my Mac through VNC. The font rendering in VNC viewer, and the resolution etc are horrible when seen on the retina display. So I use iTerm2 + ...
subin's user avatar
  • 651
1 vote
1 answer
1k views

AppleScript for iTerm2 to activate or create session

I'm trying to write an AppleScript for iTerm2 that for a fixed profile ("session"?) name, let's say "Dev Server", checks whether there is a tab with that profile in any window (or just the current ...
Michael Goerz's user avatar
0 votes
1 answer
29 views

python 3.5 console not able to type the 'c' key

I have a very strange problem when using the python3 console. Whenever I type c (the actual c character) what gets written is the <tab> character. So in essence I can't type anything that ...
ludic's user avatar
  • 101
1 vote
0 answers
175 views

In iTerm2, can you set multiple working directories in tabs for a Profile on startup?

I'm doing a lot of work with Roots, a dev-friendly WordPress setup. I'd like to open up multiple tabs in iTerm2 (vagrant box, WP app directory, theme directory etc) but I can only find how to set one ...
Jake Rayson's user avatar
2 votes
1 answer
1k views

iterm2 triggers copy/paste, import/export

On the Mac's iTerm2 terminal, I have set a bunch of highlight text options in Preferences->Profiles->(select a profile)->Advanced (tab)->Triggers->Edit. Mine is specifically to highlight the text [...
sathishvj's user avatar
  • 437

1 2
3
4 5
8