iterm2

Iterm2安装Zsh + Oh My Zsh+Solarized

心已入冬 提交于 2019-12-07 18:48:10
安装Oh My Zsh curl -L https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh | sh 安装Zsh: 1.安装zsh brew install zsh 2.配置iterm2 sudo vim /etc/shells 输入: /usr/local/bin/zsh chsh -s /usr/local/bin/zsh 3.然后重新启动iTerm2,zsh就已经被配置成默认的shell了。 安装Solarized: 1.下载: git clone git://github.com/altercation/solarized.git 2.安装 然后打开 solarized/iterm2-colors-solarized/ 双击里面的文件 3.配置iterm2 依次打开 iTerm2 - Preferences - Profiles - Text - Text Rendering,将 Draw bold text in bright colors 前面的勾去掉 来源: oschina 链接: https://my.oschina.net/u/2391658/blog/1859379

iTerm2使用zmodem协议上传下载文件

≯℡__Kan透↙ 提交于 2019-12-07 08:09:24
背景 CentOS7默认支持zmodem协议,进行文件传输。具体可以看一看百科: ZMODEM 。值得注意的是,zmodem协议 不能处理超过4G的文件 。 Mac brew install lrzsz lrzsz是对zmodem协议实现的软件包。 iterm2-zmodem https://github.com/mmastrac/iterm2-zmodem 这里主要是下载两个脚本: iterm2-recv-zmodem.sh iterm2-send-zmodem.sh 下载完成后,将这个两个脚本负责到 /usr/local/bin/ 文件夹下面,具体如下: zylMBP:Downloads zhangyalin$ unzip iterm2-zmodem-master.zip Archive: iterm2-zmodem-master.zip f2b05887e8cea060d28c7129dbad8e3ec283a2c5 creating: iterm2-zmodem-master/ inflating: iterm2-zmodem-master/README.md inflating: iterm2-zmodem-master/iterm2-recv-zmodem.sh inflating: iterm2-zmodem-master/iterm2-send-zmodem.sh

在 iTerm2 中使用 tmux

假如想象 提交于 2019-12-06 15:35:55
作为开发者,不断和服务器打交道,最烦躁的是,每次用 ssh 连接服务器时,总担心网络不稳定导致在服务器端执行耗时的任务会被中断。有时候服务器一边在执行命令,一边又想看看服务器内存、CPU 等运行情况,这时候不得不再打开一个终端执行 ssh 连接操作。 最近发现一个好工具:「tmux」,恰好能解决这些问题,今天分享出来。 首先说一说 tmux 的好处。 tmux 优点 分屏 在 Mac 上,iterm2 也是可以做到分屏,但如果结合 iterm2 与 ssh 的话,iterm2 分屏需要不断地 ssh ,导致的后果就是有多个用户连接,使用 who 命令查看登录用户数。 举个例子,如果是 iterm2 分屏三个,则用户连接数为:3 但,如果是用 tmux 的话,相同的目标,用户连接数为:1 attach attach 可以起到保护现场的作用,不至于因 ssh 超时或者异常退出,而丧失了工作环境。 我做了一个测试,先在 tmux 环境下 git clone 代码。 接着关闭 ssh 环境一段时间,然后我重新连接服务器,这时候发现工作环境保持状态,并且持续下载中: 其中原理我觉得可以这么理解:tmux 运行在远程主机上,充当中介的作用。本地终端应首先 ssh 到远程主机,然后运行一个 tmux 会话,在会话内的 shell 中运行任务。当本地切断 ssh 连接时,应当先结束 tmux 会话

tmux: how to adjust the tmux session's width to fit in the terminal panel?

烈酒焚心 提交于 2019-12-06 15:13:51
when I re-attach a tmux session, the width of the tmux window is still the previous width and padded with white dots: So my question is how to adjust the tmux width to fit in the terminal panel? The ideal setting would be the tmux session's width is auto-adjusted whenever re-attached. PS: I am using iterm2 on mac. EDIT: This is actually answered here: https://stackoverflow.com/a/19280187/1464263 Seems like you have another client attached to this session and it's screen width is half your screen width. If you detach that second session those dots should go away. tmux ls will show you all the

在 iTerm2 中使用 tmux

