iterm2

iTerm2 + Zsh + Oh My Zsh + solarized

冷暖自知 提交于 2019-12-10 00:19:55
当时为什么买Mac电脑? 回想当初,当时决定买Mac电脑的一个最重要因素就是OSX它是UNIX系统,他与Linux系统一样,可以与Linux的环境一样,可以直接写shell命令。 武装自己的Terminal,提高工作效率 Mac自带的Terminal终端,功能不是很强大,做一些基本的配置还是可以。iTerm2是一款免费的软件,有很多的工作都比较好用。但是,如果线下环境与线上环境中间有一个跳板机的时候,就不是特别的方面,因为没有打隧道的功能。但是SecureCRT是可以做到的,但是该软件是收费,也是一个非常不错的软件,而且跨平台。 让iTerm变得强大,高效还漂亮 先来看看最终的效果图吧!!! 其他包含了:iTerm2 + Zsh + Oh My Zsh + solarized + autojump。 详细步骤 安装iTerm2 下载iTerm2的安装包,将其安装在电脑上。 下载地址: https://www.iterm2.com/ 下载solarized主题 下载solarized主题,我是在github直接clone下来的,直接用命令就可以下载下来。 具体步骤: git clone https://github.com/altercation/solarized.git 在iTerm→Preferences→Colors→Load Presets→import进来就可以了。

MAC终端iterm2和zsh

只愿长相守 提交于 2019-12-09 21:51:07
什么是iTerm2? iTerm2是终端的替代品,也是iTerm的继承者。它适用于使用macOS 10.10或更高版本的Mac。 iTerm2特性 拆分窗格 将选项卡划分为多个窗格,每个窗格显示不同的会话。您可以垂直和水平切片,并以任何可以想象的排列创建任意数量的窗格。 请注意非活动窗格如何略微变暗,因此很容易看出哪个窗格处于活动状态。 热键窗口 注册一个热键,当您在另一个应用程序中时,它会将iTerm2置于前台。终端永远是一个关键的压力。您可以选择让热键打开一个专用窗口。这为您提供了一个随时可用的终端(如Visor,Guake或Yakuake)。 搜索 iTerm2具有强大的查找页面功能。用户界面不受影响。立即突出显示所有比赛。甚至提供正规表达支持! 自动完成 只需键入窗口中出现的任何单词的开头,然后键入Cmd-; 将弹出一个带有建议的窗口。您正在寻找的单词通常位于列表的顶部! 无鼠标复制 使用“查找”功能开始搜索文本。按Tab键将选择范围扩展到右侧,或按shift键将选择范围扩展到左侧。Option-enter粘贴当前匹配。 粘贴历史记录 粘贴历史记录可让您重新访问最近复制或粘贴的文本。您甚至可以选择将历史记录保存到磁盘,以免永远丢失。 即时重播 即时重播让您回到过去。这就像你的终端的TiVo! 可配置 将任何键映射到任何函数。为每个选项键分配单独的功能 -

node学习准备工作1 --- nvm下载、终端环境iterm2配置

让人想犯罪 __ 提交于 2019-12-09 21:48:13
学无止境 最近在重新学习js基础,可是感觉别人在讨论框架啊什么的,就觉得对于js基础学习提不起劲,想起来node不就是用基础js,也算是学以致用。 一 nvm下载 先下载nvm,下载过程中还遇到了问题,见博客 nvm安装 node学习其实不需要下面这些,只是我觉得学习本身就是一种好奇心的延伸,因此,出于兴趣,特地的配置了一下这些 二 iterm2终端下载及主题配置 觉得mac自带终端好丑,所以安装了iterm2, iterm下载地址 然后配置iterm2的主题 下载地址: http://ethanschoonover.com/solarized 下载的是压缩文件,你先解压一下,然后打开 iTerm2,按Command + ,键,打开 Preferences 配置界面,然后Profiles -> Colors -> Color Presets -> Import,选择刚才解压的solarized->iterm2-colors-solarized->Solarized Dark.itermcolors文件,导入成功,最后选择 Solarized Dark 主题,就可以了。 配置oh my zsh Oh My Zsh 是对主题的进一步扩展 3.1 一键安装 $ sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my

iterm2 自动连接服务器配置

做~自己de王妃 提交于 2019-12-09 16:47:52
expect脚本配置 expect这个语言,我觉得提供了和进程交互的能力吧,具体语句含义见参考。 下面有2种情况,第一种是直接连服务器,也就是需要输入密码的方式,当然在服务器把你电脑公钥放上去,密码也不用输了。第二种情况的话,大部分公司去连线上服务器,都要经过跳板机,我们公司使用的是JumpServer,跳板机如何配置也不讲了。 普通服务器脚本 connect.sh #!/usr/bin/expect set timeout 30 spawn ssh [ lindex $argv 0 ] @ [ lindex $argv 1 ] expect "password" send "[lindex $argv 2]\r\n" expect " $* " send "cd [lindex $argv 3]/\n" send "tail -200f [lindex $argv 4]\n" interact 直接使用方式如下 ./connect.sh { username } { host } { password } { directory } { logFile } 跳板机脚本 jump.sh #!/usr/bin/expect spawn ssh jhost expect "*" { send "[lindex $argv 0]\n" } expect " $* " { send "cd

