all: clean up everything
This commit is contained in:
@@ -2,10 +2,8 @@
|
||||
br = branch
|
||||
ca = commit -a
|
||||
cam = commit -am
|
||||
changes = diff --name-status -r
|
||||
cl = clone
|
||||
co = checkout
|
||||
contains = branch --contains
|
||||
cr = codereview
|
||||
df = diff
|
||||
exclude = !sh -c 'echo "$1" >> .git/info/exclude' -
|
||||
@@ -15,23 +13,18 @@
|
||||
lgp = log --pretty=format:'%Cred%h%Creset -- %cn, %cr\t%Cgreen%s%Creset'
|
||||
lol = log --graph --decorate --pretty=oneline --abbrev-commit
|
||||
lola = log --graph --decorate --pretty=oneline --abbrev-commit --all
|
||||
mnc = merge --no-commit
|
||||
oneline = log --oneline --decorate
|
||||
pr = "!f() { git fetch origin pull/$1/head && git checkout FETCH_HEAD; }; f"
|
||||
pl = pull
|
||||
ps = push
|
||||
repourl = config --get remote.origin.url
|
||||
shallow = clone --depth=1
|
||||
st = status
|
||||
staged = diff --cached
|
||||
tags = for-each-ref --sort='*authordate' --format='%(tag)' refs/tags
|
||||
undo = reset --soft HEAD^
|
||||
unpushed = cherry -v
|
||||
update-sub = submodule foreach git pull
|
||||
wdiff = diff --color-words
|
||||
whatrelease = name-rev --name-only
|
||||
who = shortlog -s --
|
||||
wlog = log -p --word-diff=colo
|
||||
wlog = log -p --word-diff=color
|
||||
|
||||
[apply]
|
||||
whitespace = fix
|
||||
|
20
pythonrc
20
pythonrc
@@ -22,22 +22,4 @@ else:
|
||||
sys.ps1 = "2>>> "
|
||||
sys.ps2 = "2... "
|
||||
|
||||
def hijack_prompt():
|
||||
old_except = sys.excepthook
|
||||
|
||||
def new_except(type, value, traceback):
|
||||
name_ = type is NameError and value.args[0] in ["name 'q' is not defined",
|
||||
"name 'e' is not defined"]
|
||||
syntax_ = type is SyntaxError and value.text in [":q\n", ":e\n"]
|
||||
|
||||
if name_ or syntax_:
|
||||
print("Moriturus te saluto.")
|
||||
exit()
|
||||
|
||||
old_except(type, value, traceback)
|
||||
|
||||
sys.excepthook = new_except
|
||||
|
||||
hijack_prompt()
|
||||
|
||||
del readline, histfile, atexit, write_history, sys, os, hijack_prompt
|
||||
del readline, histfile, atexit, write_history, sys, os
|
||||
|
167
vimrc
167
vimrc
@@ -1,9 +1,5 @@
|
||||
" General {{{
|
||||
|
||||
if has('python3')
|
||||
silent! python3 1
|
||||
endif
|
||||
|
||||
" use indentation for folds
|
||||
set foldmethod=indent
|
||||
set foldnestmax=5
|
||||
@@ -34,9 +30,6 @@ set formatprg="PARINIT='rTbgqR B=.,?_A_a Q=_s>|' par\ -w72"
|
||||
" Use stylish haskell instead of par for haskell buffers
|
||||
autocmd FileType haskell let &formatprg="stylish-haskell"
|
||||
|
||||
" Find custom built ghc-mod, codex etc
|
||||
let $PATH = $PATH . ':' . expand("~/.haskell-vim-now/bin")
|
||||
|
||||
" Kill the damned Ex mode.
|
||||
nnoremap Q <nop>
|
||||
|
||||
@@ -90,16 +83,11 @@ Bundle 'eagletmt/neco-ghc'
|
||||
Bundle 'Twinside/vim-hoogle'
|
||||
|
||||
" Other programming languages
|
||||
Bundle 'digitaltoad/vim-jade'
|
||||
Bundle 'zepto-lang/zepto-vim'
|
||||
Bundle 'hellerve/carp-vim'
|
||||
Bundle 'hellerve/luna-vim'
|
||||
Bundle 'tikhomirov/vim-glsl'
|
||||
Plugin 'rust-lang/rust.vim'
|
||||
Plugin 'kchmck/vim-coffee-script'
|
||||
Plugin 'isRuslan/vim-es6'
|
||||
Plugin 'zig-lang/zig.vim'
|
||||
Plugin 'tpope/vim-fireplace'
|
||||
|
||||
" Extra
|
||||
Plugin 'editorconfig/editorconfig-vim'
|
||||
@@ -141,7 +129,7 @@ set whichwrap+=<,>,h,l
|
||||
" Ignore case when searching
|
||||
set ignorecase
|
||||
|
||||
" When searching try to be smart about cases
|
||||
" When searching try to be smart about cases
|
||||
set smartcase
|
||||
|
||||
" Highlight search results
|
||||
@@ -258,11 +246,6 @@ augroup sourcing
|
||||
autocmd bufwritepost .vimrc source $MYVIMRC
|
||||
augroup END
|
||||
|
||||
" Map Ctrl-S to save
|
||||
noremap <silent> <C-S> :update<CR>
|
||||
vnoremap <silent> <C-S> <C-C>:update<CR>
|
||||
inoremap <silent> <C-S> <C-O>:update<CR>
|
||||
|
||||
" Open file prompt with current path
|
||||
nmap <leader>e :e <C-R>=expand("%:p:h") . '/'<CR>
|
||||
|
||||
@@ -323,15 +306,6 @@ noremap <c-k> <c-w>k
|
||||
noremap <c-j> <c-w>j
|
||||
noremap <c-l> <c-w>l
|
||||
|
||||
" Disable highlight when <leader><cr> is pressed
|
||||
" but preserve cursor coloring
|
||||
nmap <silent> <leader><cr> :noh\|hi Cursor guibg=red<cr>
|
||||
augroup haskell
|
||||
autocmd!
|
||||
autocmd FileType haskell map <silent> <leader><cr> :noh<cr>:GhcModTypeClear<cr>:SyntasticReset<cr>
|
||||
autocmd FileType haskell setlocal omnifunc=necoghc#omnifunc
|
||||
augroup END
|
||||
|
||||
" Return to last edit position when opening files (You want this!)
|
||||
augroup last_edit
|
||||
autocmd!
|
||||
@@ -343,33 +317,9 @@ augroup END
|
||||
" Remember info about open buffers on close
|
||||
set viminfo^=%
|
||||
|
||||
" Open window splits in various places
|
||||
nmap <leader>sh :leftabove vnew<CR>
|
||||
nmap <leader>sl :rightbelow vnew<CR>
|
||||
nmap <leader>sk :leftabove new<CR>
|
||||
nmap <leader>sj :rightbelow new<CR>
|
||||
|
||||
" Manually create key mappings (to avoid rebinding C-\)
|
||||
let g:tmux_navigator_no_mappings = 1
|
||||
|
||||
nnoremap <silent> <C-h> :TmuxNavigateLeft<cr>
|
||||
nnoremap <silent> <C-j> :TmuxNavigateDown<cr>
|
||||
nnoremap <silent> <C-k> :TmuxNavigateUp<cr>
|
||||
nnoremap <silent> <C-l> :TmuxNavigateRight<cr>
|
||||
|
||||
" don't close buffers when you aren't displaying them
|
||||
set hidden
|
||||
|
||||
" previous buffer, next buffer
|
||||
nnoremap <leader>bp :bp<cr>
|
||||
nnoremap <leader>bn :bn<cr>
|
||||
|
||||
" delete buffer without closing pane
|
||||
noremap <leader>bd :Bd<cr>
|
||||
|
||||
" fuzzy find buffers
|
||||
noremap <leader>b<space> :CtrlPBuffer<cr>
|
||||
|
||||
" }}}
|
||||
|
||||
" Status line {{{
|
||||
@@ -433,14 +383,6 @@ endfunction
|
||||
|
||||
" }}}
|
||||
|
||||
" Slime {{{
|
||||
|
||||
vmap <silent> <Leader>rs <Plug>SendSelectionToTmux
|
||||
nmap <silent> <Leader>rs <Plug>NormalModeSendToTmux
|
||||
nmap <silent> <Leader>rv <Plug>SetTmuxVars
|
||||
|
||||
" }}}
|
||||
|
||||
" NERDTree {{{
|
||||
|
||||
" Close nerdtree after a file is selected
|
||||
@@ -486,60 +428,6 @@ let g:haskell_tabular = 1
|
||||
|
||||
set tags=tags;/,codex.tags;/
|
||||
|
||||
let g:tagbar_type_haskell = {
|
||||
\ 'ctagsbin' : 'hasktags',
|
||||
\ 'ctagsargs' : '-x -c -o-',
|
||||
\ 'kinds' : [
|
||||
\ 'm:modules:0:1',
|
||||
\ 'd:data: 0:1',
|
||||
\ 'd_gadt: data gadt:0:1',
|
||||
\ 't:type names:0:1',
|
||||
\ 'nt:new types:0:1',
|
||||
\ 'c:classes:0:1',
|
||||
\ 'cons:constructors:1:1',
|
||||
\ 'c_gadt:constructor gadt:1:1',
|
||||
\ 'c_a:constructor accessors:1:1',
|
||||
\ 'ft:function types:1:1',
|
||||
\ 'fi:function implementations:0:1',
|
||||
\ 'o:others:0:1'
|
||||
\ ],
|
||||
\ 'sro' : '.',
|
||||
\ 'kind2scope' : {
|
||||
\ 'm' : 'module',
|
||||
\ 'c' : 'class',
|
||||
\ 'd' : 'data',
|
||||
\ 't' : 'type'
|
||||
\ },
|
||||
\ 'scope2kind' : {
|
||||
\ 'module' : 'm',
|
||||
\ 'class' : 'c',
|
||||
\ 'data' : 'd',
|
||||
\ 'type' : 't'
|
||||
\ }
|
||||
\ }
|
||||
|
||||
" Generate haskell tags with codex and hscope
|
||||
map <leader>tg :!codex update --force<CR>:call system("git hscope -X TemplateHaskell")<CR><CR>:call LoadHscope()<CR>
|
||||
|
||||
map <leader>tt :TagbarToggle<CR>
|
||||
|
||||
set csprg=~/.haskell-vim-now/bin/hscope
|
||||
set csto=1 " search codex tags first
|
||||
set cst
|
||||
set csverb
|
||||
nnoremap <silent> <C-\> :cs find c <C-R>=expand("<cword>")<CR><CR>
|
||||
" Automatically make cscope connections
|
||||
function! LoadHscope()
|
||||
let db = findfile("hscope.out", ".;")
|
||||
if (!empty(db))
|
||||
let path = strpart(db, 0, match(db, "/hscope.out$"))
|
||||
set nocscopeverbose " suppress 'duplicate connection' error
|
||||
exe "cs add " . db . " " . path
|
||||
set cscopeverbose
|
||||
endif
|
||||
endfunction
|
||||
au BufEnter /*.hs call LoadHscope()
|
||||
|
||||
" }}}
|
||||
|
||||
" Git {{{
|
||||
@@ -554,13 +442,6 @@ function! NonintrusiveGitGrep(term)
|
||||
execute "redraw!"
|
||||
endfunction
|
||||
|
||||
command! -nargs=1 GGrep call NonintrusiveGitGrep(<q-args>)
|
||||
nmap <leader>gs :Gstatus<CR>
|
||||
nmap <leader>gg :copen<CR>:GGrep
|
||||
nmap <leader>gl :Extradite!<CR>
|
||||
nmap <leader>gd :Gdiff<CR>
|
||||
nmap <leader>gb :Gblame<CR>
|
||||
|
||||
function! CommittedFiles()
|
||||
" Clear quickfix list
|
||||
let qf_list = []
|
||||
@@ -574,9 +455,6 @@ function! CommittedFiles()
|
||||
call setqflist(qf_list, '')
|
||||
endfunction
|
||||
|
||||
" Show list of last-committed files
|
||||
nnoremap <silent> <leader>g? :call CommittedFiles()<CR>:copen<CR>
|
||||
|
||||
" }}}
|
||||
|
||||
" Haskell Interrogation {{{
|
||||
@@ -586,43 +464,10 @@ set completeopt+=longest
|
||||
" Use buffer words as default tab completion
|
||||
let g:SuperTabDefaultCompletionType = '<c-x><c-p>'
|
||||
|
||||
" But provide (neco-ghc) omnicompletion
|
||||
if has("gui_running")
|
||||
imap <c-space> <c-r>=SuperTabAlternateCompletion("\<lt>c-x>\<lt>c-o>")<cr>
|
||||
else " no gui
|
||||
if has("unix")
|
||||
inoremap <Nul> <c-r>=SuperTabAlternateCompletion("\<lt>c-x>\<lt>c-o>")<cr>
|
||||
endif
|
||||
endif
|
||||
|
||||
" Show types in completion suggestions
|
||||
let g:necoghc_enable_detailed_browse = 1
|
||||
|
||||
" Type of expression under cursor
|
||||
nmap <silent> <leader>ht :GhcModType<CR>
|
||||
" Insert type of expression under cursor
|
||||
nmap <silent> <leader>hT :GhcModTypeInsert<CR>
|
||||
" GHC errors and warnings
|
||||
nmap <silent> <leader>hc :SyntasticCheck ghc_mod<CR>
|
||||
" Haskell Lint
|
||||
let g:syntastic_mode_map = { 'mode': 'active', 'passive_filetypes': ['haskell'] }
|
||||
nmap <silent> <leader>hl :SyntasticCheck hlint<CR>
|
||||
|
||||
" Hoogle the word under the cursor
|
||||
nnoremap <silent> <leader>hh :Hoogle<CR>
|
||||
|
||||
" Hoogle and prompt for input
|
||||
nnoremap <leader>hH :Hoogle
|
||||
|
||||
" Hoogle for detailed documentation (e.g. "Functor")
|
||||
nnoremap <silent> <leader>hi :HoogleInfo<CR>
|
||||
|
||||
" Hoogle for detailed documentation and prompt for input
|
||||
nnoremap <leader>hI :HoogleInfo
|
||||
|
||||
" Hoogle, close the Hoogle window
|
||||
nnoremap <silent> <leader>hz :HoogleClose<CR>
|
||||
|
||||
" }}}
|
||||
|
||||
" Conversion {{{
|
||||
@@ -639,13 +484,5 @@ vnoremap <silent> <leader>h> :call Pointful()<CR>
|
||||
|
||||
" }}}
|
||||
|
||||
" Customization {{{
|
||||
|
||||
if filereadable(expand("~/.vimrc.local"))
|
||||
source ~/.vimrc.local
|
||||
endif
|
||||
|
||||
" }}}
|
||||
|
||||
let g:syntastic_carp_checkers = ['carp']
|
||||
" command Cr !carp -x %
|
||||
command Cr !carp -x %
|
||||
|
56
zshrc
56
zshrc
@@ -38,8 +38,6 @@ export CARP_DIR=$GH_HOME/carp/Carp/
|
||||
export EDITOR=/usr/bin/vim
|
||||
alias dob="git branch --merged | grep -vE '(\*)|(master)|(dev)' | xargs -n 1 git branch -d"
|
||||
alias vi="stty stop '' -ixoff ; stty erase '^?'; vim"
|
||||
#alias gcc="gcc-8"
|
||||
#alias g++="g++-8"
|
||||
alias mk="make"
|
||||
alias g="git"
|
||||
alias virtualenv2="python2.7 /usr/local/lib/python2.7/site-packages/virtualenv.py"
|
||||
@@ -58,7 +56,6 @@ alias cdgo="cd ~/.go/src"
|
||||
alias emptytrash="sudo rm -rfv /Volumes/*/.Trashes; sudo rm -rfv ~/.Trash; sudo rm -rfv /private/var/log/asl/*.asl"
|
||||
alias loc="cloc --read-lang-def=/Users/veitheller/.scripts/cloc.txt *"
|
||||
alias ls="ls -a"
|
||||
alias quit="exit"
|
||||
alias pbclear="echo -n '' | pbcopy"
|
||||
PROMPT="%{$fg[red]%}%n%{$fg[white]%} at %{$fg[green]%}%m%{$fg[white]%}"$'\n'"=> "
|
||||
|
||||
@@ -73,12 +70,6 @@ bindkey "Î" expand-or-complete-with-dots
|
||||
precmd () {print -Pn "\e]2; %~/ \a"}
|
||||
preexec () {print -Pn "\e]2; %~/ \a"}
|
||||
|
||||
insert_sudo () {
|
||||
zle beginning-of-line; zle -U "sudo "
|
||||
}
|
||||
zle -N insert-sudo insert_sudo
|
||||
bindkey "^[s" insert-sudo
|
||||
|
||||
case $TERM in
|
||||
xterm*)
|
||||
precmd(){print -Pn "\e]0;%m: %~\a"}
|
||||
@@ -119,41 +110,6 @@ function rprompt-git-current-branch {
|
||||
RPROMPT='`rprompt-git-current-branch`'
|
||||
RPROMPT+="%{$fg[white]%}in %{$fg[yellow]%}%~%{$reset_color%}"
|
||||
|
||||
extract(){
|
||||
if [ -f $1 ] ; then
|
||||
case $1 in
|
||||
*.tar.bz2) tar xjf $1 ;;
|
||||
*.tar.gz) tar xzf $1 ;;
|
||||
*.tar.xz) tar xzf $1 ;;
|
||||
*.bz2) bunzip2 $1 ;;
|
||||
*.rar) unrar x $1 ;;
|
||||
*.gz) gunzip $1 ;;
|
||||
*.tar) tar xf $1 ;;
|
||||
*.tbz2) tar xjf $1 ;;
|
||||
*.tgz) tar xzf $1 ;;
|
||||
*.zip) if [ -n $2 ] ; then
|
||||
unzip $1 -d $2
|
||||
else
|
||||
unzip $1
|
||||
fi;;
|
||||
*.Z) uncompress $1 ;;
|
||||
*.7z) 7z x $1 ;;
|
||||
*) echo "'$1' cannot be extracted via extract()" ;;
|
||||
esac
|
||||
else
|
||||
echo "'$1' is not a valid file"
|
||||
fi
|
||||
}
|
||||
|
||||
mcd(){
|
||||
mkdir -p $1
|
||||
cd $1
|
||||
}
|
||||
|
||||
pinfo(){
|
||||
top -pid `pgrep $1 | tr "\\n" "," | sed 's/,$//' | sed -e's/,/ -pid /g'`
|
||||
}
|
||||
|
||||
save_dotfiles(){
|
||||
local DOTPATH=~/Documents/Code/Github/.dotfiles/
|
||||
cp -r ~/.scripts ${DOTPATH}
|
||||
@@ -183,18 +139,6 @@ massif() {
|
||||
valgrind --tool=massif --massif-out-file=massif.prof $1 && ms_print massif.prof | less
|
||||
}
|
||||
|
||||
upgrade() {
|
||||
if [ -x /usr/local/bin/brew ] ; then
|
||||
brew update
|
||||
brew upgrade --all
|
||||
brew cleanup
|
||||
fi
|
||||
}
|
||||
|
||||
function tree(){
|
||||
find . | sed -e 's/[^\/]*\//|--/g' -e 's/-- |/ |/g' | $PAGER
|
||||
}
|
||||
|
||||
###-begin-npm-completion-###
|
||||
#
|
||||
# npm command completion script
|
||||
|
Reference in New Issue
Block a user