Hot answers tagged


Killing a fly with a cannon: Go to Preferences... > Profiles > Keys (not Preferences... > Keys) Press Presets... Select Natural Text Editing Then, you can move a word backwards using Option ⌥ + ← and a word forwards using Option ⌥ + →, move to the start of the line using fn + ← and to the end of the line with fn + →. Also you can delete a word backwards ...


Go to iTerm Preferences → Profiles, select your profile, then the Keys tab. Click Load Preset... and choose Natural Text Editing.


You can use iTerm2's system-wide hotkey with the Hotkey Window profile to do this. In iTerm2 preferences, click on the "Keys" tab. In the bottom left, under "Hotkey", check "Show/hide iTerm2 with a system-wide hotkey" and assign the hotkey you'd like to use. Check the "Hotkey toggles a dedicated window with profile:" option and choose "Hotkey Window" in ...


Go to iTerm Preferences → Profiles, select your profile, then the Keys tab. Find ⌥← and ⌥→ and set them to send escape sequence b and send escape sequence f respectively. If you use ⌘→ and ←⌘ you will need to remap the next and previous tab shortcuts which are set to those as default. Terminal uses ⇧⌘→ and ⇧⌘← for these. You can do this under Profiles, or ...


I like the following setup. Preferences > Keys (or Preferences > Profiles > Keys) Click the plus. move forward one word option+right send escape sequence f move back one word option+left send escape sequence b delete to beginning of word (credit) option+delete send hex code 0x1B 0x08 delete to end of word fn+option+delete send escape sequence d (I ...


Select "Reuse previous session's directory" from the preferences of your profile: Alternatively click on "Advanced Configuration" then "Edit..." so you can set the working directory separately for new windows, new tabs & new split panes


The easiest way to have iTerm2 open with a specific size, position and number of windows is: Get it all set up the way you'd like to see it when it opens. Have all your iTerm2 windows sized and place where you like them. From the top menu select Window -> Save Window Arrangement and give it a name Go to the Preferences and under the Arrangements section ...


This looks like a change in tmux in 2.0 -> 2.1 I've replaced setw -g mode-mouse on set -g mouse-select-pane on set -g mouse-resize-pane on set -g mouse-select-window off with just set-option -g mouse on and everything seems ok


Ctrl-[ b jumps back a word. You can also use Esc instead or Ctrl-[, and f to go forward. That is Ctrl+[ release and then b orf. Or Esc and b or f. More information can be found at this other discussion on AskDifferent.


Preferences are cached in 10.9. See If you edit a plist file directly or replace the plist of an application, the application will keep using the cached version even after you quit and reopen the application. You can run defaults read com.googlecode.iterm2 or killall cfprefsd to apply the ...


Executing the following should do the trick (use setopt to reenable them): unsetopt inc_append_history unsetopt share_history


iTerm supports coloring of console output based on a set of regular expressions. You can set them up in Preferences > Profiles > Advanced > Triggers > Edit. Here is my current set of regexes: (?i:.*error.*) // Yellow on Black (?i:.*(warning|warn).*) // Orange on Black (?i:.*FATAL.*) // White on Red You ...


To Get Forward (Alt-f), Backward (Alt-b) and Delete (Alt-d) Word Open iTerm. Go to iTerm > Preferences... > Profiles > Keys Under Profile Shortcut Keys, click the + sign. Type your key shortcut (option-b, option-f, option-d, option-left, etc.) For Action, choose Send Escape Sequence. Write b, d or f in the input field. This works at least for bash. For zsh ...




This is a year old, but I'd like to add a response that isn't so heavy-handed. The accepted answer will open the previous directory every time you open a new tab, which I personally find frustrating. I feel it's easier to always open in the home directory and then open the current directory in a new tab as needed. To do that, simply run the following ...


Okay, I found a solution... Chris Johnsen has a good writeup of what causes this problem on github. His tools work, but a better solution, if you have homebrew installed to: brew install reattach-to-user-namespace Then in your ~/.tmux.conf add these lines: set-option -g default-command "reattach-to-user-namespace -l zsh" # or bash bind C-c run "tmux ...


You'll want to override iTerm's default shortcuts with your own shortcuts to "Ignore". Go to Preferences > Key and press the + button at the bottom of the Global Shortcut Keys: Then add an entry for Cmd+K and choose "Ignore" for the action: This disables Cmd+K.


⌘+⌥+←/↑/→/↓ will let you navigate split panes in the direction of the arrow, i.e. when using ⌘+D to split panes vertically, ⌘+⌥+← and ⌘+⌥+→ will let you switch between the panes. Note: ⌥ is the [alt] key


If your default system shell is bash, your Terminal should start with it. You can check it on General tab under Terminal Preferences. Should look like the following: If bash isn't your default shell, you can change it by typing: chsh -s /bin/bash To configure iTerm2 with zsh you have to open Preferences and change the command on General tab on your ...


You have to do two things: set the LSCOLORS environment variable create an alias for ls so that it shows colors by default In your ~/.bash_profile add the following: export LSCOLORS="EHfxcxdxBxegecabagacad" alias ls='ls -lGH' <-----This shows in list format, follow symlinks colorized The the colors are set by each bit above; the first being ...


Open iTerm2 preferences by using the keyboard shortcut, Command + , or by invoking the command iTerm2 → Preferences... in the Menu bar. In the Preferences window, switch to Profiles tab and under Working Directory select Advanced Configuration. (The default selection is Home directory.) Now, click on the Edit... button, and in the pane that opens, under ...


The easiest is simply to open the Terminal and then press the TAB key twice. You'll be asked if you want to see all possibilities - reply "y" and you'll get the full list.


If you use bash, you can also add "\e\e[D": backward-word "\e\e[C": forward-word to ~/.inputrc.


~/Library/Preferences/com.googlecode.iterm2.plist Also note that you can set a custom location in iTerm Preferences under the General tab.


Try iTermocil iTermocil allows you to setup pre-configured layouts of windows and panes in iTerm2, having each open in a specified directory and execute specified commands.


With the \033]0;TEXT\007 escape sequence. Example of use in Bash: echo -ne "\033]0;$PWD\007" Which you could add to your $PROMPT_COMMAND if you use Bash, or otherwise attach to you PS1 so it gets re-evaluated often. Example: export PROMPT_COMMAND='echo -ne "\033]0;$PWD\007"'


I found the answer in iTerm FAQs :: Where does iTerm2 store its settings?: defaults delete com.googlecode.iterm2


To use the normal mouse behavior in tmux you have to keep alt pressed. So click on the link while pressing cmd+alt. The same applies when selecting text.


You have to update your TERMINFO file. Thanks to wincent's video and his github pages Watch the video and look at his github pages, they're excellent. I have the following note stored on my HD: We can have italics in the terminal. This works in iTerm as well as Terminal. We have to adapt the terminfo database to tell it to display italics. Create a ...


You have to set the scroll back buffer. This option is found under Profiles >> Terminal. You can either set the number of lines in the buffer past 1,000 (defualt) or you can check the box for "unlimited scrollback".

Only top voted, non community-wiki answers of a minimum length are eligible