# HG changeset patch # User Steve Losh # Date 1276031485 14400 # Node ID 5a0b9ffa6b9178d3995f170e94f16ac09f1f2911 # Parent df2e92b1e5f0e2c3028abdcabc035d55017d31e0 vim: use peepopen diff -r df2e92b1e5f0 -r 5a0b9ffa6b91 vim/bundle/vim-peepopen/README.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/vim/bundle/vim-peepopen/README.md Tue Jun 08 17:11:25 2010 -0400 @@ -0,0 +1,33 @@ +vim-peepopen +============= + +A plugin for the Vim text editor. PeepOpen provides fuzzy search of filenames and paths in a programming project. + +Installation +------------ + +Get the PeepOpen.app and open it at least once to approve the Mac OS X security dialog. + +Standard: + +Copy `peepopen.vim` to your `~/.vim/plugin` directory. + +With Tim Pope's [Pathogen](http://github.com/tpope/vim-pathogen): + +Copy the entire `vim-peepopen` plugin directory to your `~/.vim/bundle` directory. + +Usage +----- + +`p` opens the current project directory with the PeepOpen application. + +Use the [vim-rooter](http://github.com/airblade/vim-rooter) plugin for automatic assignment of the current working directory for projects stored in Git. + +(Leader is mapped to '\' by default) + +Credits +------- + +- Initial Vim Plugin by [Andrew Stewart](http://www.airbladesoftware.com/). +- Some plugin boilerplate from [Rein Henrichs](http://reinh.com/). + diff -r df2e92b1e5f0 -r 5a0b9ffa6b91 vim/bundle/vim-peepopen/plugin/peepopen.vim --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/vim/bundle/vim-peepopen/plugin/peepopen.vim Tue Jun 08 17:11:25 2010 -0400 @@ -0,0 +1,44 @@ +" plugin/peepopen.vim +" Author: Geoffrey Grosenbach +" License: MIT License + +" Install this file as plugin/peepopen.vim. + +" If you prefer Command-T, use this snippet in your .gvimrc: + +" if has("gui_macvim") +" macmenu &File.New\ Tab key= +" map PeepOpen +" end + +" ============================================================================ + +" Exit quickly when: +" - this plugin was already loaded (or disabled) +" - when 'compatible' is set +if &cp || exists("g:peepopen_loaded") && g:peepopen_loaded + finish +endif +let g:peepopen_loaded = 1 + +let s:save_cpo = &cpo +set cpo&vim + +function s:LaunchPeepOpenViaVim() + let cwd = getcwd() + silent exe "!open -a PeepOpen " . shellescape(cwd) +endfunction + +command! PeepOpen :call LaunchPeepOpenViaVim() + +noremap