安稳与你 提交于 2019-12-06 15:13:28
作为开发者,不断和服务器打交道,最烦躁的是,每次用 ssh 连接服务器时,总担心网络不稳定导致在服务器端执行耗时的任务会被中断。有时候服务器一边在执行命令,一边又想看看服务器内存、CPU 等运行情况,这时候不得不再打开一个终端执行 ssh 连接操作。 最近发现一个好工具:「tmux」,恰好能解决这些问题,今天分享出来。 首先说一说 tmux 的好处。 tmux 优点 分屏 在 Mac 上,iterm2 也是可以做到分屏,但如果结合 iterm2 与 ssh 的话,iterm2 分屏需要不断地 ssh ,导致的后果就是有多个用户连接,使用 who 命令查看登录用户数。 举个例子,如果是 iterm2 分屏三个,则用户连接数为:3 但,如果是用 tmux 的话,相同的目标,用户连接数为:1 attach attach 可以起到保护现场的作用,不至于因 ssh 超时或者异常退出,而丧失了工作环境。 我做了一个测试,先在 tmux 环境下 git clone 代码。 接着关闭 ssh 环境一段时间,然后我重新连接服务器,这时候发现工作环境保持状态,并且持续下载中: 其中原理我觉得可以这么理解:tmux 运行在远程主机上,充当中介的作用。本地终端应首先 ssh 到远程主机,然后运行一个 tmux 会话,在会话内的 shell 中运行任务。当本地切断 ssh 连接时,应当先结束 tmux 会话

How much history will be saved in iTerm2 Shell Integration's Toolbelt?

喜夏-厌秋 提交于 2019-12-06 14:49:24
Background : I installed shell integration in iTerm2 and enabled saving all command history to disk so it persists between sessions (Preferences > General > Save copy/paste and command history to disk). Questions : A) Is there is a limit to how much history will be stored? Does it follow the value assigned to the HISTFILESIZE environment variable, or is it controlled some other way, or limited by default? B) The history in the toolbelt contains additional information like the working directory at the time the command was executed (printed on the cli when you option+double click the history

Use CMD-mappings in console Vim

ε祈祈猫儿з 提交于 2019-12-06 07:46:01
Is there a way to use Cmd key for Vim in terminal? Something MacVim does. I have remapped Cmd+S in iTerm2 to send Esc:w!<CR> to save files in Vim, but this sounds a bit weak. With all the power of iTerm and Vim there should be some way to do this right? It is possible, but it takes some doing and has some downsides. The first set of issues is that: although iTerm2 can accept the Command keys and pass them on to terminal programs, it can only do so by remapping them as something else, e.g. the Left Option or Control keys. it can only remap each modifier key everywhere in iTerm2; you can't do it

Vim colors too bright (terminal)

流过昼夜 提交于 2019-12-05 05:13:06
问题 I have a problem with Vim and iTerm2, the colors are too bright (for ALL themes). It works with both Terminal.app and MacVim, so I guess it must be some setting in iTerm2 I've completely missed. The picture below shows you the difference (iTerm2 to the left, MacVim / Terminal.app to right): What I'm using: iTerm2: Build 1.0.0.20130624 Terminal type: xterm-256 Shell: zsh 5.0.2 Vim: version 7.3.666 OS X: 10.7.5 Do you guys have any idea what I'm missing? 回答1: You shouldn't compare colorschemes

Mac iterm2 安装配置rz、 sz命令

独自空忆成欢 提交于 2019-12-04 23:57:09
在换了MacBook以后没有用到去如何链接远程服务器上传文件,最近闲下来的时候买了一个阿里服务器练手,突然想到不知道如何上传文件到远程阿里服务器,就去研究看了一下... 1、首先安装一下iterm2,Mac的客户端官方下载地址: https://www.iterm2.com/downloads.html 2、在本地下载lrzsz: brew install lrzsz 3、然后下载iterm2-send-zmodem和iterm2-recv-zmodem,把文件保存到/usr/local/bin/ 路径下 下载地址: https://github.com/aikuyun/iterm2-zmodem 4、添加权限 cd /usr/local/bin chmod +x iterm2-send-zmodem.sh chmod +x iterm2-recv-zmodem.sh 5、设置iterm2的触发器(triggers) 执行如下以下步骤:command+“,” 组合键打开item2的“Preferences”面板->Profiles选项卡->Advanced->Triggers(点击Edit即可) Regular expression: \*\*B0100 Action: Run Silent Coprocess Parameters: /usr/local/bin/iterm2

iTerm2快捷键

梦想与她 提交于 2019-12-04 13:27:04
command + r: 清屏 control + u: 清除当前行 command + n: 新建窗口 command + t:新建标签页 command + d:垂直分屏 command + shift + d:水平分屏 command + ] 和command + [ 在最近使用的分屏直接切换 command + option + 数字:切换到指定位置的窗口 command + 方向键:按方向切换标签页 shift + command + s:保存当前窗口快照 command + alt + b:快照回放 command + / 高亮当前鼠标的位置 command + shift + h 弹出历史命令窗口 来源: https://my.oschina.net/u/3150903/blog/3130065