From 3052a646e09e18dd834ea1b8e128d67a7fd6d805 Mon Sep 17 00:00:00 2001 From: amix Date: Tue, 29 May 2012 16:30:21 -0400 Subject: [PATCH] Forked peepopen --- .gitmodules | 3 - sources_forked/vim-peepopen/README | 0 sources_forked/vim-peepopen/README.md | 38 +++++++++++++ .../vim-peepopen/plugin/peepopen.vim | 57 +++++++++++++++++++ sources_plugins/vim-peepopen | 1 - 5 files changed, 95 insertions(+), 4 deletions(-) create mode 100644 sources_forked/vim-peepopen/README create mode 100644 sources_forked/vim-peepopen/README.md create mode 100644 sources_forked/vim-peepopen/plugin/peepopen.vim delete mode 160000 sources_plugins/vim-peepopen diff --git a/.gitmodules b/.gitmodules index 9e3af391..1f48dcae 100644 --- a/.gitmodules +++ b/.gitmodules @@ -49,9 +49,6 @@ [submodule "sources_plugins/ctrlp.vim"] path = sources_plugins/ctrlp.vim url = git://github.com/kien/ctrlp.vim.git -[submodule "sources_plugins/vim-peepopen"] - path = sources_plugins/vim-peepopen - url = git://github.com/shemerey/vim-peepopen.git [submodule "sources_misc/vim-bundle-mako"] path = sources_misc/vim-bundle-mako url = git://github.com/sophacles/vim-bundle-mako.git diff --git a/sources_forked/vim-peepopen/README b/sources_forked/vim-peepopen/README new file mode 100644 index 00000000..e69de29b diff --git a/sources_forked/vim-peepopen/README.md b/sources_forked/vim-peepopen/README.md new file mode 100644 index 00000000..290acee8 --- /dev/null +++ b/sources_forked/vim-peepopen/README.md @@ -0,0 +1,38 @@ +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](https://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) + +### Options +Automatically quit PeepOpen when Vim exits. + +`let p:peepopen_quit = 1` + +Credits +------- + +- Initial Vim Plugin by [Andrew Stewart](http://www.airbladesoftware.com/). +- Some plugin boilerplate from [Rein Henrichs](http://reinh.com/). + diff --git a/sources_forked/vim-peepopen/plugin/peepopen.vim b/sources_forked/vim-peepopen/plugin/peepopen.vim new file mode 100644 index 00000000..eadb413e --- /dev/null +++ b/sources_forked/vim-peepopen/plugin/peepopen.vim @@ -0,0 +1,57 @@ +" 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 + +if !exists('g:peepopen_quit') + let g:peepopen_quit = 0 +endif + +function s:LaunchPeepOpenViaVim() + silent exe "!open -a PeepOpen " . shellescape(getcwd()) + redraw! +endfunction + +function s:QuitPeepOpenViaVim() + silent exe '!ps ax | grep PeepOpen | grep -v grep | awk "{ print $1 }" | xargs kill -QUIT' +endfunction + +command! PeepOpen :call LaunchPeepOpenViaVim() +command! PeepQuit :call QuitPeepOpenViaVim() + +if has('autocmd') && exists('g:peepopen_quit') && g:peepopen_quit + au VimLeave * :call QuitPeepOpenViaVim() +endif + +noremap