alias reload="source ~/.zshrc"
alias zshrc="code ~/.zshrc"
alias aliasrc="code ~/.setting/.alias"
alias del="rm -rf"
alias cls="clear"
alias useproxy="export https_proxy=http://127.0.0.1:7890 http_proxy=http://127.0.0.1:7890 all_proxy=socks5://127.0.0.1:7890"
alias unuseproxy="unset https_proxy http_proxy all_proxy"
alias gitproxy="git config --global https.proxy https://127.0.0.1:7890"
alias ungitproxy="git config --global --unset https.proxy"
# copy alias
alias pc='pbcopy'
alias pp='pbpaste'
alias pcurl='pp | xargs curl -s '
alias pget='pp | xargs wget'
alias pclone='pp | xargs git clone'
alias peval='pp | bash'
alias pdown='pp | xargs aria2c'
# yarn
alias y='yarn'
alias ya='yarn add'
alias yu='yarn upgrade'
alias yr='yarn remove'
alias yg='yarn global'
alias yga='yarn global add'
alias ygu='yarn global upgrade'
alias ygr='yarn global remove'
Last active
May 16, 2021 08:38
-
-
Save lesonky/0e1a663b796c80a029bcd7ae4fc5fb2f to your computer and use it in GitHub Desktop.
Mac 配置
[https]
proxy = https://127.0.0.1:1086
[user]
name = shaojiasong
email = [email protected]
[alias]
st = status
ci = commit
ciam = "commit -am"
br = branch
co = checkout
lg = "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"
[sendemail]
smtpuser = [email protected]
smtpserver = smtp.163.com
smtpencryption = tls
smtpserverport = 25
suppresscc = self
[core]
autocrlf = input
editor = code --wait
[merge]
tool = vscode
[mergetool "vscode"]
cmd = code --wait $MERGED
trustExitCode = false
keepTemporaries = false
keepBackup = false
prompt = false
[diff]
tool = vscode
[difftool "vscode"]
cmd = code --wait --diff $LOCAL $REMOTE
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="/Users/shaojiasong/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
# See https://gist.github.com/lesonky/3fa9120238cb85e0d41c27a371dd2aa4
ZSH_THEME="myagnoster"
# Set list of themes to pick from when loading at random
# Setting this variable when ZSH_THEME=random will cause zsh to load
# a theme from this variable instead of looking in ~/.oh-my-zsh/themes/
# If set to an empty array, this variable will have no effect.
# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" )
# Uncomment the following line to use case-sensitive completion.
# CASE_SENSITIVE="true"
# Uncomment the following line to use hyphen-insensitive completion.
# Case-sensitive completion must be off. _ and - will be interchangeable.
# HYPHEN_INSENSITIVE="true"
# Uncomment the following line to disable bi-weekly auto-update checks.
# DISABLE_AUTO_UPDATE="true"
# Uncomment the following line to change how often to auto-update (in days).
# export UPDATE_ZSH_DAYS=13
# Uncomment the following line to disable colors in ls.
# DISABLE_LS_COLORS="true"
# Uncomment the following line to disable auto-setting terminal title.
# DISABLE_AUTO_TITLE="true"
# Uncomment the following line to enable command auto-correction.
# ENABLE_CORRECTION="true"
# Uncomment the following line to display red dots whilst waiting for completion.
# COMPLETION_WAITING_DOTS="true"
# Uncomment the following line if you want to disable marking untracked files
# under VCS as dirty. This makes repository status check for large repositories
# much, much faster.
# DISABLE_UNTRACKED_FILES_DIRTY="true"
# Uncomment the following line if you want to change the command execution time
# stamp shown in the history command output.
# You can set one of the optional three formats:
# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
# or set a custom format using the strftime function format specifications,
# see 'man strftime' for details.
# HIST_STAMPS="mm/dd/yyyy"
# Would you like to use another custom folder than $ZSH/custom?
# ZSH_CUSTOM=/path/to/new-custom-folder
# Which plugins would you like to load?
# Standard plugins can be found in ~/.oh-my-zsh/plugins/*
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(
z
git
osx
extract
autojump
web-search
zsh-autosuggestions
zsh-syntax-highlighting
)
source $ZSH/oh-my-zsh.sh
# User configuration
# export MANPATH="/usr/local/man:$MANPATH"
# You may need to manually set your language environment
# export LANG=en_US.UTF-8
# Preferred editor for local and remote sessions
# if [[ -n $SSH_CONNECTION ]]; then
# export EDITOR='vim'
# else
# export EDITOR='mvim'
# fi
# Compilation flags
# export ARCHFLAGS="-arch x86_64"
# ssh
# export SSH_KEY_PATH="~/.ssh/rsa_id"
# Set personal aliases, overriding those provided by oh-my-zsh libs,
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
# For a full list of active aliases, run `alias`.
#
# Example aliases
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"
# get local ip and copy(there is a problem )
# history time format
# for tmux
if [ -f /etc/profile ]; then
PATH=""
source /etc/profile
fi
# for pyenv
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
if command -v pyenv 1>/dev/null 2>&1;
then
eval "$(pyenv init -)"
fi
export HIST_STAMPS="yyyy-mm-dd"
# flutter
export PUB_HOSTED_URL=https://pub.flutter-io.cn
export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn
# for autojump
[ -f /usr/local/etc/profile.d/autojump.sh ] && . /usr/local/etc/profile.d/autojump.sh
# ip functions
copyIp() {
ifconfig | grep -E 'inet.[0-9]' | grep -v '127.0.0.1' | awk '{ print $2}' | pbcopy
}
showIp() {
copyIp | pbpaste
}
# add alias
source ~/.setting/.alias
# nvmrc
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
# place this after nvm initialization!
# call nvm use automatically whenever you enter a directory that contains an .nvmrc file
autoload -U add-zsh-hook
load-nvmrc() {
local node_version="$(nvm version)"
local nvmrc_path="$(nvm_find_nvmrc)"
if [ -n "$nvmrc_path" ]; then
local nvmrc_node_version=$(nvm version "$(cat "${nvmrc_path}")")
if [ "$nvmrc_node_version" = "N/A" ]; then
nvm install
elif [ "$nvmrc_node_version" != "$node_version" ]; then
nvm use
fi
elif [ "$node_version" != "$(nvm version default)" ]; then
echo "Reverting to nvm default version"
nvm use default
fi
}
add-zsh-hook chpwd load-nvmrc
load-nvmrc
- Lepton(gist编辑器)
- gisto: 另一个Gist编辑器
- Skim(pdf阅读)
- calibre (电子书管理)
- IINA(播放器)
- Shadowsocks NG
- Tencent Lemon (软件清理)
- Typora (MD 编辑器)
- Fock (Git图形终端)
- Kap (录屏软件)
- LICEcap (屏幕GIF)
- Pock(TouchBar上显示Dock)
- MOS 鼠标平滑滚动
- Zazu 开源工作流
- kawa 输入法快捷键设置
brew cask install kawa
- TinyPNG4Mac 图片压缩
- keycastr 屏幕显示键盘输入(录屏好帮手)
- clashX 全局科学上网
- devdocs 开源离线开发文档
- bilibili屏幕录像
- 状态栏隐藏工具
- 截图工具
- 代码截图工具
- V2rayU
- handbrake 免费的视频压缩软件
- alacritty: 简洁的terminal终端
- synergy:鼠标键盘多电脑同步
- fliqlo: 时间屏保
- asciiquarium: 终端养鱼
- zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
- web-search
git clone https://github.com/lesonky/web-search.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/web-search
- autojump
- zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
- 在home目录新建
.alacritty.yml
文件, 参考下面配置字体,其他配置可以看文档. - 最好配合 tmux 使用
font:
size: 14
normal:
family: 'SauceCodePro Nerd Font'
style: 'Light'
- 去github 下载 vim 源码
- 去源码目录 make & sudo make install
- 编辑 zshrc 文件
# If you come from bash you might have to change your $PATH.
export PATH=$HOME/bin:/usr/local/bin:$PATH
- 链接 vi 到 vim sudo ln -s /usr/local/bin/vim /usr/local/bin/vi
- source ~/.zshrc
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment