第14话

date
Aug 1, 2022
tags
summary
type
Post
status
Published
slug
series-14

Fig 增强命令提示 & 补全

notion image
Fig 是一个增强提示自动补全的软件,相比终端的按 Tab 显示更加友好,而且它的 Plugin Store 里会有统计一些比较受欢迎的 Plugin,我发现一些平时还是有可能用到的插件:
  • Git Open:在仓库里面输入 "git open",会在浏览器中打开 GitHub 页面或仓库的网站
  • You Should Use:提醒你使用你刚刚输入的命令的现有别名
还有就是可以在设置里面修改按 Tab 键再触发提示框
notion image

Spaceship ZSH 提示

notion image
简单 & 漂亮的 ZSH 提示,结合 emoji 显示 Git、Node.js、Golang 当前的版本,还有显示当前软件包版本,例如 package.json 里面的 version。 macOS 快速安装 brew install spaceship,然后把下面这一段代码放到 .zshrc 里面,然后 source ~/.zshrc 一下即可
fpath+=("$(brew --prefix)/share/zsh/site-functions")
autoload -U promptinit; promptinit
prompt spaceship

Snazzy 配色的 VSCode 主题

尝试一下 VSCode 和终端一样的配色

neovim 配置查看

  • dracula.vim 配色 了解一下 neovim 和 vim 的区别, 还有它们的插件管理、配置以及颜色高亮主题等

看博客 - 漫无目的

Tmux 和 iTerm2 的使用记录

利用 iTerm2 的窗口管理和 tmux 的 split-window、new-session-name 可以很方便的快速切换每一个项目的目录终端。 iTerm2 窗口管理:
  • 新建窗口 cmd + t
  • 关闭当前窗口 cmd + w
  • 切换窗口 cmd + shift + [] 左右切换,cmd + 数字键切换指定窗口
Tmux 会话 & 窗格管理: zsh 安装 tmux 的别名插件,自己再写一个快速创建窗格的别名,我使用的是 alias tsw="tmux split-window -h -p 60 && tmux split-window -v -p 20",效果如图:
notion image
窗格用途:
  • A:平时运行项目使用
  • B:日常操作,敲命令
  • C:备用,当 B 窗口查看历史命令 或 vim 编辑时,输入命令使用
这样做每当我用 iTerm2 新建一个窗口的时候,我 tmux 的流程就变为:
  • 新建会话 ts
  • 新建窗格 tsw
  • 关闭当前会话 tkss
  • 关闭当前网格可以使用 control + d

切换主力浏览器 Arc

精读文章:React状态管理的新浪潮

  • Ability to read stored state from anywhere in the component tree. This is the most basic function of a state management library.
  • Ability to write to stored state. A library should to provide an intuitive API for both reading and writing data to the store.
  • When using React we have to keep things like reference equality in mind.
  • It’s worth noting newer meta-frameworks like Remix address this. By providing abstractions for server-first data loading and declarative mutations that don’t require downloading a dedicated library. Extending the “UI as a function of state” concept beyond the just the client to include the backend remote state data.

© Craig Hart 2021 - 2024