Skip to content

Commit

Permalink
Merge pull request #3 from pityonline/testing
Browse files Browse the repository at this point in the history
合并当前使用的配置
  • Loading branch information
pityonline authored Apr 11, 2018
2 parents b9a7aed + 1f3e67a commit 5520399
Show file tree
Hide file tree
Showing 8 changed files with 471 additions and 225 deletions.
3 changes: 2 additions & 1 deletion .alias
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ alias grep='grep --color=auto'
alias la='ls -lha'
alias ll='ls -lh'
alias ls='ls -G'
alias less='/usr/share/vim/vim73/macros/less.sh'
alias vi='vim'
alias less='/usr/share/vim/vim80/macros/less.sh'
alias strace='sudo dtruss'
alias mdfind='mdfind -onlyin .'
alias cget='wget -SO /dev/null'
Expand Down
4 changes: 3 additions & 1 deletion .bash_profile
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,13 @@ export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8

# Paths
export PATH=/usr/local/bin:$PATH
export XML_CATALOG_FILES="/usr/local/etc/xml/catalog"
# export PATH="$HOME/.plenv/bin:$PATH"
eval "$(plenv init -)"

# Git completion
source /usr/local/etc/bash_completion.d/git-completion.bash

# Alias
source $HOME/.alias
eval "$(hub alias -s)"
140 changes: 76 additions & 64 deletions .gitconfig
Original file line number Diff line number Diff line change
@@ -1,74 +1,86 @@
[user]
name = pityonline
email = [email protected]
name = pityonline
email = [email protected]
[color]
diff = auto
branch = auto
status = auto
grep = auto
diff = auto # 差异对比高亮
branch = auto # 分支高亮
status = auto # 状态颜色标识
grep = auto # 查找关键字高亮
[alias]
a = add
af = add -f
ai = add -i
ap = add -p
b = branch
bv = branch -v
bi = bisect
bl = blame
c = commit
ca = commit -a
cam = commit --amend
cm = commit -m
cf = config
cg = config --global
cl = clone
co = checkout
cp = cherry-pick
d = diff
dc = diff --cached
ds = diff --stat
dsc = diff --stat --cached
dt = difftool
f = fetch
h = help
l = log
l1 = log --pretty=oneline
lc = !git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
lg = log --graph
lp = log -p
lst = log --stat
lt = !git log -a --pretty=oneline --graph | git name-rev --stdin --tags
ls = ls-files
m = merge
pl = pull
ps = push
pt = push --tags
r = remote
rv = remote -v
rb = rebase
rc = rm --cached
rf = reflog
rl = reset HEAD^
rs = reset
s = status
st = stash
sta = stash apply
std = stash drop
stl = stash list
t = tag
w = whatchanged
a = add
af = add -f # 强制跟踪,只在被预先忽略时使用
ai = add -i # 交互式添加
ap = add -p # 补丁式添加
b = branch # 显示当前分支
ba = branch -a # 显示所有分支,包括 remotes
bv = branch -v # 显示分支及当前 HEAD
bi = bisect # 二分法查找
bl = blame # 显示文件每行最新修改作者及提交信息
ca = commit -a # 自动添加变更的文件并提交
cam = commit --amend # 修改上次提交信息
ci = commit # 提交
cm = commit -m # 单行信息提交
cv = commit -v # 编写提交信息时显示所有变更
cf = config # 配置
cfg = config --global # 全局配置
cl = clone # clone 仓库
co = checkout # 检出
cp = cherry-pick # 挑选提交到分支上
cnt = count-objects -v # 统计仓库大小
d = diff # 差异对比
dc = diff --cached # 显示暂存的差异
ds = diff --stat # 显示变更的行数
dsc = diff --stat --cached # 显示暂存的差异的行数
dt = difftool # 差异对比工具
f = fetch # featch 更新
h = help # 帮助
l = log # 显示提交日志
l1 = log --pretty=oneline --abbrev-commit --graph # 单行显示简短提交记录
lc = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
lg = log --graph # 显示分支树
lp = log -p # 显示所有提交信息
lst = log --stat # 显示每次提交的文件行数变更
lt = !git log -a --pretty=oneline --graph | git name-rev --stdin --tags | less # 显示每次提交的 tag 信息
ls = ls-files # 显示纳入版本控制的文件列表
m = merge # 合并
mt = mergetool # 合并工具
o = !gitopen # 调用 gitopen 打开远程仓库页面
pl = pull # 拉取更新
ps = push # 推送更新
pt = push --tags # 推送 tag 到 remotes
r = remote # 显示远程名称
rv = remote -v # 显示远程分支及地址
rb = rebase # 变基
rc = rm --cached # 删除暂存的文件
rf = reflog # 显示操作记录
rl = reset HEAD^ # 回退上一次提交
rs = reset # 回退
s = status # 显示当前状态
sm = submodule # 子模块
smi = submodule init # 初始化子模块
smu = submodule update # 更新子模块
st = stash # 暂存
sta = stash apply # 从储藏区中取出一次储藏,储藏区中仍保留
std = stash drop # 从储藏区中删除一次储藏
stl = stash list # 显示储藏区列表
stp = stash pop # 从储藏区中取出一次储藏,储藏区中不保留
t = tag # 显示 tag 列表
w = whatchanged # 显示简要变更信息
[github]
user = pityonline
user = pityonline
[core]
excludesfile = /Users/pity/.gitignore_global
quotepath = false
excludesfile = ~/.gitignore_global # 全局忽略文件
quotepath = false # status 显示中文
editor = /usr/local/bin/vim # commit 语法高亮
[push]
default = simple
default = simple
[diff]
tool = vimdiff
tool = vimdiff
[difftool]
prompt = false
prompt = false
[merge]
tool = vimdiff
tool = vimdiff
# [init]
# templatedir = /Users/pity/git-hooks
# templatedir = ~/git-hooks
[http]
proxy =
91 changes: 91 additions & 0 deletions .screenrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= #
# Use this line if you want instant charset mapping from gbk to
# unicode. Conflict with mutt's unicode setting.
#defencoding GBK
#encoding GB18030
#encoding GBK UTF-8

