1
0
mirror of https://github.com/gryf/.vim.git synced 2026-02-28 23:05:48 +01:00

- updated FuzzyFinder

- moved Pydoc to ftplugin/python
- updated pyflakes
- added Pygments feature into rst functions
This commit is contained in:
2010-11-15 18:45:27 +01:00
parent 53ddc03045
commit 442a6ab74e
29 changed files with 1779 additions and 1147 deletions

View File

@@ -1,13 +1,12 @@
"=============================================================================
" Copyright (c) 2007-2009 Takeshi NISHIDA
" Copyright (c) 2007-2010 Takeshi NISHIDA
"
"=============================================================================
" LOAD GUARD {{{1
if exists('g:loaded_autoload_fuf_dir') || v:version < 702
if !l9#guardScriptLoading(expand('<sfile>:p'), 0, 0, [])
finish
endif
let g:loaded_autoload_fuf_dir = 1
" }}}1
"=============================================================================
@@ -23,6 +22,11 @@ function fuf#dir#getSwitchOrder()
return g:fuf_dir_switchOrder
endfunction
"
function fuf#dir#getEditableDataNames()
return []
endfunction
"
function fuf#dir#renewCache()
let s:cache = {}
@@ -35,9 +39,9 @@ endfunction
"
function fuf#dir#onInit()
call fuf#defineLaunchCommand('FufDir' , s:MODE_NAME, '""')
call fuf#defineLaunchCommand('FufDirWithFullCwd' , s:MODE_NAME, 'fnamemodify(getcwd(), '':p'')')
call fuf#defineLaunchCommand('FufDirWithCurrentBufferDir', s:MODE_NAME, 'expand(''%:~:.'')[:-1-len(expand(''%:~:.:t''))]')
call fuf#defineLaunchCommand('FufDir' , s:MODE_NAME, '""', [])
call fuf#defineLaunchCommand('FufDirWithFullCwd' , s:MODE_NAME, 'fnamemodify(getcwd(), '':p'')', [])
call fuf#defineLaunchCommand('FufDirWithCurrentBufferDir', s:MODE_NAME, 'expand(''%:~:.'')[:-1-len(expand(''%:~:.:t''))]', [])
endfunction
" }}}1
@@ -48,7 +52,7 @@ let s:MODE_NAME = expand('<sfile>:t:r')
"
function s:enumItems(dir)
let key = getcwd() . g:fuf_dir_exclude . "\n" . a:dir
let key = getcwd() . g:fuf_ignoreCase . g:fuf_dir_exclude . "\n" . a:dir
if !exists('s:cache[key]')
let s:cache[key] = fuf#enumExpandedDirsEntries(a:dir, g:fuf_dir_exclude)
call filter(s:cache[key], 'v:val.word =~# ''[/\\]$''')
@@ -74,7 +78,7 @@ endfunction
"
function s:handler.getPrompt()
return fuf#formatPrompt(g:fuf_dir_prompt, self.partialMatching)
return fuf#formatPrompt(g:fuf_dir_prompt, self.partialMatching, '')
endfunction
"
@@ -83,8 +87,8 @@ function s:handler.getPreviewHeight()
endfunction
"
function s:handler.targetsPath()
return 1
function s:handler.isOpenable(enteredPattern)
return a:enteredPattern =~# '[^/\\]$'
endfunction
"
@@ -96,7 +100,7 @@ endfunction
"
function s:handler.makePreviewLines(word, count)
return fuf#makePreviewLinesAround(
\ split(glob(fnamemodify(a:word, ':p') . '*'), "\n"),
\ fuf#glob(fnamemodify(a:word, ':p') . '*'),
\ [], a:count, self.getPreviewHeight())
return
endfunction