Forked peepopen
This commit is contained in:
parent
0f81530f8f
commit
3052a646e0
5 changed files with 95 additions and 4 deletions
3
.gitmodules
vendored
3
.gitmodules
vendored
|
@ -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
|
||||
|
|
0
sources_forked/vim-peepopen/README
Normal file
0
sources_forked/vim-peepopen/README
Normal file
38
sources_forked/vim-peepopen/README.md
Normal file
38
sources_forked/vim-peepopen/README.md
Normal file
|
@ -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
|
||||
-----
|
||||
|
||||
`<Leader>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/).
|
||||
|
57
sources_forked/vim-peepopen/plugin/peepopen.vim
Normal file
57
sources_forked/vim-peepopen/plugin/peepopen.vim
Normal file
|
@ -0,0 +1,57 @@
|
|||
" plugin/peepopen.vim
|
||||
" Author: Geoffrey Grosenbach <boss@topfunky.com>
|
||||
" 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=<nop>
|
||||
" map <D-t> <Plug>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 <SID>LaunchPeepOpenViaVim()
|
||||
command! PeepQuit :call <SID>QuitPeepOpenViaVim()
|
||||
|
||||
if has('autocmd') && exists('g:peepopen_quit') && g:peepopen_quit
|
||||
au VimLeave * :call <SID>QuitPeepOpenViaVim()
|
||||
endif
|
||||
|
||||
noremap <unique> <script> <Plug>PeepOpen <SID>Launch
|
||||
noremap <SID>Launch :call <SID>LaunchPeepOpenViaVim()<CR>
|
||||
|
||||
if !hasmapto('<Plug>PeepOpen')
|
||||
map! <unique> <silent> <Leader>p <Plug>PeepOpen
|
||||
endif
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim:set sw=2 sts=2:
|
||||
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 7d488a2e5368c02912d427e2fd9e351bb7afc998
|
Loading…
Reference in a new issue