1
0
mirror of https://github.com/gryf/.vim.git synced 2025-12-17 11:30:29 +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

2
.vimrc
View File

@@ -15,7 +15,7 @@ set fileformats=unix,dos "Type of <EOL> in written files
set formatoptions=croqw "Automatic formatting settings
set hidden "Keep hidden windows
set history=1000 "Keep 1000 lines of command line history
set ignorecase "Ignore case in search patterns
"set ignorecase "Ignore case in search patterns
set laststatus=2 "Always show statusbar
set lazyredraw "Don't update screen while executing macros

View File

@@ -3,12 +3,12 @@ ScriptID SourceID Filename
### plugins
102 13435 DirDiff.vim
#2754 13139 :AutoInstall: delimitMate.vim
1984 11852 fuzzyfinder.vim
1984 13961 fuzzyfinder.vim
311 7645 grep.vim
2727 11120 jsbeautify.vim
2666 13424 Mark
2262 8944 occur.vim
910 13092 pydoc.vim
910 14079 pydoc.vim
#2421 9423 pysmell.vim
152 3342 showmarks.vim
2540 11006 snipMate.vim
@@ -25,7 +25,7 @@ ScriptID SourceID Filename
# compiler
891 10365 pylint.vim
# ftplugin
2441 13378 pyflakes.vim
2441 14215 pyflakes.vim
30 9196 python_fn.vim
### indent
1936 7708 javascript.vim
@@ -33,4 +33,5 @@ ScriptID SourceID Filename
# changes doesn't put it on vim.org scripts. it can be (still) found on
# http://monkey.org/~caz/python.vim
### syntax
790 12805 python.vim
790 14268 python.vim
1984 13961 :AutoInstall: FuzzyFinder

File diff suppressed because it is too large Load Diff

View File

@@ -1,211 +0,0 @@
"=============================================================================
" Copyright (c) 2007-2009 Takeshi NISHIDA
"
"=============================================================================
" LOAD GUARD {{{1
if exists('g:loaded_autoload_fuf_bookmark') || v:version < 702
finish
endif
let g:loaded_autoload_fuf_bookmark = 1
" }}}1
"=============================================================================
" GLOBAL FUNCTIONS {{{1
"
function fuf#bookmark#createHandler(base)
return a:base.concretize(copy(s:handler))
endfunction
"
function fuf#bookmark#getSwitchOrder()
return g:fuf_bookmark_switchOrder
endfunction
"
function fuf#bookmark#renewCache()
endfunction
"
function fuf#bookmark#requiresOnCommandPre()
return 0
endfunction
"
function fuf#bookmark#onInit()
call fuf#defineLaunchCommand('FufBookmark', s:MODE_NAME, '""')
command! -bang -narg=? FufAddBookmark call s:bookmarkHere(<q-args>)
command! -bang -narg=0 -range FufAddBookmarkAsSelectedText call s:bookmarkHere(s:getSelectedText())
endfunction
" }}}1
"=============================================================================
" LOCAL FUNCTIONS/VARIABLES {{{1
let s:MODE_NAME = expand('<sfile>:t:r')
let s:OPEN_TYPE_DELETE = -1
"
function s:getSelectedText()
let reg_ = [@", getregtype('"')]
let regA = [@a, getregtype('a')]
if mode() =~# "[vV\<C-v>]"
silent normal! "aygv
else
let pos = getpos('.')
silent normal! gv"ay
call setpos('.', pos)
endif
let text = @a
call setreg('"', reg_[0], reg_[1])
call setreg('a', regA[0], regA[1])
return text
endfunction
" opens a:path and jumps to the line matching to a:pattern from a:lnum within
" a:range. if not found, jumps to a:lnum.
function s:jumpToBookmark(path, mode, pattern, lnum)
call fuf#openFile(a:path, a:mode, g:fuf_reuseWindow)
call cursor(s:getMatchingLineNumber(getline(1, '$'), a:pattern, a:lnum), 0)
normal! zvzz
endfunction
"
function s:getMatchingLineNumber(lines, pattern, lnumBegin)
let l = min([a:lnumBegin, len(a:lines)])
for [l0, l1] in map(range(0, g:fuf_bookmark_searchRange),
\ '[l + v:val, l - v:val]')
if l0 <= len(a:lines) && a:lines[l0 - 1] =~# a:pattern
return l0
elseif l1 >= 0 && a:lines[l1 - 1] =~# a:pattern
return l1
endif
endfor
return l
endfunction
"
function s:getLinePattern(lnum)
return '\C\V\^' . escape(getline(a:lnum), '\') . '\$'
endfunction
"
function s:bookmarkHere(word)
if !empty(&buftype) || expand('%') !~ '\S'
call fuf#echoWithHl('Can''t bookmark this buffer.', 'WarningMsg')
return
endif
let item = {
\ 'word' : (a:word =~# '\S' ? substitute(a:word, '\n', ' ', 'g')
\ : pathshorten(expand('%:p:~')) . '|' . line('.') . '| ' . getline('.')),
\ 'path' : expand('%:p'),
\ 'lnum' : line('.'),
\ 'pattern' : s:getLinePattern(line('.')),
\ 'time' : localtime(),
\ }
let item.word = fuf#inputHl('Bookmark as:', item.word, 'Question')
if item.word !~ '\S'
call fuf#echoWithHl('Canceled', 'WarningMsg')
return
endif
let info = fuf#loadInfoFile(s:MODE_NAME)
call insert(info.data, item)
call fuf#saveInfoFile(s:MODE_NAME, info)
endfunction
"
function s:findItem(items, word)
for item in a:items
if item.word ==# a:word
return item
endif
endfor
return {}
endfunction
" }}}1
"=============================================================================
" s:handler {{{1
let s:handler = {}
"
function s:handler.getModeName()
return s:MODE_NAME
endfunction
"
function s:handler.getPrompt()
return fuf#formatPrompt(g:fuf_bookmark_prompt, self.partialMatching)
endfunction
"
function s:handler.getPreviewHeight()
return g:fuf_previewHeight
endfunction
"
function s:handler.targetsPath()
return 0
endfunction
"
function s:handler.makePatternSet(patternBase)
return fuf#makePatternSet(a:patternBase, 's:interpretPrimaryPatternForNonPath',
\ self.partialMatching)
endfunction
"
function s:handler.makePreviewLines(word, count)
let item = s:findItem(self.info.data, a:word)
let lines = fuf#getFileLines(item.path)
if empty(lines)
return []
endif
let index = s:getMatchingLineNumber(lines, item.pattern, item.lnum) - 1
return fuf#makePreviewLinesAround(
\ lines, [index], a:count, self.getPreviewHeight())
endfunction
"
function s:handler.getCompleteItems(patternPrimary)
return self.items
endfunction
"
function s:handler.onOpen(word, mode)
if a:mode == s:OPEN_TYPE_DELETE
call filter(self.info.data, 'v:val.word !=# a:word')
call fuf#saveInfoFile(s:MODE_NAME, self.info)
call fuf#launch(s:MODE_NAME, self.lastPattern, self.partialMatching)
return
else
let item = s:findItem(self.info.data, a:word)
if !empty(item)
call s:jumpToBookmark(item.path, a:mode, item.pattern, item.lnum)
endif
endif
endfunction
"
function s:handler.onModeEnterPre()
endfunction
"
function s:handler.onModeEnterPost()
call fuf#defineKeyMappingInHandler(g:fuf_bookmark_keyDelete,
\ 'onCr(' . s:OPEN_TYPE_DELETE . ', 0)')
let self.items = copy(self.info.data)
call map(self.items, 'fuf#makeNonPathItem(v:val.word, strftime(g:fuf_timeFormat, v:val.time))')
call fuf#mapToSetSerialIndex(self.items, 1)
call map(self.items, 'fuf#setAbbrWithFormattedWord(v:val, 1)')
endfunction
"
function s:handler.onModeLeavePost(opened)
endfunction
" }}}1
"=============================================================================
" vim: set fdm=marker:

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_buffer') || v:version < 702
if !l9#guardScriptLoading(expand('<sfile>:p'), 0, 0, [])
finish
endif
let g:loaded_autoload_fuf_buffer = 1
" }}}1
"=============================================================================
@@ -23,6 +22,11 @@ function fuf#buffer#getSwitchOrder()
return g:fuf_buffer_switchOrder
endfunction
"
function fuf#buffer#getEditableDataNames()
return []
endfunction
"
function fuf#buffer#renewCache()
endfunction
@@ -34,7 +38,7 @@ endfunction
"
function fuf#buffer#onInit()
call fuf#defineLaunchCommand('FufBuffer', s:MODE_NAME, '""')
call fuf#defineLaunchCommand('FufBuffer', s:MODE_NAME, '""', [])
augroup fuf#buffer
autocmd!
autocmd BufEnter * call s:updateBufTimes()
@@ -47,6 +51,7 @@ endfunction
" LOCAL FUNCTIONS/VARIABLES {{{1
let s:MODE_NAME = expand('<sfile>:t:r')
let s:OPEN_TYPE_DELETE = -1
let s:bufTimes = {}
@@ -59,7 +64,7 @@ endfunction
function s:makeItem(nr)
let fname = (empty(bufname(a:nr))
\ ? '[No Name]'
\ : fnamemodify(bufname(a:nr), ':~:.'))
\ : fnamemodify(bufname(a:nr), ':p:~:.'))
let time = (exists('s:bufTimes[a:nr]') ? s:bufTimes[a:nr] : 0)
let item = fuf#makePathItem(fname, strftime(g:fuf_timeFormat, time), 0)
let item.index = a:nr
@@ -110,7 +115,7 @@ endfunction
"
function s:handler.getPrompt()
return fuf#formatPrompt(g:fuf_buffer_prompt, self.partialMatching)
return fuf#formatPrompt(g:fuf_buffer_prompt, self.partialMatching, '')
endfunction
"
@@ -119,7 +124,7 @@ function s:handler.getPreviewHeight()
endfunction
"
function s:handler.targetsPath()
function s:handler.isOpenable(enteredPattern)
return 1
endfunction
@@ -147,7 +152,12 @@ endfunction
function s:handler.onOpen(word, mode)
" not use bufnr(a:word) in order to handle unnamed buffer
let item = s:findItem(self.items, a:word)
if !empty(item)
if empty(item)
" do nothing
elseif a:mode ==# s:OPEN_TYPE_DELETE
execute item.bufNr . 'bdelete'
let self.reservedMode = self.getModeName()
else
call fuf#openBuffer(item.bufNr, a:mode, g:fuf_reuseWindow)
endif
endfunction
@@ -158,11 +168,14 @@ endfunction
"
function s:handler.onModeEnterPost()
let self.items = map(filter(range(1, bufnr('$')),
\ 'buflisted(v:val) && v:val != self.bufNrPrev'),
\ 's:makeItem(v:val)')
call fuf#defineKeyMappingInHandler(g:fuf_buffer_keyDelete,
\ 'onCr(' . s:OPEN_TYPE_DELETE . ')')
let self.items = range(1, bufnr('$'))
call filter(self.items, 'buflisted(v:val) && v:val != self.bufNrPrev && v:val != bufnr("%")')
call map(self.items, 's:makeItem(v:val)')
if g:fuf_buffer_mruOrder
call fuf#mapToSetSerialIndex(sort(self.items, 's:compareTimeDescending'), 1)
call sort(self.items, 's:compareTimeDescending')
call fuf#mapToSetSerialIndex(self.items, 1)
endif
let self.items = fuf#mapToSetAbbrWithSnippedWordAsPath(self.items)
endfunction

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_callbackfile') || v:version < 702
if !l9#guardScriptLoading(expand('<sfile>:p'), 0, 0, [])
finish
endif
let g:loaded_autoload_fuf_callbackfile = 1
" }}}1
"=============================================================================
@@ -23,6 +22,11 @@ function fuf#callbackfile#getSwitchOrder()
return -1
endfunction
"
function fuf#callbackfile#getEditableDataNames()
return []
endfunction
"
function fuf#callbackfile#renewCache()
let s:cache = {}
@@ -53,7 +57,7 @@ let s:MODE_NAME = expand('<sfile>:t:r')
"
function s:enumItems(dir)
let key = getcwd() . s:exclude . "\n" . a:dir
let key = getcwd() . g:fuf_ignoreCase . s:exclude . "\n" . a:dir
if !exists('s:cache[key]')
let s:cache[key] = fuf#enumExpandedDirsEntries(a:dir, s:exclude)
if isdirectory(a:dir)
@@ -78,7 +82,7 @@ endfunction
"
function s:handler.getPrompt()
return fuf#formatPrompt(s:prompt, self.partialMatching)
return fuf#formatPrompt(s:prompt, self.partialMatching, '')
endfunction
"
@@ -87,8 +91,8 @@ function s:handler.getPreviewHeight()
endfunction
"
function s:handler.targetsPath()
return 1
function s:handler.isOpenable(enteredPattern)
return a:enteredPattern =~# '[^/\\]$'
endfunction
"
@@ -123,7 +127,7 @@ endfunction
"
function s:handler.onModeLeavePost(opened)
if !a:opened
if !a:opened && exists('s:listener.onAbort()')
call s:listener.onAbort()
endif
endfunction

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_callbackitem') || v:version < 702
if !l9#guardScriptLoading(expand('<sfile>:p'), 0, 0, [])
finish
endif
let g:loaded_autoload_fuf_callbackitem = 1
" }}}1
"=============================================================================
@@ -23,6 +22,11 @@ function fuf#callbackitem#getSwitchOrder()
return -1
endfunction
"
function fuf#callbackitem#getEditableDataNames()
return []
endfunction
"
function fuf#callbackitem#renewCache()
endfunction
@@ -73,7 +77,7 @@ endfunction
"
function s:handler.getPrompt()
return fuf#formatPrompt(s:prompt, self.partialMatching)
return fuf#formatPrompt(s:prompt, self.partialMatching, '')
endfunction
"
@@ -85,8 +89,8 @@ function s:handler.getPreviewHeight()
endfunction
"
function s:handler.targetsPath()
return s:forPath
function s:handler.isOpenable(enteredPattern)
return 1
endfunction
"
@@ -125,7 +129,7 @@ endfunction
"
function s:handler.onModeLeavePost(opened)
if !a:opened
if !a:opened && exists('s:listener.onAbort()')
call s:listener.onAbort()
endif
endfunction

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_changelist') || v:version < 702
if !l9#guardScriptLoading(expand('<sfile>:p'), 0, 0, [])
finish
endif
let g:loaded_autoload_fuf_changelist = 1
" }}}1
"=============================================================================
@@ -23,6 +22,11 @@ function fuf#changelist#getSwitchOrder()
return g:fuf_changelist_switchOrder
endfunction
"
function fuf#changelist#getEditableDataNames()
return []
endfunction
"
function fuf#changelist#renewCache()
endfunction
@@ -34,7 +38,7 @@ endfunction
"
function fuf#changelist#onInit()
call fuf#defineLaunchCommand('FufChangeList', s:MODE_NAME, '""')
call fuf#defineLaunchCommand('FufChangeList', s:MODE_NAME, '""', [])
endfunction
" }}}1
@@ -91,7 +95,7 @@ endfunction
"
function s:handler.getPrompt()
return fuf#formatPrompt(g:fuf_changelist_prompt, self.partialMatching)
return fuf#formatPrompt(g:fuf_changelist_prompt, self.partialMatching, '')
endfunction
"
@@ -100,8 +104,8 @@ function s:handler.getPreviewHeight()
endfunction
"
function s:handler.targetsPath()
return 0
function s:handler.isOpenable(enteredPattern)
return 1
endfunction
"

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

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_file') || v:version < 702
if !l9#guardScriptLoading(expand('<sfile>:p'), 0, 0, [])
finish
endif
let g:loaded_autoload_fuf_file = 1
" }}}1
"=============================================================================
@@ -23,6 +22,11 @@ function fuf#file#getSwitchOrder()
return g:fuf_file_switchOrder
endfunction
"
function fuf#file#getEditableDataNames()
return []
endfunction
"
function fuf#file#renewCache()
let s:cache = {}
@@ -35,9 +39,9 @@ endfunction
"
function fuf#file#onInit()
call fuf#defineLaunchCommand('FufFile' , s:MODE_NAME, '""')
call fuf#defineLaunchCommand('FufFileWithFullCwd' , s:MODE_NAME, 'fnamemodify(getcwd(), '':p'')')
call fuf#defineLaunchCommand('FufFileWithCurrentBufferDir', s:MODE_NAME, 'expand(''%:~:.'')[:-1-len(expand(''%:~:.:t''))]')
call fuf#defineLaunchCommand('FufFile' , s:MODE_NAME, '""', [])
call fuf#defineLaunchCommand('FufFileWithFullCwd' , s:MODE_NAME, 'fnamemodify(getcwd(), '':p'')', [])
call fuf#defineLaunchCommand('FufFileWithCurrentBufferDir', 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_file_exclude . "\n" . a:dir
let key = join([getcwd(), g:fuf_ignoreCase, g:fuf_file_exclude, a:dir], "\n")
if !exists('s:cache[key]')
let s:cache[key] = fuf#enumExpandedDirsEntries(a:dir, g:fuf_file_exclude)
call fuf#mapToSetSerialIndex(s:cache[key], 1)
@@ -58,15 +62,13 @@ function s:enumItems(dir)
endfunction
"
function s:enumNonCurrentItems(dir, bufNr, cache)
function s:enumNonCurrentItems(dir, bufNrPrev, cache)
let key = a:dir . 'AVOIDING EMPTY KEY'
if !exists('a:cache[key]')
" NOTE: filtering should be done with
" 'bufnr("^" . v:val.word . "$") != a:bufNr'.
" But it takes a lot of time!
let bufName = bufname(a:bufNr)
" NOTE: Comparing filenames is faster than bufnr('^' . fname . '$')
let bufNamePrev = bufname(a:bufNrPrev)
let a:cache[key] =
\ filter(copy(s:enumItems(a:dir)), 'v:val.word != bufName')
\ filter(copy(s:enumItems(a:dir)), 'v:val.word !=# bufNamePrev')
endif
return a:cache[key]
endfunction
@@ -84,7 +86,7 @@ endfunction
"
function s:handler.getPrompt()
return fuf#formatPrompt(g:fuf_file_prompt, self.partialMatching)
return fuf#formatPrompt(g:fuf_file_prompt, self.partialMatching, '')
endfunction
"
@@ -93,8 +95,8 @@ function s:handler.getPreviewHeight()
endfunction
"
function s:handler.targetsPath()
return 1
function s:handler.isOpenable(enteredPattern)
return a:enteredPattern =~# '[^/\\]$'
endfunction
"

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_givencmd') || v:version < 702
if !l9#guardScriptLoading(expand('<sfile>:p'), 0, 0, [])
finish
endif
let g:loaded_autoload_fuf_givencmd = 1
" }}}1
"=============================================================================
@@ -23,6 +22,11 @@ function fuf#givencmd#getSwitchOrder()
return -1
endfunction
"
function fuf#givencmd#getEditableDataNames()
return []
endfunction
"
function fuf#givencmd#renewCache()
endfunction
@@ -65,7 +69,7 @@ endfunction
"
function s:handler.getPrompt()
return fuf#formatPrompt(s:prompt, self.partialMatching)
return fuf#formatPrompt(s:prompt, self.partialMatching, '')
endfunction
"
@@ -74,8 +78,8 @@ function s:handler.getPreviewHeight()
endfunction
"
function s:handler.targetsPath()
return 0
function s:handler.isOpenable(enteredPattern)
return 1
endfunction
"

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_givendir') || v:version < 702
if !l9#guardScriptLoading(expand('<sfile>:p'), 0, 0, [])
finish
endif
let g:loaded_autoload_fuf_givendir = 1
" }}}1
"=============================================================================
@@ -23,6 +22,11 @@ function fuf#givendir#getSwitchOrder()
return -1
endfunction
"
function fuf#givendir#getEditableDataNames()
return []
endfunction
"
function fuf#givendir#renewCache()
endfunction
@@ -65,7 +69,7 @@ endfunction
"
function s:handler.getPrompt()
return fuf#formatPrompt(s:prompt, self.partialMatching)
return fuf#formatPrompt(s:prompt, self.partialMatching, '')
endfunction
"
@@ -74,7 +78,7 @@ function s:handler.getPreviewHeight()
endfunction
"
function s:handler.targetsPath()
function s:handler.isOpenable(enteredPattern)
return 1
endfunction
@@ -87,7 +91,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

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_givenfile') || v:version < 702
if !l9#guardScriptLoading(expand('<sfile>:p'), 0, 0, [])
finish
endif
let g:loaded_autoload_fuf_givenfile = 1
" }}}1
"=============================================================================
@@ -23,6 +22,11 @@ function fuf#givenfile#getSwitchOrder()
return -1
endfunction
"
function fuf#givenfile#getEditableDataNames()
return []
endfunction
"
function fuf#givenfile#renewCache()
endfunction
@@ -65,7 +69,7 @@ endfunction
"
function s:handler.getPrompt()
return fuf#formatPrompt(s:prompt, self.partialMatching)
return fuf#formatPrompt(s:prompt, self.partialMatching, '')
endfunction
"
@@ -74,7 +78,7 @@ function s:handler.getPreviewHeight()
endfunction
"
function s:handler.targetsPath()
function s:handler.isOpenable(enteredPattern)
return 1
endfunction

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_help') || v:version < 702
if !l9#guardScriptLoading(expand('<sfile>:p'), 0, 0, [])
finish
endif
let g:loaded_autoload_fuf_help = 1
" }}}1
"=============================================================================
@@ -23,6 +22,11 @@ function fuf#help#getSwitchOrder()
return g:fuf_help_switchOrder
endfunction
"
function fuf#help#getEditableDataNames()
return []
endfunction
"
function fuf#help#renewCache()
let s:cache = {}
@@ -35,8 +39,8 @@ endfunction
"
function fuf#help#onInit()
call fuf#defineLaunchCommand('FufHelp' , s:MODE_NAME, '""')
call fuf#defineLaunchCommand('FufHelpWithCursorWord', s:MODE_NAME, 'expand(''<cword>'')')
call fuf#defineLaunchCommand('FufHelp' , s:MODE_NAME, '""', [])
call fuf#defineLaunchCommand('FufHelpWithCursorWord', s:MODE_NAME, 'expand(''<cword>'')', [])
endfunction
" }}}1
@@ -47,7 +51,7 @@ let s:MODE_NAME = expand('<sfile>:t:r')
"
function s:getCurrentHelpTagFiles()
let prefix = 'doc' . fuf#getPathSeparator()
let prefix = 'doc' . l9#getPathSeparator()
let tagFiles = split(globpath(&runtimepath, prefix . 'tags' ), "\n")
\ + split(globpath(&runtimepath, prefix . 'tags-??'), "\n")
return sort(map(tagFiles, 'fnamemodify(v:val, ":p")'))
@@ -65,7 +69,7 @@ function s:parseHelpTagEntry(line, tagFile)
else
let suffix = '@' . suffix
endif
let dir = fnamemodify(a:tagFile, ':h') . fuf#getPathSeparator()
let dir = fnamemodify(a:tagFile, ':h') . l9#getPathSeparator()
return {
\ 'word' : elements[0] . suffix,
\ 'path' : dir . elements[1],
@@ -75,30 +79,22 @@ endfunction
"
function s:getHelpTagEntries(tagFile)
let names = map(readfile(a:tagFile), 's:parseHelpTagEntry(v:val, a:tagFile)')
let names = map(l9#readFile(a:tagFile), 's:parseHelpTagEntry(v:val, a:tagFile)')
return filter(names, '!empty(v:val)')
endfunction
"
function s:parseHelpTagFiles(tagFiles)
if !empty(g:fuf_help_cache_dir)
if !isdirectory(expand(g:fuf_help_cache_dir))
call mkdir(expand(g:fuf_help_cache_dir), 'p')
function s:parseHelpTagFiles(tagFiles, key)
let cacheName = 'cache-' . l9#hash224(a:key)
let cacheTime = fuf#getDataFileTime(s:MODE_NAME, cacheName)
if cacheTime != -1 && fuf#countModifiedFiles(a:tagFiles, cacheTime) == 0
return fuf#loadDataFile(s:MODE_NAME, cacheName)
endif
" NOTE: fnamemodify('a/b', ':p') returns 'a/b/' if the directory exists.
let cacheFile = fnamemodify(g:fuf_help_cache_dir, ':p')
\ . fuf#hash224(join(a:tagFiles, "\n"))
if filereadable(cacheFile) && fuf#countModifiedFiles(a:tagFiles, getftime(cacheFile)) == 0
return map(readfile(cacheFile), 'eval(v:val)')
endif
endif
let items = fuf#unique(fuf#concat(map(copy(a:tagFiles), 's:getHelpTagEntries(v:val)')))
let items = l9#unique(l9#concat(map(copy(a:tagFiles), 's:getHelpTagEntries(v:val)')))
let items = map(items, 'extend(v:val, fuf#makeNonPathItem(v:val.word, ""))')
call fuf#mapToSetSerialIndex(items, 1)
let items = map(items, 'fuf#setAbbrWithFormattedWord(v:val, 1)')
if !empty(g:fuf_help_cache_dir)
call writefile(map(copy(items), 'string(v:val)'), cacheFile)
endif
call fuf#saveDataFile(s:MODE_NAME, cacheName, items)
return items
endfunction
@@ -107,11 +103,11 @@ function s:enumHelpTags(tagFiles)
if !len(a:tagFiles)
return []
endif
let key = join(a:tagFiles, "\n")
let key = join([g:fuf_ignoreCase] + a:tagFiles, "\n")
if !exists('s:cache[key]') || fuf#countModifiedFiles(a:tagFiles, s:cache[key].time)
let s:cache[key] = {
\ 'time' : localtime(),
\ 'items' : s:parseHelpTagFiles(a:tagFiles)
\ 'items' : s:parseHelpTagFiles(a:tagFiles, key)
\ }
endif
return s:cache[key].items
@@ -143,7 +139,7 @@ endfunction
"
function s:handler.getPrompt()
return fuf#formatPrompt(g:fuf_help_prompt, self.partialMatching)
return fuf#formatPrompt(g:fuf_help_prompt, self.partialMatching, '')
endfunction
"
@@ -152,8 +148,8 @@ function s:handler.getPreviewHeight()
endfunction
"
function s:handler.targetsPath()
return 0
function s:handler.isOpenable(enteredPattern)
return 1
endfunction
"

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_jumplist') || v:version < 702
if !l9#guardScriptLoading(expand('<sfile>:p'), 0, 0, [])
finish
endif
let g:loaded_autoload_fuf_jumplist = 1
" }}}1
"=============================================================================
@@ -23,6 +22,11 @@ function fuf#jumplist#getSwitchOrder()
return g:fuf_jumplist_switchOrder
endfunction
"
function fuf#jumplist#getEditableDataNames()
return []
endfunction
"
function fuf#jumplist#renewCache()
endfunction
@@ -34,7 +38,7 @@ endfunction
"
function fuf#jumplist#onInit()
call fuf#defineLaunchCommand('FufJumpList', s:MODE_NAME, '""')
call fuf#defineLaunchCommand('FufJumpList', s:MODE_NAME, '""', [])
endfunction
" }}}1
@@ -101,7 +105,7 @@ endfunction
"
function s:handler.getPrompt()
return fuf#formatPrompt(g:fuf_jumplist_prompt, self.partialMatching)
return fuf#formatPrompt(g:fuf_jumplist_prompt, self.partialMatching, '')
endfunction
"
@@ -110,8 +114,8 @@ function s:handler.getPreviewHeight()
endfunction
"
function s:handler.targetsPath()
return 0
function s:handler.isOpenable(enteredPattern)
return 1
endfunction
"

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_line') || v:version < 702
if !l9#guardScriptLoading(expand('<sfile>:p'), 0, 0, [])
finish
endif
let g:loaded_autoload_fuf_line = 1
" }}}1
"=============================================================================
@@ -23,6 +22,11 @@ function fuf#line#getSwitchOrder()
return g:fuf_line_switchOrder
endfunction
"
function fuf#line#getEditableDataNames()
return []
endfunction
"
function fuf#line#renewCache()
endfunction
@@ -34,7 +38,7 @@ endfunction
"
function fuf#line#onInit()
call fuf#defineLaunchCommand('FufLine', s:MODE_NAME, '""')
call fuf#defineLaunchCommand('FufLine', s:MODE_NAME, '""', [])
endfunction
" }}}1
@@ -57,7 +61,7 @@ endfunction
"
function s:handler.getPrompt()
return fuf#formatPrompt(g:fuf_line_prompt, self.partialMatching)
return fuf#formatPrompt(g:fuf_line_prompt, self.partialMatching, '')
endfunction
"
@@ -66,8 +70,8 @@ function s:handler.getPreviewHeight()
endfunction
"
function s:handler.targetsPath()
return 0
function s:handler.isOpenable(enteredPattern)
return 1
endfunction
"

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_mrucmd') || v:version < 702
if !l9#guardScriptLoading(expand('<sfile>:p'), 0, 0, [])
finish
endif
let g:loaded_autoload_fuf_mrucmd = 1
" }}}1
"=============================================================================
@@ -23,6 +22,11 @@ function fuf#mrucmd#getSwitchOrder()
return g:fuf_mrucmd_switchOrder
endfunction
"
function fuf#mrucmd#getEditableDataNames()
return ['items']
endfunction
"
function fuf#mrucmd#renewCache()
endfunction
@@ -34,7 +38,7 @@ endfunction
"
function fuf#mrucmd#onInit()
call fuf#defineLaunchCommand('FufMruCmd', s:MODE_NAME, '""')
call fuf#defineLaunchCommand('FufMruCmd', s:MODE_NAME, '""', [])
endfunction
"
@@ -53,11 +57,11 @@ let s:MODE_NAME = expand('<sfile>:t:r')
"
function s:updateInfo(cmd)
let info = fuf#loadInfoFile(s:MODE_NAME)
let info.data = fuf#updateMruList(
\ info.data, { 'word' : a:cmd, 'time' : localtime() },
let items = fuf#loadDataFile(s:MODE_NAME, 'items')
let items = fuf#updateMruList(
\ items, { 'word' : a:cmd, 'time' : localtime() },
\ g:fuf_mrucmd_maxItem, g:fuf_mrucmd_exclude)
call fuf#saveInfoFile(s:MODE_NAME, info)
call fuf#saveDataFile(s:MODE_NAME, 'items', items)
endfunction
" }}}1
@@ -73,7 +77,7 @@ endfunction
"
function s:handler.getPrompt()
return fuf#formatPrompt(g:fuf_mrucmd_prompt, self.partialMatching)
return fuf#formatPrompt(g:fuf_mrucmd_prompt, self.partialMatching, '')
endfunction
"
@@ -82,8 +86,8 @@ function s:handler.getPreviewHeight()
endfunction
"
function s:handler.targetsPath()
return 0
function s:handler.isOpenable(enteredPattern)
return 1
endfunction
"
@@ -115,7 +119,7 @@ endfunction
"
function s:handler.onModeEnterPost()
let self.items = copy(self.info.data)
let self.items = fuf#loadDataFile(s:MODE_NAME, 'items')
call map(self.items, 'fuf#makeNonPathItem(v:val.word, strftime(g:fuf_timeFormat, v:val.time))')
call fuf#mapToSetSerialIndex(self.items, 1)
call map(self.items, 'fuf#setAbbrWithFormattedWord(v:val, 1)')

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_mrufile') || v:version < 702
if !l9#guardScriptLoading(expand('<sfile>:p'), 0, 0, [])
finish
endif
let g:loaded_autoload_fuf_mrufile = 1
" }}}1
"=============================================================================
@@ -23,9 +22,15 @@ function fuf#mrufile#getSwitchOrder()
return g:fuf_mrufile_switchOrder
endfunction
"
function fuf#mrufile#getEditableDataNames()
return ['items', 'itemdirs']
endfunction
"
function fuf#mrufile#renewCache()
let s:cache = {}
let s:aroundCache = {}
endfunction
"
@@ -35,11 +40,15 @@ endfunction
"
function fuf#mrufile#onInit()
call fuf#defineLaunchCommand('FufMruFile', s:MODE_NAME, '""')
call fuf#defineLaunchCommand('FufMruFile', s:MODE_NAME, '""', [])
call fuf#defineLaunchCommand('FufMruFileInCwd', s:MODE_NAME,
\ '""', [['g:fuf_mrufile_underCwd', 1]])
call l9#defineVariableDefault('g:fuf_mrufile_underCwd', 0) " private option
call l9#defineVariableDefault('g:fuf_mrufile_searchAroundLevel', -1) " private option
augroup fuf#mrufile
autocmd!
autocmd BufEnter * call s:updateInfo()
autocmd BufWritePost * call s:updateInfo()
autocmd BufEnter * call s:updateData()
autocmd BufWritePost * call s:updateData()
augroup END
endfunction
@@ -48,18 +57,24 @@ endfunction
" LOCAL FUNCTIONS/VARIABLES {{{1
let s:MODE_NAME = expand('<sfile>:t:r')
let s:OPEN_TYPE_EXPAND = -1
"
function s:updateInfo()
function s:updateData()
if !empty(&buftype) || !filereadable(expand('%'))
return
endif
let info = fuf#loadInfoFile(s:MODE_NAME)
let info.data = fuf#updateMruList(
\ info.data, { 'word' : expand('%:p'), 'time' : localtime() },
let items = fuf#loadDataFile(s:MODE_NAME, 'items')
let items = fuf#updateMruList(
\ items, { 'word' : expand('%:p'), 'time' : localtime() },
\ g:fuf_mrufile_maxItem, g:fuf_mrufile_exclude)
call fuf#saveInfoFile(s:MODE_NAME, info)
call fuf#saveDataFile(s:MODE_NAME, 'items', items)
call s:removeItemFromCache(expand('%:p'))
let itemDirs = fuf#loadDataFile(s:MODE_NAME, 'itemdirs')
let itemDirs = fuf#updateMruList(
\ itemDirs, { 'word' : expand('%:p:h') },
\ g:fuf_mrufile_maxItemDir, g:fuf_mrufile_exclude)
call fuf#saveDataFile(s:MODE_NAME, 'itemdirs', itemDirs)
endfunction
"
@@ -79,7 +94,7 @@ function s:formatItemUsingCache(item)
if !exists('s:cache[a:item.word]')
if filereadable(a:item.word)
let s:cache[a:item.word] = fuf#makePathItem(
\ fnamemodify(a:item.word, ':~'), strftime(g:fuf_timeFormat, a:item.time), 0)
\ fnamemodify(a:item.word, ':p:~'), strftime(g:fuf_timeFormat, a:item.time), 0)
else
let s:cache[a:item.word] = {}
endif
@@ -87,6 +102,41 @@ function s:formatItemUsingCache(item)
return s:cache[a:item.word]
endfunction
"
function s:expandSearchDir(dir, level)
let dirs = [a:dir]
let dirPrev = a:dir
for i in range(a:level)
let dirPrev = l9#concatPaths([dirPrev, '*'])
call add(dirs, dirPrev)
endfor
let dirPrev = a:dir
for i in range(a:level)
let dirPrevPrev = dirPrev
let dirPrev = fnamemodify(dirPrev, ':h')
if dirPrevPrev ==# dirPrev
break
endif
call add(dirs, dirPrev)
endfor
return dirs
endfunction
"
function s:listAroundFiles(dir)
if !exists('s:aroundCache[a:dir]')
let s:aroundCache[a:dir] = [a:dir] +
\ fuf#glob(l9#concatPaths([a:dir, '*' ])) +
\ fuf#glob(l9#concatPaths([a:dir, '.*']))
call filter(s:aroundCache[a:dir], 'filereadable(v:val)')
call map(s:aroundCache[a:dir], 'fuf#makePathItem(fnamemodify(v:val, ":~"), "", 0)')
if len(g:fuf_mrufile_exclude)
call filter(s:aroundCache[a:dir], 'v:val.word !~ g:fuf_mrufile_exclude')
endif
endif
return s:aroundCache[a:dir]
endfunction
" }}}1
"=============================================================================
" s:handler {{{1
@@ -100,7 +150,10 @@ endfunction
"
function s:handler.getPrompt()
return fuf#formatPrompt(g:fuf_mrufile_prompt, self.partialMatching)
let cwdString = (g:fuf_mrufile_underCwd ? '[CWD]' : '')
let levelString = (g:fuf_mrufile_searchAroundLevel < 0 ? ''
\ : '[Around:' . g:fuf_mrufile_searchAroundLevel . ']')
return fuf#formatPrompt(g:fuf_mrufile_prompt, self.partialMatching, cwdString . levelString)
endfunction
"
@@ -109,7 +162,7 @@ function s:handler.getPreviewHeight()
endfunction
"
function s:handler.targetsPath()
function s:handler.isOpenable(enteredPattern)
return 1
endfunction
@@ -131,7 +184,14 @@ endfunction
"
function s:handler.onOpen(word, mode)
if a:mode ==# s:OPEN_TYPE_EXPAND
let nextLevel = (self.searchAroundLevel < 0 ? 0 : self.searchAroundLevel + 1)
call fuf#setOneTimeVariables(['g:fuf_mrufile_searchAroundLevel', nextLevel])
let self.reservedMode = self.getModeName()
return
else
call fuf#openFile(a:word, a:mode, g:fuf_reuseWindow)
endif
endfunction
"
@@ -140,11 +200,29 @@ endfunction
"
function s:handler.onModeEnterPost()
let self.items = copy(self.info.data)
let self.items = map(self.items, 's:formatItemUsingCache(v:val)')
let self.items = filter(self.items, '!empty(v:val) && bufnr("^" . v:val.word . "$") != self.bufNrPrev')
let self.items = fuf#mapToSetSerialIndex(self.items, 1)
let self.items = fuf#mapToSetAbbrWithSnippedWordAsPath(self.items)
let self.searchAroundLevel = g:fuf_mrufile_searchAroundLevel
call fuf#defineKeyMappingInHandler(g:fuf_mrufile_keyExpand,
\ 'onCr(' . s:OPEN_TYPE_EXPAND . ')')
if self.searchAroundLevel < 0
let self.items = fuf#loadDataFile(s:MODE_NAME, 'items')
call map(self.items, 's:formatItemUsingCache(v:val)')
else
let self.items = fuf#loadDataFile(s:MODE_NAME, 'itemdirs')
call map(self.items, 's:expandSearchDir(v:val.word, g:fuf_mrufile_searchAroundLevel)')
let self.items = l9#concat(self.items)
let self.items = l9#unique(self.items)
call map(self.items, 's:listAroundFiles(v:val)')
let self.items = l9#concat(self.items)
endif
" NOTE: Comparing filenames is faster than bufnr('^' . fname . '$')
let bufNamePrev = fnamemodify(bufname(self.bufNrPrev), ':p:~')
call filter(self.items, '!empty(v:val) && v:val.word !=# bufNamePrev')
if g:fuf_mrufile_underCwd
let cwd = fnamemodify(getcwd(), ':p:~')
call filter(self.items, 'stridx(v:val.word, cwd) == 0')
endif
call fuf#mapToSetSerialIndex(self.items, 1)
call fuf#mapToSetAbbrWithSnippedWordAsPath(self.items)
endfunction
"

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_quickfix') || v:version < 702
if !l9#guardScriptLoading(expand('<sfile>:p'), 0, 0, [])
finish
endif
let g:loaded_autoload_fuf_quickfix = 1
" }}}1
"=============================================================================
@@ -23,6 +22,11 @@ function fuf#quickfix#getSwitchOrder()
return g:fuf_quickfix_switchOrder
endfunction
"
function fuf#quickfix#getEditableDataNames()
return []
endfunction
"
function fuf#quickfix#renewCache()
endfunction
@@ -34,7 +38,7 @@ endfunction
"
function fuf#quickfix#onInit()
call fuf#defineLaunchCommand('FufQuickfix', s:MODE_NAME, '""')
call fuf#defineLaunchCommand('FufQuickfix', s:MODE_NAME, '""', [])
endfunction
" }}}1
@@ -83,7 +87,7 @@ endfunction
"
function s:handler.getPrompt()
return fuf#formatPrompt(g:fuf_quickfix_prompt, self.partialMatching)
return fuf#formatPrompt(g:fuf_quickfix_prompt, self.partialMatching, '')
endfunction
"
@@ -92,8 +96,8 @@ function s:handler.getPreviewHeight()
endfunction
"
function s:handler.targetsPath()
return 0
function s:handler.isOpenable(enteredPattern)
return 1
endfunction
"

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_tag') || v:version < 702
if !l9#guardScriptLoading(expand('<sfile>:p'), 0, 0, [])
finish
endif
let g:loaded_autoload_fuf_tag = 1
" }}}1
"=============================================================================
@@ -23,6 +22,11 @@ function fuf#tag#getSwitchOrder()
return g:fuf_tag_switchOrder
endfunction
"
function fuf#tag#getEditableDataNames()
return []
endfunction
"
function fuf#tag#renewCache()
let s:cache = {}
@@ -35,8 +39,8 @@ endfunction
"
function fuf#tag#onInit()
call fuf#defineLaunchCommand('FufTag' , s:MODE_NAME, '""')
call fuf#defineLaunchCommand('FufTagWithCursorWord', s:MODE_NAME, 'expand(''<cword>'')')
call fuf#defineLaunchCommand('FufTag' , s:MODE_NAME, '""', [])
call fuf#defineLaunchCommand('FufTagWithCursorWord', s:MODE_NAME, 'expand(''<cword>'')', [])
endfunction
" }}}1
@@ -47,30 +51,22 @@ let s:MODE_NAME = expand('<sfile>:t:r')
"
function s:getTagNames(tagFile)
let names = map(readfile(a:tagFile), 'matchstr(v:val, ''^[^!\t][^\t]*'')')
let names = map(l9#readFile(a:tagFile), 'matchstr(v:val, ''^[^!\t][^\t]*'')')
return filter(names, 'v:val =~# ''\S''')
endfunction
"
function s:parseTagFiles(tagFiles)
if !empty(g:fuf_tag_cache_dir)
if !isdirectory(expand(g:fuf_tag_cache_dir))
call mkdir(expand(g:fuf_tag_cache_dir), 'p')
function s:parseTagFiles(tagFiles, key)
let cacheName = 'cache-' . l9#hash224(a:key)
let cacheTime = fuf#getDataFileTime(s:MODE_NAME, cacheName)
if cacheTime != -1 && fuf#countModifiedFiles(a:tagFiles, cacheTime) == 0
return fuf#loadDataFile(s:MODE_NAME, cacheName)
endif
" NOTE: fnamemodify('a/b', ':p') returns 'a/b/' if the directory exists.
let cacheFile = fnamemodify(g:fuf_tag_cache_dir, ':p')
\ . fuf#hash224(join(a:tagFiles, "\n"))
if filereadable(cacheFile) && fuf#countModifiedFiles(a:tagFiles, getftime(cacheFile)) == 0
return map(readfile(cacheFile), 'eval(v:val)')
endif
endif
let items = fuf#unique(fuf#concat(map(copy(a:tagFiles), 's:getTagNames(v:val)')))
let items = l9#unique(l9#concat(map(copy(a:tagFiles), 's:getTagNames(v:val)')))
let items = map(items, 'fuf#makeNonPathItem(v:val, "")')
call fuf#mapToSetSerialIndex(items, 1)
let items = map(items, 'fuf#setAbbrWithFormattedWord(v:val, 1)')
if !empty(g:fuf_tag_cache_dir)
call writefile(map(copy(items), 'string(v:val)'), cacheFile)
endif
call fuf#saveDataFile(s:MODE_NAME, cacheName, items)
return items
endfunction
@@ -79,11 +75,11 @@ function s:enumTags(tagFiles)
if !len(a:tagFiles)
return []
endif
let key = join(a:tagFiles, "\n")
let key = join([g:fuf_ignoreCase] + a:tagFiles, "\n")
if !exists('s:cache[key]') || fuf#countModifiedFiles(a:tagFiles, s:cache[key].time)
let s:cache[key] = {
\ 'time' : localtime(),
\ 'items' : s:parseTagFiles(a:tagFiles)
\ 'items' : s:parseTagFiles(a:tagFiles, key)
\ }
endif
return s:cache[key].items
@@ -119,7 +115,7 @@ endfunction
"
function s:handler.getPrompt()
return fuf#formatPrompt(g:fuf_tag_prompt, self.partialMatching)
return fuf#formatPrompt(g:fuf_tag_prompt, self.partialMatching, '')
endfunction
"
@@ -128,8 +124,8 @@ function s:handler.getPreviewHeight()
endfunction
"
function s:handler.targetsPath()
return 0
function s:handler.isOpenable(enteredPattern)
return 1
endfunction
"

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_taggedfile') || v:version < 702
if !l9#guardScriptLoading(expand('<sfile>:p'), 0, 0, [])
finish
endif
let g:loaded_autoload_fuf_taggedfile = 1
" }}}1
"=============================================================================
@@ -23,6 +22,11 @@ function fuf#taggedfile#getSwitchOrder()
return g:fuf_taggedfile_switchOrder
endfunction
"
function fuf#taggedfile#getEditableDataNames()
return []
endfunction
"
function fuf#taggedfile#renewCache()
let s:cache = {}
@@ -35,7 +39,7 @@ endfunction
"
function fuf#taggedfile#onInit()
call fuf#defineLaunchCommand('FufTaggedFile', s:MODE_NAME, '""')
call fuf#defineLaunchCommand('FufTaggedFile', s:MODE_NAME, '""', [])
endfunction
" }}}1
@@ -47,33 +51,25 @@ let s:MODE_NAME = expand('<sfile>:t:r')
"
function s:getTaggedFileList(tagfile)
execute 'cd ' . fnamemodify(a:tagfile, ':h')
let result = map(readfile(a:tagfile), 'matchstr(v:val, ''^[^!\t][^\t]*\t\zs[^\t]\+'')')
call map(readfile(a:tagfile), 'fnamemodify(v:val, ":p")')
let result = map(l9#readFile(a:tagfile), 'matchstr(v:val, ''^[^!\t][^\t]*\t\zs[^\t]\+'')')
call map(l9#readFile(a:tagfile), 'fnamemodify(v:val, ":p")')
cd -
call map(readfile(a:tagfile), 'fnamemodify(v:val, ":~:.")')
call map(l9#readFile(a:tagfile), 'fnamemodify(v:val, ":~:.")')
return filter(result, 'v:val =~# ''[^/\\ ]$''')
endfunction
"
function s:parseTagFiles(tagFiles)
if !empty(g:fuf_taggedfile_cache_dir)
if !isdirectory(expand(g:fuf_taggedfile_cache_dir))
call mkdir(expand(g:fuf_taggedfile_cache_dir), 'p')
function s:parseTagFiles(tagFiles, key)
let cacheName = 'cache-' . l9#hash224(a:key)
let cacheTime = fuf#getDataFileTime(s:MODE_NAME, cacheName)
if cacheTime != -1 && fuf#countModifiedFiles(a:tagFiles, cacheTime) == 0
return fuf#loadDataFile(s:MODE_NAME, cacheName)
endif
" NOTE: fnamemodify('a/b', ':p') returns 'a/b/' if the directory exists.
let cacheFile = fnamemodify(g:fuf_taggedfile_cache_dir, ':p')
\ . fuf#hash224(join(a:tagFiles, "\n"))
if filereadable(cacheFile) && fuf#countModifiedFiles(a:tagFiles, getftime(cacheFile)) == 0
return map(readfile(cacheFile), 'eval(v:val)')
endif
endif
let items = fuf#unique(fuf#concat(map(copy(a:tagFiles), 's:getTaggedFileList(v:val)')))
let items = l9#unique(l9#concat(map(copy(a:tagFiles), 's:getTaggedFileList(v:val)')))
call map(items, 'fuf#makePathItem(v:val, "", 0)')
call fuf#mapToSetSerialIndex(items, 1)
call fuf#mapToSetAbbrWithSnippedWordAsPath(items)
if !empty(g:fuf_taggedfile_cache_dir)
call writefile(map(copy(items), 'string(v:val)'), cacheFile)
endif
call fuf#saveDataFile(s:MODE_NAME, cacheName, items)
return items
endfunction
@@ -82,11 +78,11 @@ function s:enumTaggedFiles(tagFiles)
if !len(a:tagFiles)
return []
endif
let key = join([getcwd()] + a:tagFiles, "\n")
let key = join([getcwd(), g:fuf_ignoreCase] + a:tagFiles, "\n")
if !exists('s:cache[key]') || fuf#countModifiedFiles(a:tagFiles, s:cache[key].time)
let s:cache[key] = {
\ 'time' : localtime(),
\ 'items' : s:parseTagFiles(a:tagFiles)
\ 'items' : s:parseTagFiles(a:tagFiles, key)
\ }
endif
return s:cache[key].items
@@ -105,7 +101,7 @@ endfunction
"
function s:handler.getPrompt()
return fuf#formatPrompt(g:fuf_taggedfile_prompt, self.partialMatching)
return fuf#formatPrompt(g:fuf_taggedfile_prompt, self.partialMatching, '')
endfunction
"
@@ -114,7 +110,7 @@ function s:handler.getPreviewHeight()
endfunction
"
function s:handler.targetsPath()
function s:handler.isOpenable(enteredPattern)
return 1
endfunction
@@ -146,11 +142,12 @@ endfunction
"
function s:handler.onModeEnterPost()
" NOTE: Comparing filenames is faster than bufnr('^' . fname . '$')
let bufNamePrev = fnamemodify(bufname(self.bufNrPrev), ':p:~:.')
" NOTE: Don't do this in onModeEnterPre()
" because that should return in a short time.
let self.items =
\ filter(copy(s:enumTaggedFiles(self.tagFiles)),
\ 'bufnr("^" . v:val.word . "$") != self.bufNrPrev')
let self.items = copy(s:enumTaggedFiles(self.tagFiles))
call filter(self.items, 'v:val.word !=# bufNamePrev')
endfunction
"

View File

@@ -1,6 +1,6 @@
*fuf.txt* buffer/file/command/tag/etc explorer with fuzzy matching.
Copyright (c) 2007-2009 Takeshi NISHIDA
Copyright (c) 2007-2010 Takeshi NISHIDA
FuzzyFinder *fuzzyfinder* *fuf*
@@ -38,7 +38,7 @@ You will be happy when:
"./OhLongLongLongLongLongFile.txt"
"./OhLongLongLongLongLongName.txt" <- you want :O
Type "ON" and "OhLongLongLongLongLongName.txt" will be select. :D
Type "ON" and "OhLongLongLongLongLongName.txt" will be selected. :D
FuzzyFinder can search:
@@ -46,8 +46,10 @@ FuzzyFinder can search:
- files
- directories
- most recently used files
- files around most recently used files
- most recently used command-lines
- bookmarks
- bookmarked files
- bookmarked directories
- tags
- files which are included in current tagfiles
- jump list
@@ -71,30 +73,37 @@ it to your runtime directory.
You should place the files as follows:
>
<your runtime directory>/plugin/fuf.vim
<your runtime directory>/autoload/fuf.vim
<your runtime directory>/autoload/fuf/buffer.vim
<your runtime directory>/doc/fuf.txt
...
<
If you disgust to jumble up this plugin and other plugins in your runtime
directory, put the files into new directory and just add the directory path to
'runtimepath'. It's easy to uninstall the plugin.
If you are disgusted to make your runtime directory confused with a lot of
plugins, put each of the plugins into a directory individually and just add
the directory path to 'runtimepath'. It's easy to uninstall plugins.
And then update your help tags files to enable fuzzyfinder help. See
Then update your help tags files to enable help for this plugin. See
|add-local-help| for details.
Requirements: ~
- L9 library (vimscript #3252)
==============================================================================
USAGE *fuf-usage*
You can launch FuzzyFinder by following commands:
You can launch FuzzyFinder by the following commands:
Command Mode ~
|:FufBuffer| - Buffer mode (|fuf-buffer-mode|)
|:FufFile| - File mode (|fuf-file-mode|)
|:FufCoverageFile| - Coverage-File mode (|fuf-coveragefile-mode|)
|:FufDir| - Directory mode (|fuf-dir-mode|)
|:FufMruFile| - MRU-File mode (|fuf-mrufile-mode|)
|:FufMruCmd| - MRU-Command mode (|fuf-mrucmd-mode|)
|:FufBookmark| - Bookmark mode (|fuf-bookmark-mode|)
|:FufBookmarkFile| - Bookmark-File mode (|fuf-bookmarkfile-mode|)
|:FufBookmarkDir| - Bookmark-Dir mode (|fuf-bookmarkdir-mode|)
|:FufTag| - Tag mode (|fuf-tag-mode|)
|:FufBufferTag| - Buffer-Tag mode (|fuf-buffertag-mode|)
|:FufTaggedFile| - Tagged-File mode (|fuf-taggedfile-mode|)
|:FufJumpList| - Jump-List mode (|fuf-jumplist-mode|)
|:FufChangeList| - Change-List mode (|fuf-changelist-mode|)
@@ -117,6 +126,9 @@ highlights the pattern with "Error" group.
The first item in the completion menu will be selected automatically.
Typing <C-w> deletes one block of an entered pattern before the cursor, like a
directory name.
with <C-s> (|g:fuf_keyPrevPattern|) and <C-^> (|g:fuf_keyNextPattern|), You
can recall patterns which have been entered before from history.
@@ -136,9 +148,10 @@ With <C-t> (|g:fuf_keyNextMode|) and <C-y> (|g:fuf_keyPrevMode|), You can
switch current mode without leaving Insert mode .
You can preview selected item with <C-@> (|g:fuf_keyPreview|) in some modes.
Repeating the key on the same item might show another information. The height
Repeating the key on the same item shows another information. The height
of command-line area is changed to |g:fuf_previewHeight| when you launch a
mode supporting preview.
mode supporting preview. This feature is available when |g:fuf_previewHeight|
is not 0.
==============================================================================
@@ -150,43 +163,79 @@ Buffer mode ~
This mode provides an interface to select a buffer from a list of existing
buffers and open it.
Press <C-]> (|g:fuf_buffer_keyDelete|) in this mode and selected buffer will
be deleted.
*fuf-file-mode*
File mode ~
This mode provides an interface to search a file and open it.
This mode provides an interface to search a file tree for a file and open it.
*fuf-coveragefile-mode*
Coverage-File mode ~
This mode provides an interface to select a file from all files of a preset
coverage and open it.
By default, This mode lists all files under the current working directory
recursively. (|g:fuf_coveragefile_globPatterns|)
If you want to search other coverage, execute |FufCoverageFileRegister|
command to register new search coverage and |FufCoverageFileChange| command to
choose a search coverage and launch Coverage-File mode.
In addition, there is another way to change a search coverage with
|fuf#setOneTimeVariables()| function.
Example: search only .h and .c files:
>
call fuf#setOneTimeVariables(['g:fuf_coveragefile_globPatterns', ['**/*.h', '**/*.c']])
\ | FufCoverageFile
<
Example: search your home directory in addition to the default coverage:
>
call fuf#setOneTimeVariables(['g:fuf_coveragefile_globPatterns', g:fuf_coveragefile_globPatterns + ['~/**/.*', '~/**/*']])
\ | FufCoverageFile
<
*fuf-dir-mode*
Directory mode ~
This mode provides an interface to search a directory and change the current
directory.
This mode provides an interface to search a file tree for a directory and
change the current directory.
*fuf-mrufile-mode*
MRU-File mode ~
This mode provides an interface to select a file from most recently used files
and open it.
This mode provides an interface to select a file from the most recently used
files and open it.
This mode is set to disable in |g:fuf_modesDisable| by default because
Press <C-]> (|g:fuf_mrufile_keyExpand|) in this mode and files around the most
recently used files are listed. Each time the key is pressed, the search range
are expanded one level along the directory tree upwardly/downwardly.
This mode is set to disable by default (|g:fuf_modesDisable|) because
processes for this mode in |BufEnter| and |BufWritePost| could cause
Performance issue.
See also: |FufMruFileInCwd|
*fuf-mrucmd-mode*
MRU-Command mode ~
This mode provides an interface to select a command from most recently used
commands and execute it.
This mode provides an interface to select a command from the most recently
used commands and execute it.
This mode is set to disable in |g:fuf_modesDisable| by default because mapping
This mode is set to disable by default (|g:fuf_modesDisable|) because mapping
<CR> of Command-line mode required by this mode has side effects.
*fuf-bookmark-mode*
Bookmark mode ~
*fuf-bookmarkfile-mode*
Bookmark-File mode ~
This mode provides an interface to select one of the bookmarks you have added
beforehand and jump there.
You can add a cursor line to bookmarks by |:FufAddBookmark| command.
You can add a cursor line to bookmarks by |:FufBookmarkFileAdd| command.
Execute that command and you will be prompted to enter a bookmark name.
FuzzyFinder adjusts a line number for jump. If a line of bookmarked position
@@ -194,22 +243,58 @@ does not match to a pattern when the bookmark was added, FuzzyFinder searches
a matching line around bookmarked position. So you can jump to a bookmarked
line even if the line is out of bookmarked position. If you want to jump to
bookmarked line number without the adjustment, set
|g:fuf_bookmark_searchRange| option to 0.
|g:fuf_bookmarkfile_searchRange| option to 0.
Press <C-]> (|g:fuf_bookmark_keyDelete|) in Bookmark mode and selected
Press <C-]> (|g:fuf_bookmarkfile_keyDelete|) in this mode and selected
bookmark will be deleted.
*fuf-bookmarkdir-mode*
Bookmark-Dir mode ~
This mode provides an interface to select one of the bookmarks you have added
beforehand and change the current directory.
You can add a directory to bookmarks by |:FufBookmarkDirAdd| command. Execute
that command and you will be prompted to enter a directory path and a
bookmark name.
Press <C-]> (|g:fuf_bookmarkdir_keyDelete|) in this mode and selected bookmark
will be deleted.
*fuf-tag-mode*
Tag mode ~
This mode provides an interface to select a tag and jump to the definition of
it.
Following mapping is the replacement for <C-]>:
Following mapping is a replacement for <C-]>:
>
noremap <silent> <C-]> :FufTagWithCursorWord!<CR>
<
*fuf-buffertag-mode*
Buffer-Tag mode ~
This mode provides an interface to select a tag of current buffer or all
buffers and jump to the definition of it.
Tag list is instantly created when FuzzyFinder is launched, so there is no
need to make tags file in advance.
|FufBufferTag| covers current buffer and |FufBufferTagAll| covers all buffers.
Following mapping is a replacement for <C-]>:
>
nnoremap <silent> <C-]> :FufBufferTagWithCursorWord!<CR>
vnoremap <silent> <C-]> :FufBufferTagAllWithSelectedText!<CR>
<
or
>
nnoremap <silent> <C-]> :FufBufferTagAllWithCursorWord!<CR>
vnoremap <silent> <C-]> :FufBufferTagAllWithSelectedText!<CR>
<
This mode is inspired by taglist.vim (vimscript #273) and refered its codes.
*fuf-taggedfile-mode*
Tagged-File mode ~
@@ -421,6 +506,19 @@ Example of use:
==============================================================================
DETAILED TOPICS *fuf-detailed-topics*
*fuf-setting-one-time-option* *fuf#setOneTimeVariables()*
Setting One-Time Options ~
If you want to set one-time options only for the next FuzzyFinder,
|fuf#setOneTimeVariables()| function will be of help. This function is used as
follows:
>
call fuf#setOneTimeVariables(['g:fuf_ignoreCase', 0], ['&lines', 50])
<
This function takes 0 or more arguments and each of them is a pair of a
variable name and its value. Specified options will be set practically next
time FuzzyFinder is launched, and restored when FuzzyFinder is closed.
*fuf-search-patterns*
Search Patterns ~
@@ -437,8 +535,8 @@ A refining pattern is used to narrow down the list of matching items by
another pattern.
With a primary pattern, FuzzyFinder does fuzzy matching or partial matching,
which you specified. With a refining pattern, FuzzyFinder always does partial
matching.
which you specified. With a refining pattern, FuzzyFinder does partial
matching by default. (|g:fuf_fuzzyRefining|)
When you enter a number as refining pattern, it also can match the index of
each item.
@@ -520,7 +618,7 @@ For example, set as below:
\ ],
\ }
<
and enter "doc:txt" in File mode, then FuzzyFinder searches by following
and enter "doc:txt" in File mode, then FuzzyFinder searches by the following
patterns:
"~/project/**/doc/*t*x*t*"
@@ -528,15 +626,15 @@ patterns:
and show concatenated search results.
*fuf-information-file*
Information File ~
*fuf-data-file*
Data File ~
FuzzyFinder writes completion statistics, MRU data, bookmark, etc to
|g:fuf_infoFile|.
FuzzyFinder writes completion statistics, MRU data, bookmark, etc to files
under |g:fuf_dataDir|.
|:FufEditInfo| command is helpful in editing your information file.
This command reads the information file in new unnamed buffer. Write the
buffer and the information file will be updated.
|:FufEditDataFile| command is helpful in editing your data files. This command
reads the data file in new unnamed buffer. Write the buffer and the data file
will be updated.
*fuf-cache*
Cache ~
@@ -555,6 +653,12 @@ after a path separator is expanded to "../" sequence.
/... /../../
/.... /../../../
*fuf-how-to-add-mode*
How To Add Mode ~
To add "mymode" mode, put the source file at autoload/fuf/mymode.vim and call
fuf#addMode("mymode") .
*fuf-migemo*
What Is Migemo ~
@@ -594,6 +698,15 @@ See also: |fuf-vimrc-example|
Is mostly the same as |:FufFile|, except that initial pattern is a
path of directory current buffer is in.
*:FufCoverageFile*
:FufCoverageFile[!] [{pattern}]
Launchs Coverage-File mode.
If a command was executed with a ! modifier, it does partial matching
instead of fuzzy matching.
{pattern} will be inserted after launching FuzzyFinder.
*:FufDir*
:FufDir[!] [{pattern}]
Launchs Directory mode.
@@ -622,6 +735,11 @@ See also: |fuf-vimrc-example|
{pattern} will be inserted after launching FuzzyFinder.
*:FufMruFileInCwd*
:FufMruFileInCwd[!] [{pattern}]
Is mostly the same as |:FufMruFile|, except that files
only in current working directory are listed.
*:FufMruCmd*
:FufMruCmd[!] [{pattern}]
Launchs MRU-Command mode.
@@ -631,9 +749,18 @@ See also: |fuf-vimrc-example|
{pattern} will be inserted after launching FuzzyFinder.
*:FufBookmark*
:FufBookmark[!] [{pattern}]
Launchs Bookmark mode.
*:FufBookmarkFile*
:FufBookmarkFile[!] [{pattern}]
Launchs Bookmark-File mode.
If a command was executed with a ! modifier, it does partial matching
instead of fuzzy matching.
{pattern} will be inserted after launching FuzzyFinder.
*:FufBookmarkDir*
:FufBookmarkDir[!] [{pattern}]
Launchs Bookmark-Dir mode.
If a command was executed with a ! modifier, it does partial matching
instead of fuzzy matching.
@@ -651,7 +778,42 @@ See also: |fuf-vimrc-example|
*:FufTagWithCursorWord*
:FufTagWithCursorWord[!] [{pattern}]
Is mostly the same as |:FufTag|, except that
Is mostly the same as |:FufTag|, except that initial pattern is the
word under the cursor.
*:FufBufferTag*
:FufBufferTag[!] [{pattern}]
Launchs Buffer-Tag mode.
If a command was executed with a ! modifier, it does partial matching
instead of fuzzy matching.
{pattern} will be inserted after launching FuzzyFinder.
*:FufBufferTagAll*
:FufBufferTagAll[!] [{pattern}]
Is mostly the same as |:FufBufferTag|, except that tags are gathered
from all other buffers in addition to the current one.
*:FufBufferTagWithCursorWord*
:FufBufferTagWithCursorWord[!] [{pattern}]
Is mostly the same as |:FufBufferTag|, except that initial pattern is
the word under the cursor.
*:FufBufferTagAllWithCursorWord*
:FufBufferTagAllWithCursorWord[!] [{pattern}]
Is mostly the same as |:FufBufferTagAll|, except that initial pattern
is the word under the cursor.
*:FufBufferTagWithSelectedText*
:FufBufferTagWithSelectedText[!] [{pattern}]
Is mostly the same as |:FufBufferTag|, except that initial pattern is
the last selected text.
*:FufBufferTagAllWithSelectedText*
:FufBufferTagAllWithSelectedText[!] [{pattern}]
Is mostly the same as |:FufBufferTagAll|, except that initial pattern
is the last selected text.
*:FufTaggedFile*
:FufTaggedFile[!] [{pattern}]
@@ -707,20 +869,44 @@ See also: |fuf-vimrc-example|
{pattern} will be inserted after launching FuzzyFinder.
*:FufEditInfo*
:FufEditInfo
Opens a buffer for editing your information file. See
|fuf-information-file| for details.
*:FufAddBookmark*
:FufAddBookmark [{name}]
Adds a cursor line to bookmarks. See |fuf-adding-bookmark| for
*:FufEditDataFile*
:FufEditDataFile
Opens a buffer for editing your data files. See |fuf-data-file| for
details.
*:FufAddBookmarkAsSelectedText*
:FufAddBookmarkAsSelectedText
Is mostly the same as |:FufAddBookmark|, except that initial pattern
is last selected one.
*:FufCoverageFileRegister*
:FufCoverageFileRegister
Registers new search coverage to be searched in Coverage-File mode.
First, input glob patterns, like ~/* . You can add patterns unless
typing <Esc>. Next, input coverage name.
See also: |glob()|, |fuf-coveragefile-mode|
*:FufCoverageFileChange*
:FufCoverageFileChange [{name}]
Launchs Coverage-File mode with a chosen coverage, registered with
|FufCoverageFileRegister| command.
If location name is given, the choise process will be skipped.
See also: |fuf-coveragefile-mode|
*:FufBookmarkFileAdd*
:FufBookmarkFileAdd [{name}]
Adds a cursor line to bookmarks.
See also: |fuf-bookmarkfile-mode|
*:FufBookmarkFileAddAsSelectedText*
:FufBookmarkFileAddAsSelectedText
Is mostly the same as |:FufBookmarkFileAdd|, except that initial
pattern is the last selected one.
*:FufBookmarkDirAdd*
:FufBookmarkDirAdd [{name}]
Adds a directory to bookmarks.
See also: |fuf-bookmarkdir-mode|
*:FufRenewCache*
:FufRenewCache
@@ -799,11 +985,11 @@ For All Modes ~
<
Key mapped to switch between fuzzy matching and partial matching.
*g:fuf_infoFile* >
let g:fuf_infoFile = '~/.vim-fuf'
*g:fuf_dataDir* >
let g:fuf_dataDir = '~/.vim-fuf-data'
<
Filename to write completion statistics, MRU data, bookmark, etc. If
empty string, FuzzyFinder does not write to a file.
Directory path to which data files is put. If empty string,
FuzzyFinder does not write data files.
*g:fuf_abbrevMap* >
let g:fuf_abbrevMap = {}
@@ -835,12 +1021,13 @@ For All Modes ~
See also: |fuf-search-patterns|
*g:fuf_smartBs* >
let g:fuf_smartBs = 1
*g:fuf_fuzzyRefining* >
let g:fuf_fuzzyRefining = 0
<
If non-zero, pressing <BS> after a path separator deletes one
directory name and pressing <BS> after |g:fuf_patternSeparator|
deletes one pattern.
If non-zero, fuzzy matching is done with refining pattern instead of
partial matching.
See also: |fuf-search-patterns|
*g:fuf_reuseWindow* >
let g:fuf_reuseWindow = 1
@@ -871,12 +1058,17 @@ For All Modes ~
completion menu.
*g:fuf_previewHeight* >
let g:fuf_previewHeight = 5
let g:fuf_previewHeight = 0
<
'cmdheight' is set to this when a mode supporting preview is launched.
Information of selected completion item will be shown on command-line
area. If zero, preview feature is disabled.
*g:fuf_autoPreview* >
let g:fuf_autoPreview = 0
<
If non-zero, previews will be shown automatically.
*g:fuf_useMigemo* >
let g:fuf_useMigemo = 0
<
@@ -901,6 +1093,11 @@ For Buffer Mode ~
<
If non-zero, completion items is sorted in order of recently used.
*g:fuf_buffer_keyDelete* >
let g:fuf_buffer_keyDelete = '<C-]>'
<
Key mapped to delete selected buffer.
*fuf-options-for-file-mode*
For File Mode ~
@@ -916,11 +1113,38 @@ For File Mode ~
number, Fuzzyfinder never switches to this mode.
*g:fuf_file_exclude* >
let g:fuf_file_exclude = '\v\~$|\.(o|exe|dll|bak|swp)$|(^|[/\\])\.(hg|git|bzr)($|[/\\])'
let g:fuf_file_exclude = '\v\~$|\.(o|exe|dll|bak|orig|swp)$|(^|[/\\])\.(hg|git|bzr)($|[/\\])'
<
Regexp pattern for items which you want to exclude from completion
list.
*fuf-options-for-coveragefile-mode*
For Coverage-File Mode ~
*g:fuf_coveragefile_prompt* >
let g:fuf_coveragefile_prompt = '>CoverageFile[]>'
<
Prompt string. "[]" will be substituted with indicators.
*g:fuf_coveragefile_switchOrder* >
let g:fuf_coveragefile_switchOrder = 30
<
Number of order for switching to the next/previous mode. If negative
number, Fuzzyfinder never switches to this mode.
*g:fuf_coveragefile_exclude* >
let g:fuf_coveragefile_exclude = '\v\~$|\.(o|exe|dll|bak|orig|swp)$|(^|[/\\])\.(hg|git|bzr)($|[/\\])'
<
Regexp pattern for items which you want to exclude from completion
list.
*g:fuf_coveragefile_globPatterns* >
let g:fuf_coveragefile_globPatterns = ['**/.*', '**/*']
<
List of glob patterns to get file paths to be searched.
See also: |glob()|
*fuf-options-for-dir-mode*
For Directory Mode ~
@@ -930,7 +1154,7 @@ For Directory Mode ~
Prompt string. "[]" will be substituted with indicators.
*g:fuf_dir_switchOrder* >
let g:fuf_dir_switchOrder = 30
let g:fuf_dir_switchOrder = 40
<
Number of order for switching to the next/previous mode. If negative
number, Fuzzyfinder never switches to this mode.
@@ -942,21 +1166,21 @@ For Directory Mode ~
list.
*fuf-options-for-mrufile-mode*
For Mru-File Mode ~
For MRU-File Mode ~
*g:fuf_mrufile_prompt* >
let g:fuf_mrufile_prompt = '>Mru-File[]>'
let g:fuf_mrufile_prompt = '>MRU-File[]>'
<
Prompt string. "[]" will be substituted with indicators.
*g:fuf_mrufile_switchOrder* >
let g:fuf_mrufile_switchOrder = 40
let g:fuf_mrufile_switchOrder = 50
<
Number of order for switching to the next/previous mode. If negative
number, Fuzzyfinder never switches to this mode.
*g:fuf_mrufile_exclude* >
let g:fuf_mrufile_exclude = '\v\~$|\.(bak|sw[po])$|^(\/\/|\\\\|\/mnt\/|\/media\/)'
let g:fuf_mrufile_exclude = '\v\~$|\.(o|exe|dll|bak|orig|sw[po])$|^(\/\/|\\\\|\/mnt\/|\/media\/)'
<
Regexp pattern for items which you want to exclude from completion
list.
@@ -966,16 +1190,27 @@ For Mru-File Mode ~
<
Ceiling for the number of MRU items to be stored.
*g:fuf_mrufile_maxItemDir* >
let g:fuf_mrufile_maxItemDir = 50
<
Ceiling for the number of parent directories of MRU items to be
stored, which are used for around search.
*g:fuf_mrufile_keyExpand* >
let g:fuf_mrufile_keyExpand = '<C-]>'
<
Key mapped to expand search range.
*fuf-options-for-mrucmd-mode*
For Mru-Cmd Mode ~
For MRU-Cmd Mode ~
*g:fuf_mrucmd_prompt* >
let g:fuf_mrucmd_prompt = '>Mru-Cmd[]>'
let g:fuf_mrucmd_prompt = '>MRU-Cmd[]>'
<
Prompt string. "[]" will be substituted with indicators.
*g:fuf_mrucmd_switchOrder* >
let g:fuf_mrucmd_switchOrder = 50
let g:fuf_mrucmd_switchOrder = 60
<
Number of order for switching to the next/previous mode. If negative
number, Fuzzyfinder never switches to this mode.
@@ -991,28 +1226,47 @@ For Mru-Cmd Mode ~
<
This is the ceiling for the number of MRU items to be stored.
*fuf-options-for-Bookmark-mode*
For Bookmark Mode ~
*fuf-options-for-bookmarkfile-mode*
For Bookmark-File Mode ~
*g:fuf_bookmark_prompt* >
let g:fuf_bookmark_prompt = '>Bookmark[]>'
*g:fuf_bookmarkfile_prompt* >
let g:fuf_bookmarkfile_prompt = '>BookmarkFile[]>'
<
Prompt string. "[]" will be substituted with indicators.
*g:fuf_bookmark_switchOrder* >
let g:fuf_bookmark_switchOrder = 60
*g:fuf_bookmarkfile_switchOrder* >
let g:fuf_bookmarkfile_switchOrder = 70
<
Number of order for switching to the next/previous mode. If negative
number, Fuzzyfinder never switches to this mode.
*g:fuf_bookmark_searchRange* >
let g:fuf_bookmark_searchRange = 400
*g:fuf_bookmarkfile_searchRange* >
let g:fuf_bookmarkfile_searchRange = 400
<
Number of lines which FuzzyFinder searches a matching line from
bookmarked position within.
*g:fuf_bookmark_keyDelete* >
let g:fuf_bookmark_keyDelete = '<C-]>'
*g:fuf_bookmarkfile_keyDelete* >
let g:fuf_bookmarkfile_keyDelete = '<C-]>'
<
Key mapped to delete selected bookmark.
*fuf-options-for-bookmarkdir-mode*
For Bookmark-Dir Mode ~
*g:fuf_bookmarkdir_prompt* >
let g:fuf_bookmarkdir_prompt = '>BookmarkDir[]>'
<
Prompt string. "[]" will be substituted with indicators.
*g:fuf_bookmarkdir_switchOrder* >
let g:fuf_bookmarkdir_switchOrder = 80
<
Number of order for switching to the next/previous mode. If negative
number, Fuzzyfinder never switches to this mode.
*g:fuf_bookmarkdir_keyDelete* >
let g:fuf_bookmarkdir_keyDelete = '<C-]>'
<
Key mapped to delete selected bookmark.
@@ -1025,16 +1279,29 @@ For Tag Mode ~
Prompt string. "[]" will be substituted with indicators.
*g:fuf_tag_switchOrder* >
let g:fuf_tag_switchOrder = 70
let g:fuf_tag_switchOrder = 90
<
Number of order for switching to the next/previous mode. If negative
number, Fuzzyfinder never switches to this mode.
*g:fuf_tag_cache_dir* >
let g:fuf_tag_cache_dir = '~/.vim-fuf-cache/tag'
*fuf-options-for-buffertag-mode*
For Buffer-Tag Mode ~
*g:fuf_buffertag_prompt* >
let g:fuf_buffertag_prompt = '>Buffer-Tag[]>'
<
Cache files are created in this directory. If empty, they are not
created.
Prompt string. "[]" will be substituted with indicators.
*g:fuf_buffertag_switchOrder* >
let g:fuf_buffertag_switchOrder = 100
<
Number of order for switching to the next/previous mode. If negative
number, Fuzzyfinder never switches to this mode.
*g:fuf_buffertag_ctagsPath* >
let g:fuf_buffertag_ctagsPath = 'ctags'
<
Executable file path of Ctags.
*fuf-options-for-taggedfile-mode*
For Tagged-File Mode ~
@@ -1045,17 +1312,11 @@ For Tagged-File Mode ~
Prompt string. "[]" will be substituted with indicators.
*g:fuf_taggedfile_switchOrder* >
let g:fuf_taggedfile_switchOrder = 80
let g:fuf_taggedfile_switchOrder = 110
<
Number of order for switching to the next/previous mode. If negative
number, Fuzzyfinder never switches to this mode.
*g:fuf_taggedfile_cache_dir* >
let g:fuf_taggedfile_cache_dir = '~/.vim-fuf-cache/taggedfile'
<
Cache files are created in this directory. If empty, they are not
created.
*fuf-options-for-jumplist-mode*
For Jump-List Mode ~
@@ -1065,7 +1326,7 @@ For Jump-List Mode ~
Prompt string. "[]" will be substituted with indicators.
*g:fuf_jumplist_switchOrder* >
let g:fuf_jumplist_switchOrder = 90
let g:fuf_jumplist_switchOrder = 120
<
Number of order for switching to the next/previous mode. If negative
number, Fuzzyfinder never switches to this mode.
@@ -1079,7 +1340,7 @@ For Change-List Mode ~
Prompt string. "[]" will be substituted with indicators.
*g:fuf_changelist_switchOrder* >
let g:fuf_changelist_switchOrder = 100
let g:fuf_changelist_switchOrder = 130
<
Number of order for switching to the next/previous mode. If negative
number, Fuzzyfinder never switches to this mode.
@@ -1093,7 +1354,7 @@ For Quickfix Mode ~
Prompt string. "[]" will be substituted with indicators.
*g:fuf_quickfix_switchOrder* >
let g:fuf_quickfix_switchOrder = 110
let g:fuf_quickfix_switchOrder = 140
<
Number of order for switching to the next/previous mode. If negative
number, Fuzzyfinder never switches to this mode.
@@ -1107,7 +1368,7 @@ For Line Mode ~
Prompt string. "[]" will be substituted with indicators.
*g:fuf_line_switchOrder* >
let g:fuf_line_switchOrder = 120
let g:fuf_line_switchOrder = 150
<
Number of order for switching to the next/previous mode. If negative
number, Fuzzyfinder never switches to this mode.
@@ -1121,52 +1382,59 @@ For Help Mode ~
Prompt string. "[]" will be substituted with indicators.
*g:fuf_help_switchOrder* >
let g:fuf_help_switchOrder = 130
let g:fuf_help_switchOrder = 160
<
Number of order for switching to the next/previous mode. If negative
number, Fuzzyfinder never switches to this mode.
*g:fuf_help_cache_dir* >
let g:fuf_help_cache_dir = '~/.vim-fuf-cache/help'
<
Cache files are created in this directory. If empty, they are not
created.
==============================================================================
VIMRC EXAMPLE *fuf-vimrc-example*
>
let g:fuf_modesDisable = []
let g:fuf_abbrevMap = {
\ '^vr:' : map(filter(split(&runtimepath, ','), 'v:val !~ "after$"'), 'v:val . ''/**/'''),
\ '^m0:' : [ '/mnt/d/0/', '/mnt/j/0/' ],
\ }
let g:fuf_mrufile_maxItem = 300
let g:fuf_mrufile_maxItem = 400
let g:fuf_mrucmd_maxItem = 400
nnoremap <silent> <C-n> :FufBuffer<CR>
nnoremap <silent> <C-p> :FufFileWithCurrentBufferDir<CR>
nnoremap <silent> <C-f><C-p> :FufFileWithFullCwd<CR>
nnoremap <silent> <C-f>p :FufFile<CR>
nnoremap <silent> <C-f><C-d> :FufDirWithCurrentBufferDir<CR>
nnoremap <silent> <C-f>d :FufDirWithFullCwd<CR>
nnoremap <silent> <C-f>D :FufDir<CR>
nnoremap <silent> <C-j> :FufMruFile<CR>
nnoremap <silent> <C-k> :FufMruCmd<CR>
nnoremap <silent> <C-b> :FufBookmark<CR>
nnoremap <silent> <C-f><C-t> :FufTag<CR>
nnoremap <silent> <C-f>t :FufTag!<CR>
noremap <silent> g] :FufTagWithCursorWord!<CR>
nnoremap <silent> <C-f><C-f> :FufTaggedFile<CR>
nnoremap <silent> <C-f><C-j> :FufJumpList<CR>
nnoremap <silent> <C-f><C-g> :FufChangeList<CR>
nnoremap <silent> <C-f><C-q> :FufQuickfix<CR>
nnoremap <silent> <C-f><C-l> :FufLine<CR>
nnoremap <silent> <C-f><C-h> :FufHelp<CR>
nnoremap <silent> <C-f><C-b> :FufAddBookmark<CR>
vnoremap <silent> <C-f><C-b> :FufAddBookmarkAsSelectedText<CR>
nnoremap <silent> <C-f><C-e> :FufEditInfo<CR>
nnoremap <silent> <C-f><C-r> :FufRenewCache<CR>
nnoremap <silent> sj :FufBuffer<CR>
nnoremap <silent> sk :FufFileWithCurrentBufferDir<CR>
nnoremap <silent> sK :FufFileWithFullCwd<CR>
nnoremap <silent> s<C-k> :FufFile<CR>
nnoremap <silent> sl :FufCoverageFileChange<CR>
nnoremap <silent> sL :FufCoverageFileChange<CR>
nnoremap <silent> s<C-l> :FufCoverageFileRegister<CR>
nnoremap <silent> sd :FufDirWithCurrentBufferDir<CR>
nnoremap <silent> sD :FufDirWithFullCwd<CR>
nnoremap <silent> s<C-d> :FufDir<CR>
nnoremap <silent> sn :FufMruFile<CR>
nnoremap <silent> sN :FufMruFileInCwd<CR>
nnoremap <silent> sm :FufMruCmd<CR>
nnoremap <silent> su :FufBookmarkFile<CR>
nnoremap <silent> s<C-u> :FufBookmarkFileAdd<CR>
vnoremap <silent> s<C-u> :FufBookmarkFileAddAsSelectedText<CR>
nnoremap <silent> si :FufBookmarkDir<CR>
nnoremap <silent> s<C-i> :FufBookmarkDirAdd<CR>
nnoremap <silent> st :FufTag<CR>
nnoremap <silent> sT :FufTag!<CR>
nnoremap <silent> s<C-]> :FufTagWithCursorWord!<CR>
nnoremap <silent> s, :FufBufferTag<CR>
nnoremap <silent> s< :FufBufferTag!<CR>
vnoremap <silent> s, :FufBufferTagWithSelectedText!<CR>
vnoremap <silent> s< :FufBufferTagWithSelectedText<CR>
nnoremap <silent> s} :FufBufferTagWithCursorWord!<CR>
nnoremap <silent> s. :FufBufferTagAll<CR>
nnoremap <silent> s> :FufBufferTagAll!<CR>
vnoremap <silent> s. :FufBufferTagAllWithSelectedText!<CR>
vnoremap <silent> s> :FufBufferTagAllWithSelectedText<CR>
nnoremap <silent> s] :FufBufferTagAllWithCursorWord!<CR>
nnoremap <silent> sg :FufTaggedFile<CR>
nnoremap <silent> sG :FufTaggedFile!<CR>
nnoremap <silent> so :FufJumpList<CR>
nnoremap <silent> sp :FufChangeList<CR>
nnoremap <silent> sq :FufQuickfix<CR>
nnoremap <silent> sy :FufLine<CR>
nnoremap <silent> sh :FufHelp<CR>
nnoremap <silent> se :FufEditDataFile<CR>
nnoremap <silent> sr :FufRenewCache<CR>
<
==============================================================================
@@ -1183,6 +1451,59 @@ SPECIAL THANKS *fuf-thanks*
==============================================================================
CHANGELOG *fuf-changelog*
4.2.2:
- Fixed a bug that unloaded buffers weren't covered by FufBufferTagAll.
4.2.1:
- Improved response of Buffer-Tag mode.
- Fixed a bug that buffers which had been opened weren't listed in
Coverage-File mode
- Fixed a bug that tag entries including tab characters weren't parsed
correctly in Coverage-File mode
4.2:
- L9 library (vimscript #3252) version 1.1 is required.
- Added Buffer-Tag mode, inspired by taglist.vim (vimscript #273).
- Added :FufMruFileInCwd command.
4.1.1:
- Fixed a bug causing a error in MRU-File mode.
4.1:
- Added Bookmark-Dir mode.
- Added Bookmark-File mode and removed Bookmark mode.
- Changed the filename to store data of Coverage-File mode, from
'~/.vim-fuf-data/coveragefile/items' to
'~/.vim-fuf-data/coveragefile/coverages' .
- Fixed a bug that floating point numbers weren't evaluated correctly and
caused errors on some non-English locales.
- Removed Around-MRU-File mode and integrated its feature to MRU-File mode.
4.0:
- From this version, L9 library (vimscript #3252) is required.
- Added Coverage-File mode for users wanting something like TextMate's
command-t. (But I've never used it.)
- Added Around-MRU-File mode. (Too slow. There is room for improvement.)
- Added new feature which deletes selected buffer with FuzzyFinder and
g:fuf_buffer_keyDelete option.
- Added new feature which allows to set one-time options/variables with
fuf#setOneTimeVariables() function.
- Added g:fuf_dataDir option and removed g:fuf_infoFile,
g:g:fuf_tag_cache_dir, g:fuf_taggedfile_cache_dir, and
g:fuf_help_cache_dir options.
- Added :FufEditDataFile command and removed :FufEditInfo command.
- Added g:fuf_fuzzyRefining option.
- Added new feature which is auto-preview and g:fuf_autoPreview option.
- Changed the default value of g:fuf_previewHeight to 0 in order to disable
preview feature. There is an unfixable problem which is caused by a Vim's
bug.
- Changed the default value of g:fuf_modesDisable option.
- Changed the default value of g:fuf_*_switchOrder options.
- Improved speed of changing buffers.
- Improved the way to add user-defined mode.
- Fixed a bug that FuzzyFinder caused reseting window layout.
- Removed g:fuf_smartBs option. Use <C-w> instead.
3.5:
- Added Line mode.
- Added Help mode.
@@ -1426,7 +1747,7 @@ CHANGELOG *fuf-changelog*
2.3:
- Added a key mapping to open items in a new tab page and
g:FuzzyFinderOptions.Base.key_open_tab opton.
g:FuzzyFinderOptions.Base.key_open_tab option.
- Changed to show Fuzzyfinder window above last window even if 'splitbelow'
was set.
- Changed to set nocursorline and nocursorcolumn in Fuzzyfinder.

453
doc/tags
View File

@@ -39,15 +39,26 @@
:DelimitMateReload delimitMate.txt /*:DelimitMateReload*
:DelimitMateSwitch delimitMate.txt /*:DelimitMateSwitch*
:DelimitMateTest delimitMate.txt /*:DelimitMateTest*
:FufAddBookmark fuf.txt /*:FufAddBookmark*
:FufAddBookmarkAsSelectedText fuf.txt /*:FufAddBookmarkAsSelectedText*
:FufBookmark fuf.txt /*:FufBookmark*
:FufBookmarkDir fuf.txt /*:FufBookmarkDir*
:FufBookmarkDirAdd fuf.txt /*:FufBookmarkDirAdd*
:FufBookmarkFile fuf.txt /*:FufBookmarkFile*
:FufBookmarkFileAdd fuf.txt /*:FufBookmarkFileAdd*
:FufBookmarkFileAddAsSelectedText fuf.txt /*:FufBookmarkFileAddAsSelectedText*
:FufBuffer fuf.txt /*:FufBuffer*
:FufBufferTag fuf.txt /*:FufBufferTag*
:FufBufferTagAll fuf.txt /*:FufBufferTagAll*
:FufBufferTagAllWithCursorWord fuf.txt /*:FufBufferTagAllWithCursorWord*
:FufBufferTagAllWithSelectedText fuf.txt /*:FufBufferTagAllWithSelectedText*
:FufBufferTagWithCursorWord fuf.txt /*:FufBufferTagWithCursorWord*
:FufBufferTagWithSelectedText fuf.txt /*:FufBufferTagWithSelectedText*
:FufChangeList fuf.txt /*:FufChangeList*
:FufCoverageFile fuf.txt /*:FufCoverageFile*
:FufCoverageFileChange fuf.txt /*:FufCoverageFileChange*
:FufCoverageFileRegister fuf.txt /*:FufCoverageFileRegister*
:FufDir fuf.txt /*:FufDir*
:FufDirWithCurrentBufferDir fuf.txt /*:FufDirWithCurrentBufferDir*
:FufDirWithFullCwd fuf.txt /*:FufDirWithFullCwd*
:FufEditInfo fuf.txt /*:FufEditInfo*
:FufEditDataFile fuf.txt /*:FufEditDataFile*
:FufFile fuf.txt /*:FufFile*
:FufFileWithCurrentBufferDir fuf.txt /*:FufFileWithCurrentBufferDir*
:FufFileWithFullCwd fuf.txt /*:FufFileWithFullCwd*
@@ -56,6 +67,7 @@
:FufLine fuf.txt /*:FufLine*
:FufMruCmd fuf.txt /*:FufMruCmd*
:FufMruFile fuf.txt /*:FufMruFile*
:FufMruFileInCwd fuf.txt /*:FufMruFileInCwd*
:FufQuickfix fuf.txt /*:FufQuickfix*
:FufRenewCache fuf.txt /*:FufRenewCache*
:FufTag fuf.txt /*:FufTag*
@@ -175,11 +187,14 @@ delimitMateVisualWrapping delimitMate.txt /*delimitMateVisualWrapping*
delimitMate_WithinEmptyPair delimitMate.txt /*delimitMate_WithinEmptyPair*
ds surround.txt /*ds*
fuf fuf.txt /*fuf*
fuf#setOneTimeVariables() fuf.txt /*fuf#setOneTimeVariables()*
fuf-abbreviation fuf.txt /*fuf-abbreviation*
fuf-about fuf.txt /*fuf-about*
fuf-author fuf.txt /*fuf-author*
fuf-bookmark-mode fuf.txt /*fuf-bookmark-mode*
fuf-bookmarkdir-mode fuf.txt /*fuf-bookmarkdir-mode*
fuf-bookmarkfile-mode fuf.txt /*fuf-bookmarkfile-mode*
fuf-buffer-mode fuf.txt /*fuf-buffer-mode*
fuf-buffertag-mode fuf.txt /*fuf-buffertag-mode*
fuf-cache fuf.txt /*fuf-cache*
fuf-callbackfile-mode fuf.txt /*fuf-callbackfile-mode*
fuf-callbackitem-mode fuf.txt /*fuf-callbackitem-mode*
@@ -187,6 +202,8 @@ fuf-changelist-mode fuf.txt /*fuf-changelist-mode*
fuf-changelog fuf.txt /*fuf-changelog*
fuf-commands fuf.txt /*fuf-commands*
fuf-contact fuf.txt /*fuf-contact*
fuf-coveragefile-mode fuf.txt /*fuf-coveragefile-mode*
fuf-data-file fuf.txt /*fuf-data-file*
fuf-detailed-topics fuf.txt /*fuf-detailed-topics*
fuf-dir-mode fuf.txt /*fuf-dir-mode*
fuf-dot-sequence fuf.txt /*fuf-dot-sequence*
@@ -196,7 +213,7 @@ fuf-givendir-mode fuf.txt /*fuf-givendir-mode*
fuf-givenfile-mode fuf.txt /*fuf-givenfile-mode*
fuf-help-mode fuf.txt /*fuf-help-mode*
fuf-hiding-menu fuf.txt /*fuf-hiding-menu*
fuf-information-file fuf.txt /*fuf-information-file*
fuf-how-to-add-mode fuf.txt /*fuf-how-to-add-mode*
fuf-installation fuf.txt /*fuf-installation*
fuf-introduction fuf.txt /*fuf-introduction*
fuf-jumplist-mode fuf.txt /*fuf-jumplist-mode*
@@ -207,10 +224,13 @@ fuf-mrucmd-mode fuf.txt /*fuf-mrucmd-mode*
fuf-mrufile-mode fuf.txt /*fuf-mrufile-mode*
fuf-multiple-search fuf.txt /*fuf-multiple-search*
fuf-options fuf.txt /*fuf-options*
fuf-options-for-Bookmark-mode fuf.txt /*fuf-options-for-Bookmark-mode*
fuf-options-for-all-modes fuf.txt /*fuf-options-for-all-modes*
fuf-options-for-bookmarkdir-mode fuf.txt /*fuf-options-for-bookmarkdir-mode*
fuf-options-for-bookmarkfile-mode fuf.txt /*fuf-options-for-bookmarkfile-mode*
fuf-options-for-buffer-mode fuf.txt /*fuf-options-for-buffer-mode*
fuf-options-for-buffertag-mode fuf.txt /*fuf-options-for-buffertag-mode*
fuf-options-for-changelist-mode fuf.txt /*fuf-options-for-changelist-mode*
fuf-options-for-coveragefile-mode fuf.txt /*fuf-options-for-coveragefile-mode*
fuf-options-for-dir-mode fuf.txt /*fuf-options-for-dir-mode*
fuf-options-for-file-mode fuf.txt /*fuf-options-for-file-mode*
fuf-options-for-help-mode fuf.txt /*fuf-options-for-help-mode*
@@ -224,6 +244,7 @@ fuf-options-for-taggedfile-mode fuf.txt /*fuf-options-for-taggedfile-mode*
fuf-quickfix-mode fuf.txt /*fuf-quickfix-mode*
fuf-reusing-window fuf.txt /*fuf-reusing-window*
fuf-search-patterns fuf.txt /*fuf-search-patterns*
fuf-setting-one-time-option fuf.txt /*fuf-setting-one-time-option*
fuf-sorting-of-completion-items fuf.txt /*fuf-sorting-of-completion-items*
fuf-tag-mode fuf.txt /*fuf-tag-mode*
fuf-taggedfile-mode fuf.txt /*fuf-taggedfile-mode*
@@ -233,15 +254,28 @@ fuf-vimrc-example fuf.txt /*fuf-vimrc-example*
fuf.txt fuf.txt /*fuf.txt*
fuzzyfinder fuf.txt /*fuzzyfinder*
g:fuf_abbrevMap fuf.txt /*g:fuf_abbrevMap*
g:fuf_bookmark_keyDelete fuf.txt /*g:fuf_bookmark_keyDelete*
g:fuf_bookmark_prompt fuf.txt /*g:fuf_bookmark_prompt*
g:fuf_bookmark_searchRange fuf.txt /*g:fuf_bookmark_searchRange*
g:fuf_bookmark_switchOrder fuf.txt /*g:fuf_bookmark_switchOrder*
g:fuf_autoPreview fuf.txt /*g:fuf_autoPreview*
g:fuf_bookmarkdir_keyDelete fuf.txt /*g:fuf_bookmarkdir_keyDelete*
g:fuf_bookmarkdir_prompt fuf.txt /*g:fuf_bookmarkdir_prompt*
g:fuf_bookmarkdir_switchOrder fuf.txt /*g:fuf_bookmarkdir_switchOrder*
g:fuf_bookmarkfile_keyDelete fuf.txt /*g:fuf_bookmarkfile_keyDelete*
g:fuf_bookmarkfile_prompt fuf.txt /*g:fuf_bookmarkfile_prompt*
g:fuf_bookmarkfile_searchRange fuf.txt /*g:fuf_bookmarkfile_searchRange*
g:fuf_bookmarkfile_switchOrder fuf.txt /*g:fuf_bookmarkfile_switchOrder*
g:fuf_buffer_keyDelete fuf.txt /*g:fuf_buffer_keyDelete*
g:fuf_buffer_mruOrder fuf.txt /*g:fuf_buffer_mruOrder*
g:fuf_buffer_prompt fuf.txt /*g:fuf_buffer_prompt*
g:fuf_buffer_switchOrder fuf.txt /*g:fuf_buffer_switchOrder*
g:fuf_buffertag_ctagsPath fuf.txt /*g:fuf_buffertag_ctagsPath*
g:fuf_buffertag_prompt fuf.txt /*g:fuf_buffertag_prompt*
g:fuf_buffertag_switchOrder fuf.txt /*g:fuf_buffertag_switchOrder*
g:fuf_changelist_prompt fuf.txt /*g:fuf_changelist_prompt*
g:fuf_changelist_switchOrder fuf.txt /*g:fuf_changelist_switchOrder*
g:fuf_coveragefile_exclude fuf.txt /*g:fuf_coveragefile_exclude*
g:fuf_coveragefile_globPatterns fuf.txt /*g:fuf_coveragefile_globPatterns*
g:fuf_coveragefile_prompt fuf.txt /*g:fuf_coveragefile_prompt*
g:fuf_coveragefile_switchOrder fuf.txt /*g:fuf_coveragefile_switchOrder*
g:fuf_dataDir fuf.txt /*g:fuf_dataDir*
g:fuf_dir_exclude fuf.txt /*g:fuf_dir_exclude*
g:fuf_dir_prompt fuf.txt /*g:fuf_dir_prompt*
g:fuf_dir_switchOrder fuf.txt /*g:fuf_dir_switchOrder*
@@ -249,11 +283,10 @@ g:fuf_enumeratingLimit fuf.txt /*g:fuf_enumeratingLimit*
g:fuf_file_exclude fuf.txt /*g:fuf_file_exclude*
g:fuf_file_prompt fuf.txt /*g:fuf_file_prompt*
g:fuf_file_switchOrder fuf.txt /*g:fuf_file_switchOrder*
g:fuf_help_cache_dir fuf.txt /*g:fuf_help_cache_dir*
g:fuf_fuzzyRefining fuf.txt /*g:fuf_fuzzyRefining*
g:fuf_help_prompt fuf.txt /*g:fuf_help_prompt*
g:fuf_help_switchOrder fuf.txt /*g:fuf_help_switchOrder*
g:fuf_ignoreCase fuf.txt /*g:fuf_ignoreCase*
g:fuf_infoFile fuf.txt /*g:fuf_infoFile*
g:fuf_jumplist_prompt fuf.txt /*g:fuf_jumplist_prompt*
g:fuf_jumplist_switchOrder fuf.txt /*g:fuf_jumplist_switchOrder*
g:fuf_keyNextMode fuf.txt /*g:fuf_keyNextMode*
@@ -276,7 +309,9 @@ g:fuf_mrucmd_maxItem fuf.txt /*g:fuf_mrucmd_maxItem*
g:fuf_mrucmd_prompt fuf.txt /*g:fuf_mrucmd_prompt*
g:fuf_mrucmd_switchOrder fuf.txt /*g:fuf_mrucmd_switchOrder*
g:fuf_mrufile_exclude fuf.txt /*g:fuf_mrufile_exclude*
g:fuf_mrufile_keyExpand fuf.txt /*g:fuf_mrufile_keyExpand*
g:fuf_mrufile_maxItem fuf.txt /*g:fuf_mrufile_maxItem*
g:fuf_mrufile_maxItemDir fuf.txt /*g:fuf_mrufile_maxItemDir*
g:fuf_mrufile_prompt fuf.txt /*g:fuf_mrufile_prompt*
g:fuf_mrufile_switchOrder fuf.txt /*g:fuf_mrufile_switchOrder*
g:fuf_patternSeparator fuf.txt /*g:fuf_patternSeparator*
@@ -285,12 +320,9 @@ g:fuf_promptHighlight fuf.txt /*g:fuf_promptHighlight*
g:fuf_quickfix_prompt fuf.txt /*g:fuf_quickfix_prompt*
g:fuf_quickfix_switchOrder fuf.txt /*g:fuf_quickfix_switchOrder*
g:fuf_reuseWindow fuf.txt /*g:fuf_reuseWindow*
g:fuf_smartBs fuf.txt /*g:fuf_smartBs*
g:fuf_splitPathMatching fuf.txt /*g:fuf_splitPathMatching*
g:fuf_tag_cache_dir fuf.txt /*g:fuf_tag_cache_dir*
g:fuf_tag_prompt fuf.txt /*g:fuf_tag_prompt*
g:fuf_tag_switchOrder fuf.txt /*g:fuf_tag_switchOrder*
g:fuf_taggedfile_cache_dir fuf.txt /*g:fuf_taggedfile_cache_dir*
g:fuf_taggedfile_prompt fuf.txt /*g:fuf_taggedfile_prompt*
g:fuf_taggedfile_switchOrder fuf.txt /*g:fuf_taggedfile_switchOrder*
g:fuf_timeFormat fuf.txt /*g:fuf_timeFormat*
@@ -366,6 +398,395 @@ project-settings project.txt /*project-settings*
project-syntax project.txt /*project-syntax*
project-tips project.txt /*project-tips*
project.txt project.txt /*project.txt*
py2stdlib py2stdlib.txt /*py2stdlib*
py2stdlib-__future__ py2stdlib.txt /*py2stdlib-__future__*
py2stdlib-__main__ py2stdlib.txt /*py2stdlib-__main__*
py2stdlib-_winreg py2stdlib.txt /*py2stdlib-_winreg*
py2stdlib-abc py2stdlib.txt /*py2stdlib-abc*
py2stdlib-aepack py2stdlib.txt /*py2stdlib-aepack*
py2stdlib-aetools py2stdlib.txt /*py2stdlib-aetools*
py2stdlib-aetypes py2stdlib.txt /*py2stdlib-aetypes*
py2stdlib-aifc py2stdlib.txt /*py2stdlib-aifc*
py2stdlib-al py2stdlib.txt /*py2stdlib-al*
py2stdlib-al^ py2stdlib.txt /*py2stdlib-al^*
py2stdlib-anydbm py2stdlib.txt /*py2stdlib-anydbm*
py2stdlib-applesingle py2stdlib.txt /*py2stdlib-applesingle*
py2stdlib-argparse py2stdlib.txt /*py2stdlib-argparse*
py2stdlib-array py2stdlib.txt /*py2stdlib-array*
py2stdlib-ast py2stdlib.txt /*py2stdlib-ast*
py2stdlib-asynchat py2stdlib.txt /*py2stdlib-asynchat*
py2stdlib-asyncore py2stdlib.txt /*py2stdlib-asyncore*
py2stdlib-atexit py2stdlib.txt /*py2stdlib-atexit*
py2stdlib-audioop py2stdlib.txt /*py2stdlib-audioop*
py2stdlib-autogil py2stdlib.txt /*py2stdlib-autogil*
py2stdlib-base64 py2stdlib.txt /*py2stdlib-base64*
py2stdlib-basehttpserver py2stdlib.txt /*py2stdlib-basehttpserver*
py2stdlib-bastion py2stdlib.txt /*py2stdlib-bastion*
py2stdlib-bdb py2stdlib.txt /*py2stdlib-bdb*
py2stdlib-binascii py2stdlib.txt /*py2stdlib-binascii*
py2stdlib-binhex py2stdlib.txt /*py2stdlib-binhex*
py2stdlib-bisect py2stdlib.txt /*py2stdlib-bisect*
py2stdlib-bsddb py2stdlib.txt /*py2stdlib-bsddb*
py2stdlib-buildtools py2stdlib.txt /*py2stdlib-buildtools*
py2stdlib-builtin py2stdlib.txt /*py2stdlib-builtin*
py2stdlib-builtin:Constants py2stdlib.txt /*py2stdlib-builtin:Constants*
py2stdlib-builtin:Exceptions py2stdlib.txt /*py2stdlib-builtin:Exceptions*
py2stdlib-builtin:Functions py2stdlib.txt /*py2stdlib-builtin:Functions*
py2stdlib-builtin:Types py2stdlib.txt /*py2stdlib-builtin:Types*
py2stdlib-bz2 py2stdlib.txt /*py2stdlib-bz2*
py2stdlib-calendar py2stdlib.txt /*py2stdlib-calendar*
py2stdlib-carbon.ae py2stdlib.txt /*py2stdlib-carbon.ae*
py2stdlib-carbon.ah py2stdlib.txt /*py2stdlib-carbon.ah*
py2stdlib-carbon.app py2stdlib.txt /*py2stdlib-carbon.app*
py2stdlib-carbon.appearance py2stdlib.txt /*py2stdlib-carbon.appearance*
py2stdlib-carbon.carbonevents py2stdlib.txt /*py2stdlib-carbon.carbonevents*
py2stdlib-carbon.carbonevt py2stdlib.txt /*py2stdlib-carbon.carbonevt*
py2stdlib-carbon.cf py2stdlib.txt /*py2stdlib-carbon.cf*
py2stdlib-carbon.cg py2stdlib.txt /*py2stdlib-carbon.cg*
py2stdlib-carbon.cm py2stdlib.txt /*py2stdlib-carbon.cm*
py2stdlib-carbon.components py2stdlib.txt /*py2stdlib-carbon.components*
py2stdlib-carbon.controlaccessor py2stdlib.txt /*py2stdlib-carbon.controlaccessor*
py2stdlib-carbon.controls py2stdlib.txt /*py2stdlib-carbon.controls*
py2stdlib-carbon.corefounation py2stdlib.txt /*py2stdlib-carbon.corefounation*
py2stdlib-carbon.coregraphics py2stdlib.txt /*py2stdlib-carbon.coregraphics*
py2stdlib-carbon.ctl py2stdlib.txt /*py2stdlib-carbon.ctl*
py2stdlib-carbon.dialogs py2stdlib.txt /*py2stdlib-carbon.dialogs*
py2stdlib-carbon.dlg py2stdlib.txt /*py2stdlib-carbon.dlg*
py2stdlib-carbon.drag py2stdlib.txt /*py2stdlib-carbon.drag*
py2stdlib-carbon.dragconst py2stdlib.txt /*py2stdlib-carbon.dragconst*
py2stdlib-carbon.events py2stdlib.txt /*py2stdlib-carbon.events*
py2stdlib-carbon.evt py2stdlib.txt /*py2stdlib-carbon.evt*
py2stdlib-carbon.file py2stdlib.txt /*py2stdlib-carbon.file*
py2stdlib-carbon.files py2stdlib.txt /*py2stdlib-carbon.files*
py2stdlib-carbon.fm py2stdlib.txt /*py2stdlib-carbon.fm*
py2stdlib-carbon.folder py2stdlib.txt /*py2stdlib-carbon.folder*
py2stdlib-carbon.folders py2stdlib.txt /*py2stdlib-carbon.folders*
py2stdlib-carbon.fonts py2stdlib.txt /*py2stdlib-carbon.fonts*
py2stdlib-carbon.help py2stdlib.txt /*py2stdlib-carbon.help*
py2stdlib-carbon.ibcarbon py2stdlib.txt /*py2stdlib-carbon.ibcarbon*
py2stdlib-carbon.ibcarbonruntime py2stdlib.txt /*py2stdlib-carbon.ibcarbonruntime*
py2stdlib-carbon.icns py2stdlib.txt /*py2stdlib-carbon.icns*
py2stdlib-carbon.icons py2stdlib.txt /*py2stdlib-carbon.icons*
py2stdlib-carbon.launch py2stdlib.txt /*py2stdlib-carbon.launch*
py2stdlib-carbon.launchservices py2stdlib.txt /*py2stdlib-carbon.launchservices*
py2stdlib-carbon.list py2stdlib.txt /*py2stdlib-carbon.list*
py2stdlib-carbon.lists py2stdlib.txt /*py2stdlib-carbon.lists*
py2stdlib-carbon.machelp py2stdlib.txt /*py2stdlib-carbon.machelp*
py2stdlib-carbon.mediadescr py2stdlib.txt /*py2stdlib-carbon.mediadescr*
py2stdlib-carbon.menu py2stdlib.txt /*py2stdlib-carbon.menu*
py2stdlib-carbon.menus py2stdlib.txt /*py2stdlib-carbon.menus*
py2stdlib-carbon.mlte py2stdlib.txt /*py2stdlib-carbon.mlte*
py2stdlib-carbon.osa py2stdlib.txt /*py2stdlib-carbon.osa*
py2stdlib-carbon.osaconst py2stdlib.txt /*py2stdlib-carbon.osaconst*
py2stdlib-carbon.qd py2stdlib.txt /*py2stdlib-carbon.qd*
py2stdlib-carbon.qdoffs py2stdlib.txt /*py2stdlib-carbon.qdoffs*
py2stdlib-carbon.qdoffscreen py2stdlib.txt /*py2stdlib-carbon.qdoffscreen*
py2stdlib-carbon.qt py2stdlib.txt /*py2stdlib-carbon.qt*
py2stdlib-carbon.quickdraw py2stdlib.txt /*py2stdlib-carbon.quickdraw*
py2stdlib-carbon.quicktime py2stdlib.txt /*py2stdlib-carbon.quicktime*
py2stdlib-carbon.res py2stdlib.txt /*py2stdlib-carbon.res*
py2stdlib-carbon.resources py2stdlib.txt /*py2stdlib-carbon.resources*
py2stdlib-carbon.scrap py2stdlib.txt /*py2stdlib-carbon.scrap*
py2stdlib-carbon.snd py2stdlib.txt /*py2stdlib-carbon.snd*
py2stdlib-carbon.sound py2stdlib.txt /*py2stdlib-carbon.sound*
py2stdlib-carbon.te py2stdlib.txt /*py2stdlib-carbon.te*
py2stdlib-carbon.textedit py2stdlib.txt /*py2stdlib-carbon.textedit*
py2stdlib-carbon.win py2stdlib.txt /*py2stdlib-carbon.win*
py2stdlib-carbon.windows py2stdlib.txt /*py2stdlib-carbon.windows*
py2stdlib-cd py2stdlib.txt /*py2stdlib-cd*
py2stdlib-cfmfile py2stdlib.txt /*py2stdlib-cfmfile*
py2stdlib-cgi py2stdlib.txt /*py2stdlib-cgi*
py2stdlib-cgihttpserver py2stdlib.txt /*py2stdlib-cgihttpserver*
py2stdlib-cgitb py2stdlib.txt /*py2stdlib-cgitb*
py2stdlib-chunk py2stdlib.txt /*py2stdlib-chunk*
py2stdlib-cmath py2stdlib.txt /*py2stdlib-cmath*
py2stdlib-cmd py2stdlib.txt /*py2stdlib-cmd*
py2stdlib-code py2stdlib.txt /*py2stdlib-code*
py2stdlib-codecs py2stdlib.txt /*py2stdlib-codecs*
py2stdlib-codeop py2stdlib.txt /*py2stdlib-codeop*
py2stdlib-collections py2stdlib.txt /*py2stdlib-collections*
py2stdlib-colorpicker py2stdlib.txt /*py2stdlib-colorpicker*
py2stdlib-colorsys py2stdlib.txt /*py2stdlib-colorsys*
py2stdlib-commands py2stdlib.txt /*py2stdlib-commands*
py2stdlib-compileall py2stdlib.txt /*py2stdlib-compileall*
py2stdlib-compiler py2stdlib.txt /*py2stdlib-compiler*
py2stdlib-compiler.ast py2stdlib.txt /*py2stdlib-compiler.ast*
py2stdlib-compiler.visitor py2stdlib.txt /*py2stdlib-compiler.visitor*
py2stdlib-configparser py2stdlib.txt /*py2stdlib-configparser*
py2stdlib-contextlib py2stdlib.txt /*py2stdlib-contextlib*
py2stdlib-cookie py2stdlib.txt /*py2stdlib-cookie*
py2stdlib-cookielib py2stdlib.txt /*py2stdlib-cookielib*
py2stdlib-copy py2stdlib.txt /*py2stdlib-copy*
py2stdlib-copy_reg py2stdlib.txt /*py2stdlib-copy_reg*
py2stdlib-cpickle py2stdlib.txt /*py2stdlib-cpickle*
py2stdlib-cprofile py2stdlib.txt /*py2stdlib-cprofile*
py2stdlib-crypt py2stdlib.txt /*py2stdlib-crypt*
py2stdlib-cstringio py2stdlib.txt /*py2stdlib-cstringio*
py2stdlib-csv py2stdlib.txt /*py2stdlib-csv*
py2stdlib-ctypes py2stdlib.txt /*py2stdlib-ctypes*
py2stdlib-curses py2stdlib.txt /*py2stdlib-curses*
py2stdlib-curses.ascii py2stdlib.txt /*py2stdlib-curses.ascii*
py2stdlib-curses.panel py2stdlib.txt /*py2stdlib-curses.panel*
py2stdlib-curses.textpad py2stdlib.txt /*py2stdlib-curses.textpad*
py2stdlib-curses.wrapper py2stdlib.txt /*py2stdlib-curses.wrapper*
py2stdlib-datetime py2stdlib.txt /*py2stdlib-datetime*
py2stdlib-dbhash py2stdlib.txt /*py2stdlib-dbhash*
py2stdlib-dbm py2stdlib.txt /*py2stdlib-dbm*
py2stdlib-decimal py2stdlib.txt /*py2stdlib-decimal*
py2stdlib-device py2stdlib.txt /*py2stdlib-device*
py2stdlib-difflib py2stdlib.txt /*py2stdlib-difflib*
py2stdlib-dircache py2stdlib.txt /*py2stdlib-dircache*
py2stdlib-dis py2stdlib.txt /*py2stdlib-dis*
py2stdlib-distutils py2stdlib.txt /*py2stdlib-distutils*
py2stdlib-dl py2stdlib.txt /*py2stdlib-dl*
py2stdlib-doctest py2stdlib.txt /*py2stdlib-doctest*
py2stdlib-docxmlrpcserver py2stdlib.txt /*py2stdlib-docxmlrpcserver*
py2stdlib-dumbdbm py2stdlib.txt /*py2stdlib-dumbdbm*
py2stdlib-dummy_thread py2stdlib.txt /*py2stdlib-dummy_thread*
py2stdlib-dummy_threading py2stdlib.txt /*py2stdlib-dummy_threading*
py2stdlib-easydialogs py2stdlib.txt /*py2stdlib-easydialogs*
py2stdlib-email py2stdlib.txt /*py2stdlib-email*
py2stdlib-email.charset py2stdlib.txt /*py2stdlib-email.charset*
py2stdlib-email.encoders py2stdlib.txt /*py2stdlib-email.encoders*
py2stdlib-email.errors py2stdlib.txt /*py2stdlib-email.errors*
py2stdlib-email.generator py2stdlib.txt /*py2stdlib-email.generator*
py2stdlib-email.header py2stdlib.txt /*py2stdlib-email.header*
py2stdlib-email.iterators py2stdlib.txt /*py2stdlib-email.iterators*
py2stdlib-email.message py2stdlib.txt /*py2stdlib-email.message*
py2stdlib-email.mime py2stdlib.txt /*py2stdlib-email.mime*
py2stdlib-email.parser py2stdlib.txt /*py2stdlib-email.parser*
py2stdlib-email.utils py2stdlib.txt /*py2stdlib-email.utils*
py2stdlib-encodings.idna py2stdlib.txt /*py2stdlib-encodings.idna*
py2stdlib-encodings.utf_8_sig py2stdlib.txt /*py2stdlib-encodings.utf_8_sig*
py2stdlib-errno py2stdlib.txt /*py2stdlib-errno*
py2stdlib-exceptions py2stdlib.txt /*py2stdlib-exceptions*
py2stdlib-fcntl py2stdlib.txt /*py2stdlib-fcntl*
py2stdlib-filecmp py2stdlib.txt /*py2stdlib-filecmp*
py2stdlib-fileinput py2stdlib.txt /*py2stdlib-fileinput*
py2stdlib-findertools py2stdlib.txt /*py2stdlib-findertools*
py2stdlib-fl py2stdlib.txt /*py2stdlib-fl*
py2stdlib-fl^ py2stdlib.txt /*py2stdlib-fl^*
py2stdlib-flp py2stdlib.txt /*py2stdlib-flp*
py2stdlib-fm py2stdlib.txt /*py2stdlib-fm*
py2stdlib-fnmatch py2stdlib.txt /*py2stdlib-fnmatch*
py2stdlib-formatter py2stdlib.txt /*py2stdlib-formatter*
py2stdlib-fpectl py2stdlib.txt /*py2stdlib-fpectl*
py2stdlib-fpformat py2stdlib.txt /*py2stdlib-fpformat*
py2stdlib-fractions py2stdlib.txt /*py2stdlib-fractions*
py2stdlib-framework py2stdlib.txt /*py2stdlib-framework*
py2stdlib-ftplib py2stdlib.txt /*py2stdlib-ftplib*
py2stdlib-functools py2stdlib.txt /*py2stdlib-functools*
py2stdlib-future_builtins py2stdlib.txt /*py2stdlib-future_builtins*
py2stdlib-gc py2stdlib.txt /*py2stdlib-gc*
py2stdlib-gdbm py2stdlib.txt /*py2stdlib-gdbm*
py2stdlib-gensuitemodule py2stdlib.txt /*py2stdlib-gensuitemodule*
py2stdlib-getopt py2stdlib.txt /*py2stdlib-getopt*
py2stdlib-getpass py2stdlib.txt /*py2stdlib-getpass*
py2stdlib-gettext py2stdlib.txt /*py2stdlib-gettext*
py2stdlib-gl py2stdlib.txt /*py2stdlib-gl*
py2stdlib-gl^ py2stdlib.txt /*py2stdlib-gl^*
py2stdlib-glob py2stdlib.txt /*py2stdlib-glob*
py2stdlib-grp py2stdlib.txt /*py2stdlib-grp*
py2stdlib-gzip py2stdlib.txt /*py2stdlib-gzip*
py2stdlib-hashlib py2stdlib.txt /*py2stdlib-hashlib*
py2stdlib-heapq py2stdlib.txt /*py2stdlib-heapq*
py2stdlib-hmac py2stdlib.txt /*py2stdlib-hmac*
py2stdlib-hotshot py2stdlib.txt /*py2stdlib-hotshot*
py2stdlib-hotshot.stats py2stdlib.txt /*py2stdlib-hotshot.stats*
py2stdlib-htmlentitydefs py2stdlib.txt /*py2stdlib-htmlentitydefs*
py2stdlib-htmllib py2stdlib.txt /*py2stdlib-htmllib*
py2stdlib-htmlparser py2stdlib.txt /*py2stdlib-htmlparser*
py2stdlib-httplib py2stdlib.txt /*py2stdlib-httplib*
py2stdlib-ic py2stdlib.txt /*py2stdlib-ic*
py2stdlib-icopen py2stdlib.txt /*py2stdlib-icopen*
py2stdlib-imageop py2stdlib.txt /*py2stdlib-imageop*
py2stdlib-imaplib py2stdlib.txt /*py2stdlib-imaplib*
py2stdlib-imgfile py2stdlib.txt /*py2stdlib-imgfile*
py2stdlib-imghdr py2stdlib.txt /*py2stdlib-imghdr*
py2stdlib-imp py2stdlib.txt /*py2stdlib-imp*
py2stdlib-importlib py2stdlib.txt /*py2stdlib-importlib*
py2stdlib-imputil py2stdlib.txt /*py2stdlib-imputil*
py2stdlib-inspect py2stdlib.txt /*py2stdlib-inspect*
py2stdlib-io py2stdlib.txt /*py2stdlib-io*
py2stdlib-itertools py2stdlib.txt /*py2stdlib-itertools*
py2stdlib-jpeg py2stdlib.txt /*py2stdlib-jpeg*
py2stdlib-json py2stdlib.txt /*py2stdlib-json*
py2stdlib-keyword py2stdlib.txt /*py2stdlib-keyword*
py2stdlib-lib2to3 py2stdlib.txt /*py2stdlib-lib2to3*
py2stdlib-linecache py2stdlib.txt /*py2stdlib-linecache*
py2stdlib-locale py2stdlib.txt /*py2stdlib-locale*
py2stdlib-logging py2stdlib.txt /*py2stdlib-logging*
py2stdlib-macerrors py2stdlib.txt /*py2stdlib-macerrors*
py2stdlib-macos py2stdlib.txt /*py2stdlib-macos*
py2stdlib-macostools py2stdlib.txt /*py2stdlib-macostools*
py2stdlib-macpath py2stdlib.txt /*py2stdlib-macpath*
py2stdlib-macresource py2stdlib.txt /*py2stdlib-macresource*
py2stdlib-mailbox py2stdlib.txt /*py2stdlib-mailbox*
py2stdlib-mailcap py2stdlib.txt /*py2stdlib-mailcap*
py2stdlib-marshal py2stdlib.txt /*py2stdlib-marshal*
py2stdlib-math py2stdlib.txt /*py2stdlib-math*
py2stdlib-md5 py2stdlib.txt /*py2stdlib-md5*
py2stdlib-mhlib py2stdlib.txt /*py2stdlib-mhlib*
py2stdlib-mimetools py2stdlib.txt /*py2stdlib-mimetools*
py2stdlib-mimetypes py2stdlib.txt /*py2stdlib-mimetypes*
py2stdlib-mimewriter py2stdlib.txt /*py2stdlib-mimewriter*
py2stdlib-mimify py2stdlib.txt /*py2stdlib-mimify*
py2stdlib-miniaeframe py2stdlib.txt /*py2stdlib-miniaeframe*
py2stdlib-mmap py2stdlib.txt /*py2stdlib-mmap*
py2stdlib-modulefinder py2stdlib.txt /*py2stdlib-modulefinder*
py2stdlib-msilib py2stdlib.txt /*py2stdlib-msilib*
py2stdlib-msvcrt py2stdlib.txt /*py2stdlib-msvcrt*
py2stdlib-multifile py2stdlib.txt /*py2stdlib-multifile*
py2stdlib-multiprocessing py2stdlib.txt /*py2stdlib-multiprocessing*
py2stdlib-multiprocessing.connection py2stdlib.txt /*py2stdlib-multiprocessing.connection*
py2stdlib-multiprocessing.dummy py2stdlib.txt /*py2stdlib-multiprocessing.dummy*
py2stdlib-multiprocessing.managers py2stdlib.txt /*py2stdlib-multiprocessing.managers*
py2stdlib-multiprocessing.pool py2stdlib.txt /*py2stdlib-multiprocessing.pool*
py2stdlib-multiprocessing.sharedctypes py2stdlib.txt /*py2stdlib-multiprocessing.sharedctypes*
py2stdlib-mutex py2stdlib.txt /*py2stdlib-mutex*
py2stdlib-nav py2stdlib.txt /*py2stdlib-nav*
py2stdlib-netrc py2stdlib.txt /*py2stdlib-netrc*
py2stdlib-new py2stdlib.txt /*py2stdlib-new*
py2stdlib-nis py2stdlib.txt /*py2stdlib-nis*
py2stdlib-nntplib py2stdlib.txt /*py2stdlib-nntplib*
py2stdlib-numbers py2stdlib.txt /*py2stdlib-numbers*
py2stdlib-operator py2stdlib.txt /*py2stdlib-operator*
py2stdlib-optparse py2stdlib.txt /*py2stdlib-optparse*
py2stdlib-os py2stdlib.txt /*py2stdlib-os*
py2stdlib-os.path py2stdlib.txt /*py2stdlib-os.path*
py2stdlib-ossaudiodev py2stdlib.txt /*py2stdlib-ossaudiodev*
py2stdlib-parser py2stdlib.txt /*py2stdlib-parser*
py2stdlib-pdb py2stdlib.txt /*py2stdlib-pdb*
py2stdlib-pickle py2stdlib.txt /*py2stdlib-pickle*
py2stdlib-pickletools py2stdlib.txt /*py2stdlib-pickletools*
py2stdlib-pipes py2stdlib.txt /*py2stdlib-pipes*
py2stdlib-pixmapwrapper py2stdlib.txt /*py2stdlib-pixmapwrapper*
py2stdlib-pkgutil py2stdlib.txt /*py2stdlib-pkgutil*
py2stdlib-platform py2stdlib.txt /*py2stdlib-platform*
py2stdlib-plistlib py2stdlib.txt /*py2stdlib-plistlib*
py2stdlib-popen2 py2stdlib.txt /*py2stdlib-popen2*
py2stdlib-poplib py2stdlib.txt /*py2stdlib-poplib*
py2stdlib-posix py2stdlib.txt /*py2stdlib-posix*
py2stdlib-posixfile py2stdlib.txt /*py2stdlib-posixfile*
py2stdlib-pprint py2stdlib.txt /*py2stdlib-pprint*
py2stdlib-profile py2stdlib.txt /*py2stdlib-profile*
py2stdlib-pstats py2stdlib.txt /*py2stdlib-pstats*
py2stdlib-pty py2stdlib.txt /*py2stdlib-pty*
py2stdlib-pwd py2stdlib.txt /*py2stdlib-pwd*
py2stdlib-py_compile py2stdlib.txt /*py2stdlib-py_compile*
py2stdlib-pyclbr py2stdlib.txt /*py2stdlib-pyclbr*
py2stdlib-pydoc py2stdlib.txt /*py2stdlib-pydoc*
py2stdlib-queue py2stdlib.txt /*py2stdlib-queue*
py2stdlib-quopri py2stdlib.txt /*py2stdlib-quopri*
py2stdlib-random py2stdlib.txt /*py2stdlib-random*
py2stdlib-re py2stdlib.txt /*py2stdlib-re*
py2stdlib-readline py2stdlib.txt /*py2stdlib-readline*
py2stdlib-repr py2stdlib.txt /*py2stdlib-repr*
py2stdlib-resource py2stdlib.txt /*py2stdlib-resource*
py2stdlib-rexec py2stdlib.txt /*py2stdlib-rexec*
py2stdlib-rfc822 py2stdlib.txt /*py2stdlib-rfc822*
py2stdlib-rlcompleter py2stdlib.txt /*py2stdlib-rlcompleter*
py2stdlib-robotparser py2stdlib.txt /*py2stdlib-robotparser*
py2stdlib-runpy py2stdlib.txt /*py2stdlib-runpy*
py2stdlib-sched py2stdlib.txt /*py2stdlib-sched*
py2stdlib-scrolledtext py2stdlib.txt /*py2stdlib-scrolledtext*
py2stdlib-select py2stdlib.txt /*py2stdlib-select*
py2stdlib-sets py2stdlib.txt /*py2stdlib-sets*
py2stdlib-sgmllib py2stdlib.txt /*py2stdlib-sgmllib*
py2stdlib-sha py2stdlib.txt /*py2stdlib-sha*
py2stdlib-shelve py2stdlib.txt /*py2stdlib-shelve*
py2stdlib-shlex py2stdlib.txt /*py2stdlib-shlex*
py2stdlib-shutil py2stdlib.txt /*py2stdlib-shutil*
py2stdlib-signal py2stdlib.txt /*py2stdlib-signal*
py2stdlib-simplehttpserver py2stdlib.txt /*py2stdlib-simplehttpserver*
py2stdlib-simplexmlrpcserver py2stdlib.txt /*py2stdlib-simplexmlrpcserver*
py2stdlib-site py2stdlib.txt /*py2stdlib-site*
py2stdlib-smtpd py2stdlib.txt /*py2stdlib-smtpd*
py2stdlib-smtplib py2stdlib.txt /*py2stdlib-smtplib*
py2stdlib-sndhdr py2stdlib.txt /*py2stdlib-sndhdr*
py2stdlib-socket py2stdlib.txt /*py2stdlib-socket*
py2stdlib-socketserver py2stdlib.txt /*py2stdlib-socketserver*
py2stdlib-spwd py2stdlib.txt /*py2stdlib-spwd*
py2stdlib-sqlite3 py2stdlib.txt /*py2stdlib-sqlite3*
py2stdlib-ssl py2stdlib.txt /*py2stdlib-ssl*
py2stdlib-stat py2stdlib.txt /*py2stdlib-stat*
py2stdlib-statvfs py2stdlib.txt /*py2stdlib-statvfs*
py2stdlib-string py2stdlib.txt /*py2stdlib-string*
py2stdlib-stringio py2stdlib.txt /*py2stdlib-stringio*
py2stdlib-stringprep py2stdlib.txt /*py2stdlib-stringprep*
py2stdlib-struct py2stdlib.txt /*py2stdlib-struct*
py2stdlib-subprocess py2stdlib.txt /*py2stdlib-subprocess*
py2stdlib-sunau py2stdlib.txt /*py2stdlib-sunau*
py2stdlib-sunaudiodev py2stdlib.txt /*py2stdlib-sunaudiodev*
py2stdlib-sunaudiodev^ py2stdlib.txt /*py2stdlib-sunaudiodev^*
py2stdlib-symbol py2stdlib.txt /*py2stdlib-symbol*
py2stdlib-symtable py2stdlib.txt /*py2stdlib-symtable*
py2stdlib-sys py2stdlib.txt /*py2stdlib-sys*
py2stdlib-sysconfig py2stdlib.txt /*py2stdlib-sysconfig*
py2stdlib-syslog py2stdlib.txt /*py2stdlib-syslog*
py2stdlib-tabnanny py2stdlib.txt /*py2stdlib-tabnanny*
py2stdlib-tarfile py2stdlib.txt /*py2stdlib-tarfile*
py2stdlib-telnetlib py2stdlib.txt /*py2stdlib-telnetlib*
py2stdlib-tempfile py2stdlib.txt /*py2stdlib-tempfile*
py2stdlib-termios py2stdlib.txt /*py2stdlib-termios*
py2stdlib-test py2stdlib.txt /*py2stdlib-test*
py2stdlib-test.test_support py2stdlib.txt /*py2stdlib-test.test_support*
py2stdlib-textwrap py2stdlib.txt /*py2stdlib-textwrap*
py2stdlib-thread py2stdlib.txt /*py2stdlib-thread*
py2stdlib-threading py2stdlib.txt /*py2stdlib-threading*
py2stdlib-time py2stdlib.txt /*py2stdlib-time*
py2stdlib-timeit py2stdlib.txt /*py2stdlib-timeit*
py2stdlib-tix py2stdlib.txt /*py2stdlib-tix*
py2stdlib-tkinter py2stdlib.txt /*py2stdlib-tkinter*
py2stdlib-token py2stdlib.txt /*py2stdlib-token*
py2stdlib-tokenize py2stdlib.txt /*py2stdlib-tokenize*
py2stdlib-trace py2stdlib.txt /*py2stdlib-trace*
py2stdlib-traceback py2stdlib.txt /*py2stdlib-traceback*
py2stdlib-ttk py2stdlib.txt /*py2stdlib-ttk*
py2stdlib-tty py2stdlib.txt /*py2stdlib-tty*
py2stdlib-turtle py2stdlib.txt /*py2stdlib-turtle*
py2stdlib-types py2stdlib.txt /*py2stdlib-types*
py2stdlib-unicodedata py2stdlib.txt /*py2stdlib-unicodedata*
py2stdlib-unittest py2stdlib.txt /*py2stdlib-unittest*
py2stdlib-urllib py2stdlib.txt /*py2stdlib-urllib*
py2stdlib-urllib2 py2stdlib.txt /*py2stdlib-urllib2*
py2stdlib-urlparse py2stdlib.txt /*py2stdlib-urlparse*
py2stdlib-user py2stdlib.txt /*py2stdlib-user*
py2stdlib-userdict py2stdlib.txt /*py2stdlib-userdict*
py2stdlib-userlist py2stdlib.txt /*py2stdlib-userlist*
py2stdlib-userstring py2stdlib.txt /*py2stdlib-userstring*
py2stdlib-uu py2stdlib.txt /*py2stdlib-uu*
py2stdlib-uuid py2stdlib.txt /*py2stdlib-uuid*
py2stdlib-videoreader py2stdlib.txt /*py2stdlib-videoreader*
py2stdlib-w py2stdlib.txt /*py2stdlib-w*
py2stdlib-warnings py2stdlib.txt /*py2stdlib-warnings*
py2stdlib-wave py2stdlib.txt /*py2stdlib-wave*
py2stdlib-weakref py2stdlib.txt /*py2stdlib-weakref*
py2stdlib-webbrowser py2stdlib.txt /*py2stdlib-webbrowser*
py2stdlib-whichdb py2stdlib.txt /*py2stdlib-whichdb*
py2stdlib-winsound py2stdlib.txt /*py2stdlib-winsound*
py2stdlib-wsgiref py2stdlib.txt /*py2stdlib-wsgiref*
py2stdlib-wsgiref.handlers py2stdlib.txt /*py2stdlib-wsgiref.handlers*
py2stdlib-wsgiref.headers py2stdlib.txt /*py2stdlib-wsgiref.headers*
py2stdlib-wsgiref.simple_server py2stdlib.txt /*py2stdlib-wsgiref.simple_server*
py2stdlib-wsgiref.util py2stdlib.txt /*py2stdlib-wsgiref.util*
py2stdlib-wsgiref.validate py2stdlib.txt /*py2stdlib-wsgiref.validate*
py2stdlib-xdrlib py2stdlib.txt /*py2stdlib-xdrlib*
py2stdlib-xml.dom py2stdlib.txt /*py2stdlib-xml.dom*
py2stdlib-xml.dom.minidom py2stdlib.txt /*py2stdlib-xml.dom.minidom*
py2stdlib-xml.dom.pulldom py2stdlib.txt /*py2stdlib-xml.dom.pulldom*
py2stdlib-xml.etree.elementtree py2stdlib.txt /*py2stdlib-xml.etree.elementtree*
py2stdlib-xml.parsers.expat py2stdlib.txt /*py2stdlib-xml.parsers.expat*
py2stdlib-xml.sax py2stdlib.txt /*py2stdlib-xml.sax*
py2stdlib-xml.sax.handler py2stdlib.txt /*py2stdlib-xml.sax.handler*
py2stdlib-xml.sax.saxutils py2stdlib.txt /*py2stdlib-xml.sax.saxutils*
py2stdlib-xml.sax.xmlreader py2stdlib.txt /*py2stdlib-xml.sax.xmlreader*
py2stdlib-xmllib py2stdlib.txt /*py2stdlib-xmllib*
py2stdlib-xmlrpclib py2stdlib.txt /*py2stdlib-xmlrpclib*
py2stdlib-zipfile py2stdlib.txt /*py2stdlib-zipfile*
py2stdlib-zipimport py2stdlib.txt /*py2stdlib-zipimport*
py2stdlib-zlib py2stdlib.txt /*py2stdlib-zlib*
py2stdlib.txt py2stdlib.txt /*py2stdlib.txt*
showmarks showmarks.txt /*showmarks*
showmarks-changelog showmarks.txt /*showmarks-changelog*
showmarks-commands showmarks.txt /*showmarks-commands*

View File

@@ -16,13 +16,16 @@ setlocal colorcolumn=+1
set wildignore+=*.pyc
"inoremap # X<BS>#
inoremap # X<BS>#
"set ofu=syntaxcomplete#Complete
"autocmd FileType python setlocal omnifunc=pysmell#Complete
let python_highlight_all=1
"I don't want to have pyflakes errors in qfix, it interfering with Pep8/Pylint
let g:pyflakes_use_quickfix = 0
"Load views for py files
autocmd BufWinLeave *.py mkview
autocmd BufWinEnter *.py silent loadview

View File

@@ -101,6 +101,10 @@ au FileType python,man map <buffer> <leader>pW :call ShowPyDoc('<C-R><C-A>', 1)<
au FileType python,man map <buffer> <leader>pk :call ShowPyDoc('<C-R><C-W>', 0)<CR>
au FileType python,man map <buffer> <leader>pK :call ShowPyDoc('<C-R><C-A>', 0)<CR>
" remap the K (or 'help') key
nnoremap <silent> <buffer> K :call ShowPyDoc(expand("<cword>"), 1)<CR>
"commands
command -nargs=1 Pydoc :call ShowPyDoc('<args>', 1)
command -nargs=* PydocSearch :call ShowPyDoc('<args>', 0)
command! -nargs=1 Pydoc :call ShowPyDoc('<args>', 1)
command! -nargs=* PydocSearch :call ShowPyDoc('<args>', 0)

View File

@@ -29,6 +29,11 @@ if !exists("b:did_python_init")
finish
endif
if !exists('g:pyflakes_use_quickfix')
let g:pyflakes_use_quickfix = 1
endif
python << EOF
import vim
import os.path
@@ -154,11 +159,47 @@ if !exists("*s:WideMsg")
let x=&ruler | let y=&showcmd
set noruler noshowcmd
redraw
echo a:msg
echo strpart(a:msg, 0, &columns-1)
let &ruler=x | let &showcmd=y
endfun
endif
if !exists("*s:GetQuickFixStackCount")
function s:GetQuickFixStackCount()
let l:stack_count = 0
try
silent colder 9
catch /E380:/
endtry
try
for i in range(9)
silent cnewer
let l:stack_count = l:stack_count + 1
endfor
catch /E381:/
return l:stack_count
endtry
endfunction
endif
if !exists("*s:ActivatePyflakesQuickFixWindow")
function s:ActivatePyflakesQuickFixWindow()
try
silent colder 9 " go to the bottom of quickfix stack
catch /E380:/
endtry
if s:pyflakes_qf > 0
try
exe "silent cnewer " . s:pyflakes_qf
catch /E381:/
echoerr "Could not activate Pyflakes Quickfix Window."
endtry
endif
endfunction
endif
if !exists("*s:RunPyflakes")
function s:RunPyflakes()
highlight link PyFlakes SpellBad
@@ -174,6 +215,10 @@ if !exists("*s:RunPyflakes")
let b:matched = []
let b:matchedlines = {}
let b:qf_list = []
let b:qf_window_count = -1
python << EOF
for w in check(vim.current.buffer):
vim.command('let s:matchDict = {}')
@@ -181,6 +226,13 @@ for w in check(vim.current.buffer):
vim.command("let s:matchDict['message'] = '%s'" % vim_quote(w.message % w.message_args))
vim.command("let b:matchedlines[" + str(w.lineno) + "] = s:matchDict")
vim.command("let l:qf_item = {}")
vim.command("let l:qf_item.bufnr = bufnr('%')")
vim.command("let l:qf_item.filename = expand('%')")
vim.command("let l:qf_item.lnum = %s" % str(w.lineno))
vim.command("let l:qf_item.text = '%s'" % vim_quote(w.message % w.message_args))
vim.command("let l:qf_item.type = 'E'")
if w.col is None or isinstance(w, SyntaxError):
# without column information, just highlight the whole line
# (minus the newline)
@@ -189,8 +241,24 @@ for w in check(vim.current.buffer):
# with a column number, highlight the first keyword there
vim.command(r"let s:mID = matchadd('PyFlakes', '^\%" + str(w.lineno) + r"l\_.\{-}\zs\k\+\k\@!\%>" + str(w.col) + r"c')")
vim.command("let l:qf_item.vcol = 1")
vim.command("let l:qf_item.col = %s" % str(w.col + 1))
vim.command("call add(b:matched, s:matchDict)")
vim.command("call add(b:qf_list, l:qf_item)")
EOF
if g:pyflakes_use_quickfix == 1
if exists("s:pyflakes_qf")
" if pyflakes quickfix window is already created, reuse it
call s:ActivatePyflakesQuickFixWindow()
call setqflist(b:qf_list, 'r')
else
" one pyflakes quickfix window for all buffer
call setqflist(b:qf_list, '')
let s:pyflakes_qf = s:GetQuickFixStackCount()
endif
endif
let b:cleared = 0
endfunction
end

View File

@@ -5,7 +5,7 @@ This version of PyFlakes_ has been improved to use Python's newer ``ast``
module, instead of ``compiler``. So code checking happens faster, and will stay
up to date with new language changes.
.. _PyFlakes: http://http://www.divmod.org/trac/wiki/DivmodPyflakes
.. _PyFlakes: http://www.divmod.org/trac/wiki/DivmodPyflakes
TODO
----

View File

@@ -23,10 +23,37 @@ import re
from docutils import core
from docutils import nodes
from docutils.parsers.rst import directives, Directive
from docutils.writers.html4css1 import Writer, HTMLTranslator
from pygments import highlight
from pygments.lexers import get_lexer_by_name, TextLexer
from pygments.formatters import HtmlFormatter
import vim
class Pygments(Directive):
"""
Source code syntax hightlighting.
"""
required_arguments = 1
optional_arguments = 0
final_argument_whitespace = True
has_content = True
def run(self):
self.assert_has_content()
try:
lexer = get_lexer_by_name(self.arguments[0])
except ValueError:
# no lexer found - use the text one instead of an exception
lexer = TextLexer()
# take an arbitrary option if more than one is given
formatter = HtmlFormatter(noclasses=True)
parsed = highlight(u'\n'.join(self.content), lexer, formatter)
return [nodes.raw('', parsed, format='html')]
directives.register_directive('sourcecode', Pygments)
class NoHeaderHTMLTranslator(HTMLTranslator):
def __init__(self, document):
@@ -104,7 +131,7 @@ if name.lower().endswith(".rst"):
vim.command(r'silent! %s/<!-- more -->/\r<!-- more -->\r/g')
except:
pass
vim.command('w %s' % name)
vim.command('w %s' % name.replace(' ', '\ '))
vim.command('bd')
else:
print "Ihis is not reSt file. File should have '.rst' extension."

View File

@@ -1,17 +1,18 @@
"=============================================================================
" Copyright (c) 2007-2009 Takeshi NISHIDA
" Copyright (c) 2007-2010 Takeshi NISHIDA
"
" GetLatestVimScripts: 1984 1 :AutoInstall: FuzzyFinder
"=============================================================================
" LOAD GUARD {{{1
if exists('g:loaded_fuf')
try
if !l9#guardScriptLoading(expand('<sfile>:p'), 702, 101, [])
finish
elseif v:version < 702
echoerr 'FuzzyFinder does not support this version of vim (' . v:version . ').'
endif
catch /E117/
echoerr '***** L9 library must be installed! *****'
finish
endif
let g:loaded_fuf = 1
endtry
" }}}1
"=============================================================================
@@ -20,152 +21,132 @@ let g:loaded_fuf = 1
"
function s:initialize()
"---------------------------------------------------------------------------
call s:defineOption('g:fuf_modes' , [
\ 'buffer', 'file', 'dir', 'mrufile', 'mrucmd',
\ 'bookmark', 'tag', 'taggedfile',
\ 'jumplist', 'changelist', 'quickfix', 'line', 'help',
\ 'givenfile', 'givendir', 'givencmd',
\ 'callbackfile', 'callbackitem',
\ ])
call s:defineOption('g:fuf_modesDisable' , [ 'mrufile', 'mrucmd', ])
call s:defineOption('g:fuf_keyOpen' , '<CR>')
call s:defineOption('g:fuf_keyOpenSplit' , '<C-j>')
call s:defineOption('g:fuf_keyOpenVsplit' , '<C-k>')
call s:defineOption('g:fuf_keyOpenTabpage' , '<C-l>')
call s:defineOption('g:fuf_keyPreview' , '<C-@>')
call s:defineOption('g:fuf_keyNextMode' , '<C-t>')
call s:defineOption('g:fuf_keyPrevMode' , '<C-y>')
call s:defineOption('g:fuf_keyPrevPattern' , '<C-s>')
call s:defineOption('g:fuf_keyNextPattern' , '<C-_>')
call s:defineOption('g:fuf_keySwitchMatching', '<C-\><C-\>')
call s:defineOption('g:fuf_infoFile' , '~/.vim-fuf')
call s:defineOption('g:fuf_abbrevMap' , {})
call s:defineOption('g:fuf_patternSeparator' , ';')
call s:defineOption('g:fuf_promptHighlight' , 'Question')
call s:defineOption('g:fuf_ignoreCase' , 1)
call s:defineOption('g:fuf_splitPathMatching', 1)
call s:defineOption('g:fuf_smartBs' , 1)
call s:defineOption('g:fuf_reuseWindow' , 1)
call s:defineOption('g:fuf_timeFormat' , '(%Y-%m-%d %H:%M:%S)')
call s:defineOption('g:fuf_learningLimit' , 100)
call s:defineOption('g:fuf_enumeratingLimit' , 50)
call s:defineOption('g:fuf_maxMenuWidth' , 78)
call s:defineOption('g:fuf_previewHeight' , 10)
call s:defineOption('g:fuf_useMigemo' , 0)
call l9#defineVariableDefault('g:fuf_modesDisable' , [ 'mrufile', 'mrucmd', ])
call l9#defineVariableDefault('g:fuf_keyOpen' , '<CR>')
call l9#defineVariableDefault('g:fuf_keyOpenSplit' , '<C-j>')
call l9#defineVariableDefault('g:fuf_keyOpenVsplit' , '<C-k>')
call l9#defineVariableDefault('g:fuf_keyOpenTabpage' , '<C-l>')
call l9#defineVariableDefault('g:fuf_keyPreview' , '<C-@>')
call l9#defineVariableDefault('g:fuf_keyNextMode' , '<C-t>')
call l9#defineVariableDefault('g:fuf_keyPrevMode' , '<C-y>')
call l9#defineVariableDefault('g:fuf_keyPrevPattern' , '<C-s>')
call l9#defineVariableDefault('g:fuf_keyNextPattern' , '<C-_>')
call l9#defineVariableDefault('g:fuf_keySwitchMatching', '<C-\><C-\>')
call l9#defineVariableDefault('g:fuf_dataDir' , '~/.vim-fuf-data')
call l9#defineVariableDefault('g:fuf_abbrevMap' , {})
call l9#defineVariableDefault('g:fuf_patternSeparator' , ';')
call l9#defineVariableDefault('g:fuf_promptHighlight' , 'Question')
call l9#defineVariableDefault('g:fuf_ignoreCase' , 1)
call l9#defineVariableDefault('g:fuf_splitPathMatching', 1)
call l9#defineVariableDefault('g:fuf_fuzzyRefining' , 0)
call l9#defineVariableDefault('g:fuf_smartBs' , 1)
call l9#defineVariableDefault('g:fuf_reuseWindow' , 1)
call l9#defineVariableDefault('g:fuf_timeFormat' , '(%Y-%m-%d %H:%M:%S)')
call l9#defineVariableDefault('g:fuf_learningLimit' , 100)
call l9#defineVariableDefault('g:fuf_enumeratingLimit' , 50)
call l9#defineVariableDefault('g:fuf_maxMenuWidth' , 78)
call l9#defineVariableDefault('g:fuf_previewHeight' , 0)
call l9#defineVariableDefault('g:fuf_autoPreview' , 0)
call l9#defineVariableDefault('g:fuf_useMigemo' , 0)
"---------------------------------------------------------------------------
call s:defineOption('g:fuf_buffer_prompt' , '>Buffer[]>')
call s:defineOption('g:fuf_buffer_switchOrder', 10)
call s:defineOption('g:fuf_buffer_mruOrder' , 1)
call l9#defineVariableDefault('g:fuf_buffer_prompt' , '>Buffer[]>')
call l9#defineVariableDefault('g:fuf_buffer_switchOrder', 10)
call l9#defineVariableDefault('g:fuf_buffer_mruOrder' , 1)
call l9#defineVariableDefault('g:fuf_buffer_keyDelete' , '<C-]>')
"---------------------------------------------------------------------------
call s:defineOption('g:fuf_file_prompt' , '>File[]>')
call s:defineOption('g:fuf_file_switchOrder', 20)
call s:defineOption('g:fuf_file_exclude' , '\v\~$|\.(o|exe|dll|bak|sw[po])$|(^|[/\\])\.(hg|git|bzr)($|[/\\])')
call l9#defineVariableDefault('g:fuf_file_prompt' , '>File[]>')
call l9#defineVariableDefault('g:fuf_file_switchOrder', 20)
call l9#defineVariableDefault('g:fuf_file_exclude' , '\v\~$|\.(o|exe|dll|bak|orig|sw[po])$|(^|[/\\])\.(hg|git|bzr)($|[/\\])')
"---------------------------------------------------------------------------
call s:defineOption('g:fuf_dir_prompt' , '>Dir[]>')
call s:defineOption('g:fuf_dir_switchOrder', 30)
call s:defineOption('g:fuf_dir_exclude' , '\v(^|[/\\])\.(hg|git|bzr)($|[/\\])')
call l9#defineVariableDefault('g:fuf_coveragefile_prompt' , '>CoverageFile[]>')
call l9#defineVariableDefault('g:fuf_coveragefile_switchOrder', 30)
call l9#defineVariableDefault('g:fuf_coveragefile_exclude' , '\v\~$|\.(o|exe|dll|bak|orig|sw[po])$|(^|[/\\])\.(hg|git|bzr)($|[/\\])')
call l9#defineVariableDefault('g:fuf_coveragefile_globPatterns', ['**/.*', '**/*'])
"---------------------------------------------------------------------------
call s:defineOption('g:fuf_mrufile_prompt' , '>Mru-File[]>')
call s:defineOption('g:fuf_mrufile_switchOrder', 40)
call s:defineOption('g:fuf_mrufile_exclude' , '\v\~$|\.(bak|sw[po])$|^(\/\/|\\\\|\/mnt\/|\/media\/)')
call s:defineOption('g:fuf_mrufile_maxItem' , 200)
call l9#defineVariableDefault('g:fuf_dir_prompt' , '>Dir[]>')
call l9#defineVariableDefault('g:fuf_dir_switchOrder', 40)
call l9#defineVariableDefault('g:fuf_dir_exclude' , '\v(^|[/\\])\.(hg|git|bzr)($|[/\\])')
"---------------------------------------------------------------------------
call s:defineOption('g:fuf_mrucmd_prompt' , '>Mru-Cmd[]>')
call s:defineOption('g:fuf_mrucmd_switchOrder', 50)
call s:defineOption('g:fuf_mrucmd_exclude' , '^$')
call s:defineOption('g:fuf_mrucmd_maxItem' , 200)
call l9#defineVariableDefault('g:fuf_mrufile_prompt' , '>MRU-File[]>')
call l9#defineVariableDefault('g:fuf_mrufile_switchOrder', 50)
call l9#defineVariableDefault('g:fuf_mrufile_exclude' , '\v\~$|\.(o|exe|dll|bak|orig|sw[po])$|^(\/\/|\\\\|\/mnt\/|\/media\/)')
call l9#defineVariableDefault('g:fuf_mrufile_maxItem' , 200)
call l9#defineVariableDefault('g:fuf_mrufile_maxItemDir' , 50)
call l9#defineVariableDefault('g:fuf_mrufile_keyExpand' , '<C-]>')
"---------------------------------------------------------------------------
call s:defineOption('g:fuf_bookmark_prompt' , '>Bookmark[]>')
call s:defineOption('g:fuf_bookmark_switchOrder', 60)
call s:defineOption('g:fuf_bookmark_searchRange', 400)
call s:defineOption('g:fuf_bookmark_keyDelete' , '<C-]>')
call l9#defineVariableDefault('g:fuf_mrucmd_prompt' , '>MRU-Cmd[]>')
call l9#defineVariableDefault('g:fuf_mrucmd_switchOrder', 60)
call l9#defineVariableDefault('g:fuf_mrucmd_exclude' , '^$')
call l9#defineVariableDefault('g:fuf_mrucmd_maxItem' , 200)
"---------------------------------------------------------------------------
call s:defineOption('g:fuf_tag_prompt' , '>Tag[]>')
call s:defineOption('g:fuf_tag_switchOrder', 70)
call s:defineOption('g:fuf_tag_cache_dir' , '~/.vim-fuf-cache/tag')
call l9#defineVariableDefault('g:fuf_bookmarkfile_prompt' , '>Bookmark-File[]>')
call l9#defineVariableDefault('g:fuf_bookmarkfile_switchOrder', 70)
call l9#defineVariableDefault('g:fuf_bookmarkfile_searchRange', 400)
call l9#defineVariableDefault('g:fuf_bookmarkfile_keyDelete' , '<C-]>')
"---------------------------------------------------------------------------
call s:defineOption('g:fuf_taggedfile_prompt' , '>Tagged-File[]>')
call s:defineOption('g:fuf_taggedfile_switchOrder', 80)
call s:defineOption('g:fuf_taggedfile_cache_dir' , '~/.vim-fuf-cache/taggedfile')
call l9#defineVariableDefault('g:fuf_bookmarkdir_prompt' , '>Bookmark-Dir[]>')
call l9#defineVariableDefault('g:fuf_bookmarkdir_switchOrder', 80)
call l9#defineVariableDefault('g:fuf_bookmarkdir_keyDelete' , '<C-]>')
"---------------------------------------------------------------------------
call s:defineOption('g:fuf_jumplist_prompt' , '>Jump-List[]>')
call s:defineOption('g:fuf_jumplist_switchOrder', 90)
call l9#defineVariableDefault('g:fuf_tag_prompt' , '>Tag[]>')
call l9#defineVariableDefault('g:fuf_tag_switchOrder', 90)
"---------------------------------------------------------------------------
call s:defineOption('g:fuf_changelist_prompt' , '>Change-List[]>')
call s:defineOption('g:fuf_changelist_switchOrder', 100)
call l9#defineVariableDefault('g:fuf_buffertag_prompt' , '>Buffer-Tag[]>')
call l9#defineVariableDefault('g:fuf_buffertag_switchOrder', 100)
call l9#defineVariableDefault('g:fuf_buffertag_ctagsPath' , 'ctags')
"---------------------------------------------------------------------------
call s:defineOption('g:fuf_quickfix_prompt' , '>Quickfix[]>')
call s:defineOption('g:fuf_quickfix_switchOrder', 110)
call l9#defineVariableDefault('g:fuf_taggedfile_prompt' , '>Tagged-File[]>')
call l9#defineVariableDefault('g:fuf_taggedfile_switchOrder', 110)
"---------------------------------------------------------------------------
call s:defineOption('g:fuf_line_prompt' , '>Line[]>')
call s:defineOption('g:fuf_line_switchOrder', 120)
call l9#defineVariableDefault('g:fuf_jumplist_prompt' , '>Jump-List[]>')
call l9#defineVariableDefault('g:fuf_jumplist_switchOrder', 120)
"---------------------------------------------------------------------------
call s:defineOption('g:fuf_help_prompt' , '>Help[]>')
call s:defineOption('g:fuf_help_switchOrder', 130)
call s:defineOption('g:fuf_help_cache_dir' , '~/.vim-fuf-cache/help')
call l9#defineVariableDefault('g:fuf_changelist_prompt' , '>Change-List[]>')
call l9#defineVariableDefault('g:fuf_changelist_switchOrder', 130)
"---------------------------------------------------------------------------
call filter(g:fuf_modes, 'count(g:fuf_modesDisable, v:val) == 0')
for m in g:fuf_modes
call fuf#{m}#renewCache()
call fuf#{m}#onInit()
endfor
call l9#defineVariableDefault('g:fuf_quickfix_prompt' , '>Quickfix[]>')
call l9#defineVariableDefault('g:fuf_quickfix_switchOrder', 140)
"---------------------------------------------------------------------------
command! -bang -narg=0 FufEditInfo call fuf#editInfoFile()
call l9#defineVariableDefault('g:fuf_line_prompt' , '>Line[]>')
call l9#defineVariableDefault('g:fuf_line_switchOrder', 150)
"---------------------------------------------------------------------------
call l9#defineVariableDefault('g:fuf_help_prompt' , '>Help[]>')
call l9#defineVariableDefault('g:fuf_help_switchOrder', 160)
"---------------------------------------------------------------------------
command! -bang -narg=0 FufEditDataFile call fuf#editDataFile()
command! -bang -narg=0 FufRenewCache call s:renewCachesOfAllModes()
"---------------------------------------------------------------------------
for m in g:fuf_modes
if fuf#{m}#requiresOnCommandPre()
" cnoremap has a problem, which doesn't expand cabbrev.
cmap <silent> <expr> <CR> <SID>onCommandPre()
break
endif
endfor
call fuf#addMode('buffer')
call fuf#addMode('file')
call fuf#addMode('coveragefile')
call fuf#addMode('dir')
call fuf#addMode('mrufile')
call fuf#addMode('mrucmd')
call fuf#addMode('bookmarkfile')
call fuf#addMode('bookmarkdir')
call fuf#addMode('tag')
call fuf#addMode('buffertag')
call fuf#addMode('taggedfile')
call fuf#addMode('jumplist')
call fuf#addMode('changelist')
call fuf#addMode('quickfix')
call fuf#addMode('line')
call fuf#addMode('help')
call fuf#addMode('givenfile')
call fuf#addMode('givendir')
call fuf#addMode('givencmd')
call fuf#addMode('callbackfile')
call fuf#addMode('callbackitem')
"---------------------------------------------------------------------------
endfunction
"
function s:initMisc()
endfunction
"
function s:defineOption(name, default)
if !exists(a:name)
let {a:name} = a:default
endif
endfunction
"
function s:renewCachesOfAllModes()
for m in g:fuf_modes
for m in fuf#getModeNames()
call fuf#{m}#renewCache()
endfor
endfunction
"
function s:onBufEnter()
for m in g:fuf_modes
call fuf#{m}#onBufEnter()
endfor
endfunction
"
function s:onBufWritePost()
for m in g:fuf_modes
call fuf#{m}#onBufWritePost()
endfor
endfunction
"
function s:onCommandPre()
for m in filter(copy(g:fuf_modes), 'fuf#{v:val}#requiresOnCommandPre()')
call fuf#{m}#onCommandPre(getcmdtype() . getcmdline())
endfor
" lets last entry become the newest in the history
call histadd(getcmdtype(), getcmdline())
" this is not mapped again (:help recursive_mapping)
return "\<CR>"
endfunction
" }}}1
"=============================================================================
" INITIALIZATION {{{1