# hardstatus line
hardstatus alwayslastline
#left aligned
#hardstatus string "%{= R}[%{y}%l%{r}][ %{=b b}%-w%{=rb db}%>%n %t%{-}%+w%{-b}%< %=%{R}][%{G}%c %{M}%D %m-%d%{R}]"
#center aligned
#hardstatus string "%{= B}:%{= b}: %{= r}[ %{=b G}%H%{= r} ] %= %{=b b}%-w%{=rb db}%>%n %t%{-}%+w %=%{= r}[ %{G}%c %{M}%D %m-%d %{r}] %{= b}:%{B}:"
hardstatus string "%{= B}:%{= b}: %{= r}[ %{=b G}%H%{= r} ] %= %{=b b}%-w%{=rb db}%>%n %t%{-}%+w %=%{= r}[ %{G}%D %{M}%m-%d %{r}] %{= b}:%{B}:"
#caption always "%{= mW} %= %H %="
#caption always "%{= gk}%-Lw%{= rW}%50> %n%f* %t %{-}%+Lw%< %= %{= Gk} %H %{= rW} %l %{= Gk} %0c:%s %d/%m %{-}"
#new version from vermaden
#hardstatus string '%{= M} %H%{= G} %l %= %{= w}%-w%{+b r}%n*%t%{-b r}%{w}%+w %= %{c}%d %D %{B}%c '
windowlist title '%{u .g}Num Flags Title%='
windowlist string '%{.g}%3n %{.y}%f%09=%{-} %t %='

# rendition bell '=rb' 'dr'
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= #
## Some general options ##

# Make the xterm scroller work in screen, also works
# with mouse scrollwheel(does not work...)
terminfo xterm*|rxvt ti@:te@
#allow bold
#attrcolor b ".I"
## erase background with current bg color
#defbce "on"
#fix rxvt-unicode 256 color problem
terminfo rxvt-unicode 'Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm'
# tell screen how to set colors. AB = background, AF=foreground
#terminfo xterm 'Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm'
#dynamic title
termcapinfo xterm* 'Co#256:XT:hs:ts=\E]2;:fs=\007:ds=\E]2;screen\007'