Mac公钥ssh登录Linux,并设置iTerm2记住服务器无密码快捷登录

末鹿安然 提交于 2019-12-09 13:03:49
参考: mac下配置centos的ssh登录使用RSA公私钥 阮一峰:ssh原理和应用 公钥登录原理: 非对称加密方式,公钥加密,私钥解密 本地生成一对密钥(公钥和私钥),并把公钥放到需要访问的服务器上。如果需要连接到SSH服务器上,客户端软件就会向服务器发送请求,请求用本地的密钥进行安全验证,服务器收到请求后,先在该服务器上的主目录下寻找客户端的公钥,然后把它和客户端发来的公钥进行比较。如果一致,服务器就用这个公钥加密“质询”(challenge)并把它发送给客户端软件,客户端本地接收到“质询”之后,就可用本地的私钥解密,然后把它md5后发给服务器,服务器将本地的“轮询”值md5后对比一致即建立连接,整个传输途中只有本地公钥和加密及解密“质询”的md5值传输,无明文传输。 一、Mac本地端 先生成本地公钥和私钥 ssh-keygen #不要输入任何东西,一律回车 #会在~/.ssh/下生成公钥和私钥 二、服务端 先开启密码登录(晚点再关闭),如果之前没有生成过公钥和私钥,就直接在 ~/.ssh/ 新建 authorized_keys (注:不要执行ssh-keygen,如果.ssh下面有内容,可先全部删除) ,将Mac本地端的 id_rsa.pub 内容复制进去(注:如果之前已经有内容,就跟在后面) vi ~/.ssh/authorized_keys 三、权限设置

iTerm 2 not honoring key bindings declared in .tmux.conf

感情迁移 提交于 2019-12-08 17:06:52
问题 I am using the latest stable version of iTerm2 (2.0) with the latest Homebrew build of tmux (1.9a). Unfortunately, my keybindings as declared in .tmux.conf do not work with the iTerm2/tmux combo in "integrated mode" (i.e. when iTerm2 takes over the management of tmux windows and panes). I tried different prefixes (C-b, M-a) as well as different key mappings in iTerm, but to no avail. Is this indeed an iTerm bug? Or is my expectation that the .tmux.conf keybindings would be carried over to

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

房东的猫 提交于 2019-12-08 07:37:35
问题 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 回答1: Seems like you have another client attached to this session and it's screen width is half

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

本秂侑毒 提交于 2019-12-08 04:37:30
问题 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

在 Mac OS X 终端里使用 Solarized 配色方案

馋奶兔 提交于 2019-12-07 18:48:32
相信长期浸泡在终端和代码的小伙伴们都有一套自己喜爱的配色方案。以前一直在用简单、 适合阅读的 Terminal.app 配色方案 , 换到 MacBook Pro with Retina display 后发现这个配色时间看长了眼睛有点累。不断有人推荐 Solarized,看了一些截图,感觉还不错,决定试一下。 Solarized 是目前最完整的 Terminal/Editor/IDE 配色项目,几乎覆盖所有主流操作系统(Mac OS X, Linux, Windows)、编辑器和 IDE(Vim, Emacs, Xcode, TextMate, NetBeans, Visual Studio 等),终端(iTerm2, Terminal.app, Putty 等)。类似的项目还有 Tomorrow Theme . 要在 Mac OS X 终端里舒服的使用命令行(至少)需要给3个工具配色,terminal、vim 和 ls. 首先下载 Solarized: $ git clone git://github.com/altercation/solarized.git Terminal/iTerm2 Mac OS X 自带的 Terminal 和免费的 iTerm2 都是很好用的工具,iTerm2 可以切分成多窗口,更方便一些。 如果你使用的是 Terminal 的话,在

MAC配置终端(item2 + oh-my-zsh + solarized配色方案)

孤街醉人 提交于 2019-12-07 18:48:21
https://www.jianshu.com/p/246b844f4449 安装item2: 下载地址 将iTem2设置为默认终端: (菜单栏)iTerm2 -> Make iTerm2 Default Term 然后打开偏好设置preference,选中Keys,勾选Hotkey下的Show/hide iTerm2 with a system-wide hotkey,将热键设置为command+. ,这样你就可以通过command+. 全局热键来打开或关闭iTerm2窗口,非常方便。 配色方案: http://ethanschoonover.com/solarized 下载后解压到某个位置 然后打开 iTerm2 下的偏好设置 preference ,点开 profiles 下的colors 选项,点击右下角的 Color Presets 选项,选择import ,导入解压到的 solarized 文件下的Solarized Dark.itermcolors 。 安装oh-my-zsh github连接: https://github.com/robbyrussell/oh-my-zsh 使用 crul 安装 sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools