Alias and vim changes...mostly

This commit is contained in:
Andrew Tomaka 2013-08-05 22:07:01 -04:00
parent 8e8787b2e7
commit 2ab837ae9e
4 changed files with 33 additions and 3 deletions

View file

@ -1,9 +1,13 @@
alias ....="cd ../../.."
alias .....="cd ../../../.."
alias a="ls -l --all" alias a="ls -l --all"
alias agi="sudo apt-get install" alias agi="sudo apt-get install"
alias agl="dpkg --get-selections" alias agl="dpkg --get-selections"
alias agL="dpkg --listfiles" alias agL="dpkg --listfiles"
alias agu="sudo apt-get update && sudo apt-get upgrade" alias agu="sudo apt-get update && sudo apt-get upgrade"
alias al="zsh_stats" alias al="zsh_stats"
alias be="bundle exec"
alias beg="bundle exec guard"
alias ber="bundle exec rake" alias ber="bundle exec rake"
alias c="clear" alias c="clear"
alias g="g" # overwrite g alias in git plugin so function will work alias g="g" # overwrite g alias in git plugin so function will work
@ -13,8 +17,12 @@ alias gcf="git commit --file"
alias gcm="git commit --message" alias gcm="git commit --message"
alias gco="git checkout" alias gco="git checkout"
alias gd="git diff" alias gd="git diff"
alias gfl="git log -u"
alias gl="git log" alias gl="git log"
alias gh="git hist" alias gh="git hist"
alias ghd="git hist-details"
alias gr="git reset"
alias grh="git reset --hard"
alias grm="git rm" alias grm="git rm"
alias gs="git status" alias gs="git status"
alias Grep='grep' alias Grep='grep'
@ -22,6 +30,8 @@ alias l="ls"
alias ll="ls -lv --human-readable --color=auto" alias ll="ls -lv --human-readable --color=auto"
alias ms="tmux -S /tmp/pair && chmod 777 /tmp/pair" alias ms="tmux -S /tmp/pair && chmod 777 /tmp/pair"
alias mw="mux work" alias mw="mux work"
alias rd="popd"
alias sd="pwd | pushd"
alias s="cd ~/Source" alias s="cd ~/Source"
alias sfs="map-sshfs" alias sfs="map-sshfs"
alias sz="source ~/.zshrc" alias sz="source ~/.zshrc"

View file

@ -7,7 +7,8 @@
[apply] [apply]
whitespace = fix whitespace = fix
[alias] [alias]
hist = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative hist = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative
hist-details = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat
[color] [color]
ui = auto ui = auto
[color "branch"] [color "branch"]

19
.vimrc
View file

@ -65,18 +65,26 @@ filetype indent on
map <C-s> <esc>:w<CR> map <C-s> <esc>:w<CR>
imap <C-s> <esc>:w<CR> imap <C-s> <esc>:w<CR>
" Still using arrow keys when in insert mode sometimes
map <Left> <Nop>
map <Right> <Nop>
map <Up> <Nop>
map <Down> <Nop>
" Leaders (whatever that means) " Leaders (whatever that means)
let mapleader = "," let mapleader = ","
map <Leader>bi :BundleInstall<cr> map <Leader>bi :BundleInstall<cr>
map <Leader>lf :call LargeFileToggle()<cr> map <Leader>lf :call LargeFileToggle()<cr>
map <Leader>s :e ~/Source/<cr> map <Leader>s :e ~/Source/<cr>
map <Leader>sa :call RenameFile()<cr>
map <Leader>se :e ~/.vimrc<cr> map <Leader>se :e ~/.vimrc<cr>
map <Leader>sz :so ~/.vimrc<cr> map <Leader>sz :so ~/.vimrc<cr>
map <Leader>t :Tabularize / map <Leader>t :Tabularize /
map <Leader>ts :sp ~/tool-sharpener.txt<cr> map <Leader>ts :sp ~/tool-sharpener.txt<cr>
" Set style " Set style
set t_Co=256
set guifont=Ubuntu\ Mono\ 10 set guifont=Ubuntu\ Mono\ 10
colorscheme vividchalk colorscheme vividchalk
@ -99,3 +107,14 @@ function! LargeFileToggle()
set cursorline! set cursorline!
set cursorcolumn! set cursorcolumn!
endfunction endfunction
" Rename current file - from github/garybernhardt
function! RenameFile()
let old_name = expand('%')
let new_name = input('New file name: ', expand('%'), 'file')
if new_name != '' && new_name != old_name
exec ':saveas ' . new_name
exec ':silent !rm ' . old_name
redraw!
endif
endfunction

4
.zshrc
View file

@ -18,9 +18,9 @@ chpwd() {
} }
# Larger history # Larger history
HISTSIZE=10000 HISTSIZE=20000
HISTFILE=~/.zsh_history HISTFILE=~/.zsh_history
SAVEHIST=10000 SAVEHIST=20000
# Make sure C-s works in vim # Make sure C-s works in vim
stty start undef stty start undef