--- 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! \<c-w>="
+" 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()<cr>
-nnoremap N Nzzzv:call PulseCursorLine()<cr>
+nnoremap n nzzzv
+nnoremap N Nzzzv
" Don't move on *
nnoremap * *<c-o>
@@ -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
-
-" }}}
--- 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-
+}