iterm

在Mac OS Finder中打开此处的终端[关闭]

前提是你 提交于 2019-12-24 22:24:06
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 是否有类似于Mac OS的Windows Powertoy的“此处打开命令窗口”? 我通过Google搜索找到了几个插件,但想看看最适合那里的开发人员的插件。 #1楼 好的,我意识到这有点晚了……也许在撰写本文时尚无此选择? 无论如何,我发现通过Fink安装pos软件包(在这种情况下是先决条件,对于使用MacPorts的用户来说可能有些类似的东西?)是最简单的解决方案。 您得到两个命令: posd-给出最前面的Finder窗口的当前目录(您可能为其设置别名cdf = cd posd) fdc-将最前面的Finder窗口的当前目录切换到Terminal pwd。 这与'open'略有不同。 它总是打开一个新的查找器窗口。 是的,在编写cdf之前必须切换到“终端”窗口,但是与在Finder工具栏上单击一个按钮相比,我认为这是很便宜的。 而且它也可以与iTerm一起使用,您不必下载单独的Finder工具栏按钮即可打开iTerm窗口。 这与PCheese提出的方法相同,但是您不必使.bash_profile混乱。 #2楼 OSX 10.6上的AppleScript中有一个错误。 (打开2个终端窗口)。 我通过在激活后添加close命令来解决此问题。 关闭第一个“终端”窗口。 on run tell

set pastetoggle not working

北战南征 提交于 2019-12-22 08:40:10
问题 My vim setup( https://github.com/aaronjorbin/.vim ) contains set pastetoggle=<F2> yet fn+F2 (when vim is running in terminal) causes vim to enter insert mode and output a Q on it's own line (same behavior when I am already in insert mode). This is the same if I am working on my local machine or if I have sshed into another server. In iterm2, nothing happens when I am in normal or visual mode. When I am in insert mode, <F2> is inserted. My config works perfectly well on my mac mini and linux

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

大城市里の小女人 提交于 2019-12-21 03:35:19
问题 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. 回答1: 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

ZSH RPROMPT weird spacing?

天大地大妈咪最大 提交于 2019-12-20 10:58:32
问题 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

How does this script for naming iTerm tabs work?

拈花ヽ惹草 提交于 2019-12-20 10:14:10
问题 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

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

梦想与她 提交于 2019-12-20 09:19:09
问题 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

How to turn off word wrap in iTerm2?

六眼飞鱼酱① 提交于 2019-12-20 08:36:56
问题 How to turn off word wrap in iTerm2? Is there a specific command to do so or in the preferences? I am trying to avoid having the text run down to the next line. I would rather scroll side to side. 回答1: lifted directly from https://apple.stackexchange.com/a/210666/115119 Props to @michid Disable line wrapping: tput rmam Enable line wrapping: tput smam 回答2: It appears that iTerm2 does not have the ability to turn off word wrap. There is an open issue (iTerm2 issue #1790) reported to "Provide

ZSH iterm2 increase number of lines history

百般思念 提交于 2019-12-20 08:09:35
问题 Not sure if this is zsh, iterm2 or the interaction between them. Trying to change the number of recallable lines in the terminal - not the command history, the output history. In .zshrc I have : HISTFILE=~/.histfile HISTSIZE=100000 SAVEHIST=100000 This seems to be ignored =( Not sure of the correct term to google, "Terminal output history?" 回答1: It's not immediately obvious in the iTerm2 documentation on how to change it. open the iTerm2 preferences ⌘ + , select the Profiles tab then select

screen: how to turn on alternate screen?

三世轮回 提交于 2019-12-18 10:16:31
问题 When I work in terminal, I see the history of the last shell commands execution output. If I run vim, I see the file I open full screen. When I exit vim, I can see the history of the last shell commands again. However, when I use vim from screen. I see the footprint of the file I was just editing on my exit from vim instead of the history of the last shell commands. I'd like to see the shell's history though. How can I achieve this behaviour? I used: terminal.app and iterm2.app tried

How to get Cmd-left/right working with iTerm2 and Vim (without requiring .vimrc changes)?

倾然丶 夕夏残阳落幕 提交于 2019-12-17 23:30:13
问题 I want to be able to use Option-left and Option-right to skip words (and Cmd-left/right to go to beginning and end of lines) within Vim as it does at my shell prompt. My Iterm2 preferences have mappings to do this (e.g. Option-left to Esc-H and a one for option-right to Esc-F to skip over words), and this works in the shell locally or when ssh'd to a remote server. When I use Vim locally or remotely, option-left works, but option-right does not. I suspect this is because Vim naturally listens