打造 mac 高效開發環境

date: 2018-8-30 13:15:52
title: 打造 mac 高效開發環境

zen

  • 搜索: 好記性不如會搜索
  • 模糊匹配: 幾乎所有搜索的地方都支持模糊匹配, 只要順序正確就可以搜索到
  • 工具化: 在重複執行不出錯上, 機器絕對可以輕蔑地說「愚蠢的人類」, 我通常會迴應「所以你是機器」
  • 自動保存: 都 9102 了, 還不用自動保存
  • vim: learn once, use everywhere

mark

  • 觸控板
    • 使用輕點取代按下: 設置-觸控板-輕點來點按
    • 三指拖拽: 設置-輔助-鼠標和觸控板-觸控板選項
  • 快捷鍵
    • touchbar + fn
  • 軟件
    • 搜狗輸入法: https://pinyin.sogou.com/mac/
    • Chrome
    • alfred(效率神器): https://xclient.info/s/alfred.html
      • 設置快捷鍵, 替換 spotlight: 設置-快捷鍵-spotlight-取消所有; Alfred設置快捷鍵爲 cmd+空格
      • 切換應用
      • 打開網頁收藏夾: 設置-feature-網頁收藏夾
      • workflow: 有道翻譯
    • things: 雙手不離開鍵盤完成 todo list 管理
    • nimble commander: 類似 total commander 的文件管理工具
    • vscode: https://code.visualstudio.com/docs/?dv=osx
      • 快捷鍵
        • Cmd-S-p: 打開 command 面板
      • 添加 code 命令到 PATH 中, 方便打開文件: command 面板 -> 輸入 path
      • 自動保存: command 面板 -> autosave
      • 添加 vim: command 面板 -> keymaps -> vim
    • sizeup: 窗口管理工具
      • 只保留常用: 窗口調整到左右 / 窗口到不同顯示器 / 窗口居中或最大化
    • jietu 截圖工具: https://jietu.qq.com/
      • 配置快捷鍵, 只保留截圖快捷鍵, 關閉其他應用(微信/qq/企業微信/釘釘)的截圖快捷鍵
    • homebrew: mac 包管理工具
      • 常用工具: git curl tree
      • fish: 超好用的shell
        • fish_config(~/.config/fish/fish_config)
      • 其他工具
        • ag: 高效內容查找, 比 grep/awk 更快的遞歸搜索文檔
        • htop: 代替 top
        • jq: 格式化顯示 json
      • brew cask 常用工具: iterm2 google-chrome firefox vscode
    • github 客戶端: https://desktop.github.com/
      • 方便查看修改 -> 寫完代碼一定要自己 review, 自己自測
    • docker desktop + aliyun下載文件 + docker 中文網源
    • charles 視頻教程
    • 迅雷
    • imageopti 無損優化圖片
    • picgo + 七牛雲: 圖片上傳工具
# allow app form anywhere
sudo spctl --master-disable

# SIP(system integrity protection, rootless)
csrutil disable

# 刪除默認輸入法
cd ~/Library/Preferences
cp com.apple.HIToolbox.plist com.apple.HIToolbox.plist.bak
sudo open com.apple.HIToolbox.plist # 關閉SIP -> 切換到默認輸入法, 才能保存 -> 安裝xcode, 也可以 xed com.apple.HIToolbox.plist -> 重啓

# 七牛圖片高級處理: https://developer.qiniu.com/dora/manual/1270/the-advanced-treatment-of-images-imagemogr2
?imageMogr2/auto-orient/thumbnail/500x500 # 自動旋轉; 等比限寬+高縮放
?imageMogr2/rotate/-90 # 旋轉

alfred

alfred的確是神器, 需要好好提提:

  • 切應用: 常用應用可以「調教」到輸入一個字母解決
  • 搜索 文件
  • 搜索 chrome 書籤
  • 設置 百度/百度地圖 搜索
  • 設置 微雲 同步配置

Alfred workflow
workflow - gtihub: gh > help 查看幫助

iterm2

mouseless copy C-f-tab
Autocomplete C-;
Paste History C-S-h
Full Screen C-enter
Window Arrangements: 保存常用TAB佈局
Shell Integration/Utilities https://iterm2.com/documentation-shell-integration.html
Password Manager
show timestamp
open quickly
find cursor C-/
iterm2 粘貼時有多餘字符 0~ 1~: printf '\e[?2004l'
copy mode: cmd-S-c(進入) -> C-v(選中模式) jkhl(移動) y(複製)
使用ubuntu主題: Preferences(cmd+,)-Profiles-default-colors-(Color Presets...)下拉中選擇ubuntu
可以點擊Visit Online Gallery下載顏色主題

reference

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章