iterm

How can I quickly scroll down the output of git commands?

本小妞迷上赌 提交于 2019-12-03 10:40:38
I have to show my commits using git show c36432 . The files are very big and it sometimes takes a long time to go line by line. What can I do to move fast, like page by page? I am using iterm as terminal on Mac OS X. Press the space bar. By default, git uses the less pager to display long output, and the space bar moves down a page at a time in less . Other less keyboard shortcuts also work, such as typing / followed by a word you want to search for, which can be handy when searching a Git diff or log. 来源: https://stackoverflow.com/questions/32365970/how-can-i-quickly-scroll-down-the-output-of

Why don't git colors show up in iTerm2

我们两清 提交于 2019-12-03 05:06:15
问题 So I have my gitconfig setup to do colors. In Terminal it works great, looks fine. In iTerm2, however, the colors don't appear for my gitconfig at all unless I set the reverse property for git. Then they appear but who likes reversed colors anyways? Why does this happen and how can I fix it? 回答1: You should check that iTerm is setting the TERM variable correctly. On my system, I see: echo $TERM xterm-256color And have working colours in git. This is set according to the 'Report Terminal Type'

iTerm2 – scroll less output with mouse

筅森魡賤 提交于 2019-12-03 03:38:11
问题 I just switched from OSX Terminal to iTerm2, and I seem to have lost one piece of functionality. In Terminal, I could scroll through output of the less command with my mouse, because I had installed MouseTerm. However, when I try scrolling less output in iTerm2, the window's scrollbar moves instead. Strangely, scrolling works as expected with vim . How can I scroll less output with my mouse in iTerm2? 回答1: The iTerm2 issue is now marked as "fixed" - but the fix is to add a hidden option, so

Can't see what I'm typing in iterm2

我的未来我决定 提交于 2019-12-03 02:04:16
Periodically, I'll run rspec (though I don't know if its specific to that) and suddenly, I can't see what i'm typing. I have to close that iterm2 window out and open a new one. Then that will work fine for a while and iterm2 will hide my typing again. I can always see responses to my commands, just not my typing or cursor. It also does this weird stacking thing where it pushes each new line farther to the right. Update!: I tried the suggestion to type in stty echo and can see my text, but the weird indention remains: Typing "stty sane" Fixes this for me. Clean up this and many other issues

iTerm 2 profiles

女生的网名这么多〃 提交于 2019-12-03 00:31:51
问题 I have recently switched over to iTerm2 and love it. I am wondering though if there is a way to use profiles to correspond to what environment/specific machine you are on. Say if I am doing tasks in one window on my mac the profile is displayed as default, but if I ssh into a machine (lets say dev0), the profile on iTerm will update to profile dev0. Once I've finished with dev0 and call exit, the profile will switch to default again. I realize one work around is to open up a specific profile

ZSH RPROMPT weird spacing?

倖福魔咒の 提交于 2019-12-03 00:07:56
Here is my ZSH prompt theme function git_prompt_info() { ref=$(git symbolic-ref HEAD 2> /dev/null) || return echo "$(parse_git_dirty)$ZSH_THEME_GIT_PROMPT_PREFIX$(current_branch)$ZSH_THEME_GIT_PROMPT_SUFFIX" } PROMPT='$fg[yellow]%}⚡︎ $fg[cyan]%~ $(git_prompt_info) %{$reset_color%}→ ' ZSH_THEME_GIT_PROMPT_PREFIX="[git:" ZSH_THEME_GIT_PROMPT_SUFFIX="]$reset_color" ZSH_THEME_GIT_PROMPT_DIRTY="$fg[red]+" ZSH_THEME_GIT_PROMPT_CLEAN="$fg[green]" RPROMPT='%T' Which looks like When I move the $(git_prompt_info) to RPROMPT function git_prompt_info() { ref=$(git symbolic-ref HEAD 2> /dev/null) || return

How does this script for naming iTerm tabs work?

别等时光非礼了梦想. 提交于 2019-12-02 21:29:41
I'm trying to name my iTerm tabs and found this link. Here is the pertinent part of the guy's post: I wrote a simple script, which I call “nametab”, which allows you to name the tab you are in from the command line. You just type something like: $ nametab New tab name If you’d like to use this yourself, here is the code: #!/bin/bash # A simple script which will name a tab in iTerm # usage: # $ nametab New tab name echo -ne "\033]0;"$@"\007" I have created a directory $HOME/dev/bash_scripts and placed a file in that directory called nametab.sh . I then switched to that directory and ran the

Copy and paste in vim via keyboard between different mac terminals?

落爺英雄遲暮 提交于 2019-12-02 19:28:02
Can anyone help me with this: I'm trying to figure out how to copy and paste text between 2 different instances of vim on different terminals (using iterm2 or mac terminal). I can do it using the mouse if I do ":set mouse=a" but I'd like to be able to do it using the keyboard. I've googled around and it says you can use the "* or "+ registers to copy/paste to/from the system clipboard, but when I type * or + in vim, the mac makes one of those sounds it makes when you can't do something. I've also done ":set clipboard=unnamed" but that hasn't worked either. I'm using Mac OSX 10.7 (Lion) and

iTerm2 – scroll less output with mouse

好久不见. 提交于 2019-12-02 17:58:49
I just switched from OSX Terminal to iTerm2, and I seem to have lost one piece of functionality. In Terminal, I could scroll through output of the less command with my mouse, because I had installed MouseTerm . However, when I try scrolling less output in iTerm2, the window's scrollbar moves instead. Strangely, scrolling works as expected with vim . How can I scroll less output with my mouse in iTerm2? Alex Dupuy The iTerm2 issue is now marked as "fixed" - but the fix is to add a hidden option, so it is not immediately obvious how to enable the new AlternateMouseScroll option. As Filippo

Why don't git colors show up in iTerm2

主宰稳场 提交于 2019-12-02 17:32:00
So I have my gitconfig setup to do colors. In Terminal it works great, looks fine. In iTerm2, however, the colors don't appear for my gitconfig at all unless I set the reverse property for git. Then they appear but who likes reversed colors anyways? Why does this happen and how can I fix it? You should check that iTerm is setting the TERM variable correctly. On my system, I see: echo $TERM xterm-256color And have working colours in git. This is set according to the 'Report Terminal Type' property in iTerm's preferences. You should also check the Colors tab, and ensure the contrast slider isn't