对于常用软件的整合

2019-02-02  本文已影响0人  abdf1bac228f

用着很不好使的功能用了好久,打算升级一次开发环境,拖着开发了好久,终于受不了了。今天决定重新整合一下开发环境。

git工具整合

虽然github的windows的桌面工具很好用,但是很多时候要CS联调,只好改用命令行来处理git。

  1. 下载git并把windows的git目录放到Path变量中,把C:\Program Files\Git\bin放置到变量中。
  2. 重启vscode中的命令行,输入sh,就可以使用写的shell。

ssh连接

  1. 在本地下载windows的ssh工具openssh,在终端输入ssh-keygen -t rsa
    然后获得私钥和公钥。将公钥存至authorized_keys文件内,进行合适的sshd_config配置。
  2. 修改C:\Windows\System32\drivers\etc中的hosts文件,加入现有主机的记录。
  3. 使用ssh在终端即可轻松登陆服务器。

使用rmate在vscode编辑文件

这个网上看到的教程是错的,真的真的吐槽一下,浪费了一些时间。

  1. 在linux安装rmate
wget https://raw.githubusercontent.com/sclukey/rmate-python/master/bin/rmate
chmod +x ./rmate
mv ./rmate /usr/local/bin/rmate
  1. https://www.mls-software.com/opensshd.html安装openssh并配置好连接。
  2. 在vscode安装remote vscode扩展
    使用方式:
ssh -R 52698:127.0.0.1:52698 root@ip
rmate filename

关于用户本地的配置在这个网址 有。
但是这个工具有一个bug,详情在这个网址
后续使用了一下,如果想要同时打开多文件,可以先进行这个配置:

use the Command Palette Ctrl-Shift-P to open your settings file, just enter "Preferences: Open User Settings"!
Once you've opened your settings file (your settings file should be located on the right), add the "workbench.editor.enablePreview": false

然后再使用rmate filename指令打开多文件即可。

上一篇 下一篇

猜你喜欢

热点阅读