Cleaner port-forward, 80 char warn in vim

This commit is contained in:
Andrew Tomaka 2013-11-05 17:42:45 -05:00
parent f96b40dbfa
commit 8a68ee3183
3 changed files with 17 additions and 9 deletions

View file

@ -50,10 +50,11 @@ alias sz="source ~/.zshrc"
alias t="tmux"
alias tls="tmux list-sessions"
alias v="vim"
alias vu="vagrant up"
alias vd="vagrant destroy"
alias vh="vagrant halt"
alias vn="vim -u NONE"
alias vp="vagrant provision"
alias vu="vagrant up"
alias vs="vagrant status"
alias vssh="vagrant ssh"
alias w="python -m SimpleHTTPServer"

View file

@ -13,7 +13,11 @@ insert-sudo() {
}
function port-forward {
ssh $1 -R $2":localhost:"$2 -g
if [ $# -lt 2 ]; then
echo Usage: port-forward HOST LOCAL_PORT \[REMOTE_PORT\]
else
ssh $1 -R ${3:-$2}":localhost:"$2 -g
fi
}
function map-sshfs {

17
.vimrc
View file

@ -185,14 +185,17 @@ endfunction
" Set special case colors
function! SetColors()
hi CursorLine cterm=NONE ctermbg=234
hi CursorColumn cterm=NONE ctermbg=234
hi StatusLine ctermfg=white ctermbg=236
hi SignColumn ctermbg=black
hi ColorColumn ctermbg=234
hi IndentGuidesOdd ctermbg=black
hi IndentGuidesEven ctermbg=234
highlight CursorLine cterm=NONE ctermbg=234
highlight CursorColumn cterm=NONE ctermbg=234
highlight StatusLine ctermfg=white ctermbg=236
highlight SignColumn ctermbg=black
highlight ColorColumn ctermbg=234
highlight IndentGuidesOdd ctermbg=black
highlight IndentGuidesEven ctermbg=234
highlight OverLength ctermbg=darkred ctermfg=white guibg=#FFD9D9
endfunction
" Needs to come after SetColors definition
call SetColors()
match OverLength /\%81v.*/