Skip to content

Instantly share code, notes, and snippets.

@joepestro
joepestro / gist:1015827
Created June 9, 2011 01:22
Adds :NERDTreeFindHighlight command to act like TextMate's Reveal in Project
" find, then highlight file
function! NERDTreeFindHighlight()
let s:filename = expand("%:t")
NERDTreeFind
silent! exe "normal /" . s:filename . "/\<CR>"
endfunction
command! NERDTreeFindHighlight call NERDTreeFindHighlight()
@joepestro
joepestro / gist:1022126
Created June 12, 2011 23:29
Playing around with a minimap toggle for vim. When activated, gives an overview of the current window and highlights the text that was in the visible area. Still needs some tweaking.
function! ToggleMinimap()
if exists("s:isMini") && s:isMini == 0
let s:isMini = 1
else
let s:isMini = 0
end
if (s:isMini == 0)
" save current visible lines
let s:firstLine = line("w0")