///
sublime和vscode 格式化Json ——两步走
sublime 和vsCode 格式化Json
sublime安装插件方式
(1)sublime中安装
打开 Sublime,command + shift + p
-> Install package,搜索 Pretty JSON
,安装,有的sublime搜索不到,因此需要手动安装。
(2)手动安装插件Pretty JSON.sublime-settings
-
首先找到电脑sublime软件的插件位置,Sublime Text→ Preference → Browse Packages ,然后显示简介。对于mac电脑,路径显示插件位置在
/Users/didi/Library/Application Support/Sublime Text 3/Packages
-
git clone下载软件:首先在终端中cd到插件位置,然年后输入命令
git clone https://github.com/dzhibas/SublimePrettyJson.git
,下载之后,将其中的Pretty JSON.sublime-settings放置到/Users/didi/Library/Application Support/Sublime Text 3/Packages/User
下,重新打开sublime
使用方式
打开json文件,选中其中一段json,输入以下快捷键:
-
macOS:
command + ctrl + j
-
Windows:
ctrl + alt + j
扩展:对于软件vscode
首先打开vscode,然后在扩展栏输入json,选择Json Tools,选择install
,安装完成之后,选择一个json文件,使用快捷键ctrl + alt + M
(对于macOS,快捷键为Command + option + M
)
github org:Unity-Technologies DOTS-training-samples
///
///安装brew的步骤///
你可能尝试了很多办法去安装brew,从一开始的网络超时,到一脸蒙的手动安装,本文教你如何正确安装brew
创建Homebrew目录
打开你的终端执行下面的命令,进行创建Homebrew
sudo mkdir /usr/local/Homebrew
同步brew.git库
sudo git clone https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git /usr/local/Homebrew
添加环境变量
sudo ln -s /usr/local/Homebrew/bin/brew /usr/local/bin/brew
同步core库
sudo mkdir -p /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core
sudo git clone https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core
同步cask
sudo mkdir -p /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask
sudo git clone https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-cask.git /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask
提权
sudo chown -R $(whoami) /usr/local/Cellar
查看版本号
brew -v
更换镜像源
此时你安装东西的话,还是会感受到超时的力量,所以我们需要更换国内镜像源
替换homebrew默认源
cd "$(brew --repo)"
git remote set-url origin git://mirrors.ustc.edu.cn/brew.git
bash用户:
echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles' >> ~/.bash_profile
source ~/.bash_profile #刷新
zsh用户
echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles' >> ~/.zshrc
source ~/.zshrc #刷新
记得要更新
brew update
//