liuwb

liuwb

開發環境搭建

1、安裝 clash-prop#

ClashX.dmg

2、安裝 Wrap#

Warp.dmg

3、安裝 brew#

/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"

4、安裝 oh-my-zsh#

sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

安裝好之後,需要把 zsh 設定為當前使用者的預設 shell(這樣新建命令的時候才會使用 zsh):

chsh -s /bin/zsh

4-1、聲明高亮#

使用 Homebrew 安裝:

brew install zsh-syntax-highlighting

安裝成功之後,令編輯~/.zshrc 文件,在最後一行增加下面配置:

source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh 

4-2、自動補齊#

配置步驟,先克隆 zsh-autosuggestions 專案,到指定目錄:

git clone https://github.com/zsh-users/zsh-autosuggestions ~/.oh-my-zsh/plugins/zsh-autosuggestions

然後,編輯~/.zshrc 文件,找到 plugins 配置,增加 zsh-autosuggestions 插件:

plugins=(git zsh-autosuggestions)

5、安裝 node#

先用brwe search nodejs查看 node 的版本,然後選擇合適的版本安裝,我這是安裝 node@18 版本

brew install node@18

安裝最後會有提示,安裝提示操作

==> Caveats
node@18 is keg-only, which means it was not symlinked into /usr/local,
because this is an alternate version of another formula.

If you need to have node@18 first in your PATH, run:
echo 'export PATH="/usr/local/opt/node@18/bin:$PATH"' >> ~/.zshrc

For compilers to find node@18 you may need to set:
export LDFLAGS="-L/usr/local/opt/node@18/lib"
export CPPFLAGS="-I/usr/local/opt/node@18/include"
==> Summary
🍺  /usr/local/Cellar/node@18/18.18.1: 2,337 files, 51.1MB
==> Running `brew cleanup node@18`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
==> Caveats
==> node@18
node@18 is keg-only, which means it was not symlinked into /usr/local,
because this is an alternate version of another formula.

If you need to have node@18 first in your PATH, run:
echo 'export PATH="/usr/local/opt/node@18/bin:$PATH"' >> ~/.zshrc

For compilers to find node@18 you may need to set:
export LDFLAGS="-L/usr/local/opt/node@18/lib"
export CPPFLAGS="-I/usr/local/opt/node@18/include"

按照提示輸入

echo 'export PATH="/usr/local/opt/node@18/bin:$PATH"' >> ~/.zshrc

此文由 Mix Space 同步更新至 xLog
原始鏈接為 https://liu-wb.com/posts/default/1


載入中......
此文章數據所有權由區塊鏈加密技術和智能合約保障僅歸創作者所有。