blog icon indicating copy to clipboard operation
blog copied to clipboard

我的终端开发环境 PuTTYTray+Tmux+Neovim

Open hanxi opened this issue 10 years ago • 0 comments

我的配置在这里: https://github.com/hanxi/dotfiles

PuTTYTray

  • 下载 PuTTYTray 后,建一个目录存放 putty.exe image
  • 打开 putty.exe (可以发送快捷方式到桌面)
  • 选择 Sessions from file image
  • 随便配置一个 session 并保存,将会在 putty.exe 同级目录下产生一个 sessions 目录
  • 用编辑器打开上一步保存的 sessions/127.0.0.1 配置文件,拷贝 .putty-tray.session 文件内容覆盖过去
  • 然后再 Load ,可能有报错,弹出报错时点忽略即可,然后再 Save
  • 配置字体 Windows -> Appearance -> Font settings 我用的字体是 Source Code Pro
  • 配置登录帐号 Connection -> Data -> Auto-login username 填入服务器的用户名
  • 配置私钥路径 Connection -> SSH -> Auth -> Private key file for authentication
  • 私钥文件是 ppk 格式的,可以用 PuTTYTray 的 Keygen 工具 id_rsa 转成 ppk 格式的
  • 配置完后不要着急点 Open ,先回到 Session 点 Save

Tmux

https://github.com/hanxi/dotfiles/blob/master/.tmux.conf 自动保存 session https://github.com/hanxi/dotfiles/blob/master/.tmux/tmux-autosave.sh

Neovim

  • 如何安装
  • 拷贝 .vim .vimrc .config 到 ~ 目录
  • 在 vim 中执行 :PluginInstall 命令
  • nvim 的 :CheckHealth 命令很有用,可以检测出颜色问题

https://github.com/hanxi/dotfiles/blob/master/.vimrc

bash

  • 以前遇到过终端颜色问题,这行配置很重要 export TERM=screen-256color

配置 tmux 自动加载 session https://github.com/hanxi/dotfiles/blob/master/.bash_profile

hanxi avatar Feb 05 '15 11:02 hanxi