-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.fish
124 lines (102 loc) · 3.19 KB
/
config.fish
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
# Some good tools:
# sudo apt install silverlight-ag
# sudo pip install icdiff
# Remove shit time right prompt in oh-my-fish.
# Override fish_right_prompt function in
# ~/.local/share/omf/themes/default/fish_right_prompt.fish.
function fish_right_prompt
end
# Path to Oh My Fish install.
set -q XDG_DATA_HOME
and set -gx OMF_PATH "$XDG_DATA_HOME/omf"
or set -gx OMF_PATH "$HOME/.local/share/omf"
# Customize Oh My Fish configuration path.
#set -gx OMF_CONFIG "/home/justme0/.config/omf"
# Load oh-my-fish configuration.
# source $OMF_PATH/init.fish
fish_vi_key_bindings
set PATH /sbin /usr/local/sbin /usr/sbin ~/dot-files/bin /usr/local/cuda/bin ~/programs/shapechecker/bin $PATH 2> /dev/null
set -gx C_INCLUDE_PATH /usr/include/x86_64-linux-gnu
set -gx CPLUS_INCLUDE_PATH /usr/include/x86_64-linux-gnu
set -gx LD_LIBRARY_PATH /usr/local/lib
set -gx GDBHISTFILE ~/.gdb_history
set -gx GCC_COLORS 1
#set -gx LLDB /usr/bin/lldb-3.6
set -gx EDITOR vim
set -gx LESS -iR # http://stackoverflow.com/a/26069/1204713
#set -gx PAGER most # apt-get install most
set -gx MANWIDTH 72
#set -gx BROWSER chromium-browser
# YouCompleteMe related
#enable the following when YCM git clone failed
#https://confluence.atlassian.com/stashkb/git-clone-fails-error-rpc-failed-result-56-http-code-200-693897332.html
#set -gx GIT_TRACE_PACKET 1
#set -gx GIT_TRACE 1
#set -gx GIT_CURL_VERBOSE 1
# . /usr/share/autojump/autojump.fish
alias jt='cd ~/programs/test'
alias cp='cp -i'
alias mv='mv -i'
function rm
echo NOTE: `rm` is dangerous. Use `t` or `/bin/rm` instead.
end
alias ll='ls -halF --time-style=long-iso'
alias lt='ls -halF --time-style=long-iso -tr'
alias sf='. ~/dot-files/config.fish'
function e
emacs $argv &
end
alias en='emacs -nw'
function eg
emacs --eval "( gdb \" gdb -i=mi --args $argv \" )" &
end
function eng
emacs -nw --eval "( gdb \" gdb -i=mi --args $argv \" )"
end
alias v='gvim'
alias vi='vim'
# symbolic link is ~/.config/fish/config.fish
alias vf='vi ~/dot-files/config.fish'
alias vv='vi ~/.vimrc'
# shapechecker project related
function m
pushd .
and cd ~/programs/shapechecker/build
and cmake --build . -- -j9
if test $status -eq 0
popd
else
cd ..
false
end
end
alias mt='m; and cd ~/programs/shapechecker/testsuit; and ./test.py'
# git
alias gb='git branch -a'
# NOTE: gc is a command 'graph count'
alias gc='git config -l'
# alias gco='git checkout' # TODO: gco <tab> failed
alias gac='git add --all --verbose; and git commit -v'
alias gg="git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%ai) %C(bold blue)<%an>%Creset' --all"
alias gl='git pull'
alias gs='git status'
alias gd='git diff -w'
function pp
# ps --sort=-pcpu -eo pcpu,comm,pid,user | head -n 11
ps --sort=-pcpu aux | head -n 6
end
if type gvfs-trash > /dev/null 2>&1
alias t='gvfs-trash'
else
# `sudo apt-get install trash-cli
alias t='trash'
# function t
# kioclient move $argv trash:/
# end
end
if type gvfs-tree > /dev/null 2>&1
alias tree='gvfs-tree'
end
git config --global core.excludesfile ~/dot-files/.gitignore_global
ulimit -c unlimited
xmodmap ~/dot-files/.Xmodmap