# Automatically detach on hangup, or the screen will keep eating your memory after the terminal emulator has been terminated.
autodetach on # default: on

# Refresh the display when exiting programs like vim, nano, irssi and etc.
altscreen on

#define a large scrollback buffer
defscrollback 1000

# Set messages timeout to 5 second:
msgwait 4
msgminwait 1
pow_detach_msg "Screen session of \$LOGNAME \$:cr:\$:nl:ended."
#version
# start message:
startup_message off # default: on

# use audio bell
vbell off
vbell_msg " Wuff ---- Wuff!! "

#nethack style messages
nethack on

#utf-8 handling
defutf8 on

attrcolor b ".I"

#use zshell as default shell
shell bash

# =-=-=-=-=-=-=-=-=-=-=Key bindings-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= #
# bind F1 to select 1
# bind F7 to detach screen session from this terminal
# bind F8 to kill current screen window.
# bind F9 to create a new screen
# bind F10 to rename current screen window
# bind F11 to move to previous window
# bind F12 to move to next window
#bindkey -k k1 select 1
#bindkey -k k7 detach
#bindkey -k k8 kill
#bindkey -k k9 screen
#bindkey -k k; title
bind k kill # fix K key with old version
bind s # prevent screen from freezing on c-a s
bindkey -k F1 prev
bindkey -k F2 next
# =-=-=-=-=-=-=-=-=-=-=-Sessions=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= #
screen
screen
26 changes: 10 additions & 16 deletions .tmux.conf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ bind-key -n F11 previous-window
bind-key -n F12 next-window

# C-c also create new window, like in screen
bind-key C-c new-window
bind c new-window -c "#{pane_current_path}"

# Reload settings
bind r source-file ~/.tmux.conf \; display "Configuration reloaded!"
Expand All @@ -21,11 +21,12 @@ setw -g xterm-keys on

# More straight forward key bindings for splitting
unbind %
bind | split-window -h
bind h split-window -h
bind | split-window -h -c "#{pane_current_path}"
bind h split-window -h -c "#{pane_current_path}"
unbind '"'
bind - split-window -v
bind v split-window -v
bind - split-window -v -c "#{pane_current_path}"
bind v split-window -v -c "#{pane_current_path}"
bind z resize-pane -Z

# Notifying if other windows has activities
set -g visual-activity off
Expand All @@ -35,9 +36,6 @@ setw -g monitor-activity on
# operate it
setw -g automatic-rename off

# UTF8
setw -g utf8 on

# Altscreen
setw -g alternate-screen on

Expand All @@ -59,22 +57,18 @@ set -g default-terminal "screen"
set-option -g display-time 2000

# Set status bar
set -g status-utf8 on
set -g status-justify centre
set -g status-bg default
set -g status-left "#[fg=cyan]:#[fg=blue]: #[fg=red][ #[fg=colour227]Session: #S #[fg=red]]#[default]"
set -g status-left-length 30
set -g status-right-length 30
set -g status-right "#[fg=red][ #[fg=colour154]%H:%M #[fg=colour183]%a %m-%d #[fg=red]] #[fg=blue]:#[fg=cyan]:#[default]"
setw -g window-status-format '#[fg=blue,bold]#I #T#[default] '
set -g status-right "#[fg=red][ #[fg=colour154]%H:%M #[fg=colour183]%a %m-%d #[fg=red]] #[fg=blue]:#[fg=cyan]:#[default]"
setw -g window-status-format '#[fg=white]#I #T#[default] '
setw -g window-status-current-format '#[fg=blue,bold,reverse]#I #T#[default] '
setw -g window-status-bell-attr bold,reverse
setw -g window-status-bell-fg red
setw -g window-status-bell-bg default
setw -g window-status-content-attr bold,reverse
setw -g window-status-content-fg cyan
setw -g window-status-content-bg default
setw -g window-status-activity-attr bold,reverse
setw -g window-status-activity-fg yellow
setw -g window-status-activity-bg default
setw -g window-status-activity-fg white
setw -g window-status-activity-bg red
set -g default-command "reattach-to-user-namespace -l $SHELL"
Loading

0 comments on commit 5520399

Please sign in to comment.