MacOS


Spotlight 聚焦搜索失灵

输入以下命令,重置索引,然后重启系统即可.

sudo mdutil -a -i on

一些命令

  • command + q 退出当前应用程序
  • fn + delete 向右删除
  • control + p 光标向上移动一行
  • control + n 光标向下移动一行
  • control + f 光标向右移动一格
  • control + b 光标向左移动一格
  • command + k 命令行工具清屏快捷键
  • control + command + Q 系统锁屏
  • command + shift + G 前往文件夹,需要输入地址

终端

  • command + T 终端打开多页
  • ...

剪切板命令

  • pbcopy 拷贝命令
  • pbpaste 粘贴命令

使用示例:

# 将 aaa.txt 的内容复制到系统剪贴板
cat aaa.txt | pbcopy

 # 将系统剪贴板的内容写到 bbb.txt
pbpaste > bbb.txt

...

  • https://brew.sh

安装 switchhosts

brew install switchhosts

安装 Visual Studio Code

brew install --cask visual-studio-code

安装 Docker

brew install --cask docker

安装 sequel-pro

brew install --cask sequel-pro

安装 php

brew search php
brew install php@7.3
brew uninstall php@7.3

安装 composer

brew install composer

安装 phpunit

brew search phpunit
brew install phpunit
brew uninstall phpunit

安装 postman

brew cask install postman
# why not are?
# brew install postman

安装 lua

brew install lua

安装 chrome

brew search google-chrome
brew search google-chrome

按照nodejs

brew search node
brew search node@14

zsh

brew install zsh-autosuggestions

安装成功后按提示激活即可

To activate the autosuggestions, add the following at the end of your .zshrc:

  source /usr/local/share/zsh-autosuggestions/zsh-autosuggestions.zsh

You will also need to force reload of your .zshrc:

  source ~/.zshrc

mac 下配置终端启动 vscode

打开 vscode,操作快捷键 commend + shift + p 打开命令面板
输入 shell,选择 install code command in PATH/ uninstall code command in PATH

参考

  • 如何基于mac m1 搭建舒适的开发工作环境
  • 无法在Mac中创建/data文件夹