diff --git a/dot.vimrc b/dot.vimrc index 9bc55b9..9431386 100644 --- a/dot.vimrc +++ b/dot.vimrc @@ -279,6 +279,9 @@ func! DeleteTrailingWS() endfunc autocmd BufWrite *.py :call DeleteTrailingWS() autocmd BufWrite *.coffee :call DeleteTrailingWS() +autocmd BufWrite *.rb :call DeleteTrailingWS() +autocmd BufWrite *.c :call DeleteTrailingWS() +autocmd BufWrite *.xml :call DeleteTrailingWS() """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" @@ -343,6 +346,14 @@ map pp :setlocal paste! set colorcolumn=20 +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" => Regex +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" Force using the old regex engine. +" Canonical ruby gives the new engine a hard time - its slow! +set re=1 + + """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " => Helper functions """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" diff --git a/dot.zshrc b/dot.zshrc index 380a4d4..444a424 100644 --- a/dot.zshrc +++ b/dot.zshrc @@ -86,4 +86,15 @@ source $ZSH/oh-my-zsh.sh # ############################ alias open="open_command" alias vim="gvim -v" -# alias ohmyzsh="mate ~/.oh-my-zsh" + +function ws-replace { + sed --in-place 's/[[:space:]]\+$//' $1 +} +function ws-rreplace { + find $1 -type f -exec sed --in-place 's/[[:space:]]\+$//' {} \+ +} + +# functions +function gui { + javaws http://$1/mcs-gui/mcs-gui.jnlp\?user\=meos +}