# HG changeset patch # User Steve Losh # Date 1325775413 18000 # Node ID 2f979e8ca55a5154866e2ea783df3fd77797333e # Parent 06ac480f974483da9e88c12dedc266e35d6a47c3 Moar. diff -r 06ac480f9744 -r 2f979e8ca55a vim/.vimrc --- a/vim/.vimrc Tue Jan 03 18:40:19 2012 -0500 +++ b/vim/.vimrc Thu Jan 05 09:56:53 2012 -0500 @@ -86,6 +86,19 @@ " Resize splits when the window is resized au VimResized * exe "normal! \=" +" Line Return {{{ + +" Make sure Vim returns to the same line when you reopen a file. +" Thanks, Amit +augroup line_return + au! + au BufReadPost * + \ if line("'\"") > 0 && line("'\"") <= line("$") | + \ execute 'normal! g`"zvzz' | + \ endif +augroup END + +" }}} " Tabs, spaces, wrapping {{{ set tabstop=4 @@ -214,8 +227,8 @@ " Keep search matches in the middle of the window and pulse the line when moving " to them. -nnoremap n nzzzv:call PulseCursorLine() -nnoremap N Nzzzv:call PulseCursorLine() +nnoremap n nzzzv +nnoremap N Nzzzv " Don't move on * nnoremap * * @@ -1546,54 +1559,3 @@ command! NyanMe call NyanMe() " }}} -" Pulse ------------------------------------------------------------------- {{{ - -function! PulseCursorLine() - let current_window = winnr() - - windo set nocursorline - execute current_window . 'wincmd w' - - setlocal cursorline - - redir => old_hi - silent execute 'hi CursorLine' - redir END - let old_hi = split(old_hi, '\n')[0] - let old_hi = substitute(old_hi, 'xxx', '', '') - - hi CursorLine guibg=#2a2a2a ctermbg=233 - redraw - sleep 20m - - hi CursorLine guibg=#333333 ctermbg=235 - redraw - sleep 20m - - hi CursorLine guibg=#3a3a3a ctermbg=237 - redraw - sleep 20m - - hi CursorLine guibg=#444444 ctermbg=239 - redraw - sleep 20m - - hi CursorLine guibg=#3a3a3a ctermbg=237 - redraw - sleep 20m - - hi CursorLine guibg=#333333 ctermbg=235 - redraw - sleep 20m - - hi CursorLine guibg=#2a2a2a ctermbg=233 - redraw - sleep 20m - - execute 'hi ' . old_hi - - windo set cursorline - execute current_window . 'wincmd w' -endfunction - -" }}} diff -r 06ac480f9744 -r 2f979e8ca55a zsh/misc.zsh --- a/zsh/misc.zsh Tue Jan 03 18:40:19 2012 -0500 +++ b/zsh/misc.zsh Thu Jan 05 09:56:53 2012 -0500 @@ -90,3 +90,7 @@ alias collapse="sed -e 's/ */ /g'" alias cuts="cut -d' '" alias clc="./get-last-commit-url.py | pbc" + +function psg() { + ps auxww | grep --color=always $* | grep -v grep | collapse | cuts -f 2,11- +}