Commits

Takeshi NISHIDA committed cc8f81c

Added Around-MRU-File mode.

  • Participants
  • Parent commits 75dbec6

Comments (0)

Files changed (5)

File autoload/fuf.vim

   let result = copy(a:mrulist)
   let result = filter(result,'v:val.word !=# a:newItem.word')
   let result = insert(result, a:newItem)
-  let result = filter(result, 'v:val.word !~ a:exclude')
+  if len(a:exclude)
+    let result = filter(result, 'v:val.word !~ a:exclude')
+  endif
   return result[0 : a:maxItem - 1]
 endfunction
 
         \ 's:setRanks(v:val, patternSet.primaryForRank, exprBoundary, stats)')
 endfunction
 
-          "\ 'inoremap <buffer> <silent> %s <C-r>=fuf#getRunningHandler().%s ? "" : ""<CR>',
 "
 function s:handlerBase.onComplete(findstart, base)
   if a:findstart

File autoload/fuf/aroundmrufile.vim

+"=============================================================================
+" Copyright (c) 2010 Takeshi NISHIDA
+"
+"=============================================================================
+" LOAD GUARD {{{1
+
+if !l9#guardScriptLoading(expand('<sfile>:p'), 702, 100)
+  finish
+endif
+
+" }}}1
+"=============================================================================
+" GLOBAL FUNCTIONS {{{1
+
+"
+function fuf#aroundmrufile#createHandler(base)
+  return a:base.concretize(copy(s:handler))
+endfunction
+
+"
+function fuf#aroundmrufile#getSwitchOrder()
+  return g:fuf_aroundmrufile_switchOrder
+endfunction
+
+"
+function fuf#aroundmrufile#renewCache()
+  let s:cache = {}
+endfunction
+
+"
+function fuf#aroundmrufile#requiresOnCommandPre()
+  return 0
+endfunction
+
+"
+function fuf#aroundmrufile#onInit()
+  call fuf#defineLaunchCommand('FufAroundMruFile', s:MODE_NAME, '""')
+  augroup fuf#aroundmrufile
+    autocmd!
+    autocmd BufEnter     * call s:updateInfo()
+    autocmd BufWritePost * call s:updateInfo()
+  augroup END
+endfunction
+
+" }}}1
+"=============================================================================
+" LOCAL FUNCTIONS/VARIABLES {{{1
+
+let s:MODE_NAME = expand('<sfile>:t:r')
+
+"
+function s:updateInfo()
+  if !empty(&buftype) || !filereadable(expand('%'))
+    return
+  endif
+  let info = fuf#loadInfoFile(s:MODE_NAME)
+  let info.data = fuf#updateMruList(
+        \ info.data, { 'word' : expand('%:p:h') },
+        \ g:fuf_aroundmrufile_maxDir, g:fuf_aroundmrufile_exclude)
+  call fuf#saveInfoFile(s:MODE_NAME, info)
+endfunction
+
+"
+function s:listFilesUsingCache(dir)
+  if !exists('s:cache[a:dir]')
+    let s:cache[a:dir] = [a:dir] +
+          \              split(glob(a:dir . l9#getPathSeparator() . "*" ), "\n") +
+          \              split(glob(a:dir . l9#getPathSeparator() . ".*"), "\n")
+    call filter(s:cache[a:dir], 'v:val !~ ''\v(^|[/\\])\.\.?$''')
+    call map(s:cache[a:dir], 'fuf#makePathItem(fnamemodify(v:val, ":~"), "", 0)')
+    if len(g:fuf_aroundmrufile_exclude)
+      call filter(s:cache[a:dir], 'v:val.word !~ g:fuf_aroundmrufile_exclude')
+    endif
+  endif
+  return s:cache[a:dir]
+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_aroundmrufile_prompt, self.partialMatching)
+endfunction
+
+"
+function s:handler.getPreviewHeight()
+  return g:fuf_previewHeight
+endfunction
+
+"
+function s:handler.targetsPath()
+  return 1
+endfunction
+
+"
+function s:handler.makePatternSet(patternBase)
+  return fuf#makePatternSet(a:patternBase, 's:interpretPrimaryPatternForPath',
+        \                   self.partialMatching)
+endfunction
+
+"
+function s:handler.makePreviewLines(word, count)
+  return fuf#makePreviewLinesForFile(a:word, a:count, self.getPreviewHeight())
+endfunction
+
+"
+function s:handler.getCompleteItems(patternPrimary)
+  return self.items
+endfunction
+
+"
+function s:handler.onOpen(word, mode)
+  if isdirectory(expand(a:word))
+    let self.reservedMode = 'file'
+    let self.lastPattern = a:word . l9#getPathSeparator()
+  else
+    call fuf#openFile(a:word, a:mode, g:fuf_reuseWindow)
+  endif
+endfunction
+
+"
+function s:handler.onModeEnterPre()
+endfunction
+
+"
+function s:handler.onModeEnterPost()
+  " NOTE: Comparing filenames is faster than bufnr('^' . fname . '$')
+  let bufNamePrev = fnamemodify(bufname(self.bufNrPrev), ':p:~')
+  let self.items = copy(self.info.data)
+  call map(self.items, 's:listFilesUsingCache(v:val.word)')
+  let self.items = l9#concat(self.items)
+  call filter(self.items, '!empty(v:val) && v:val.word !=# bufNamePrev')
+  call fuf#mapToSetSerialIndex(self.items, 1)
+  call fuf#mapToSetAbbrWithSnippedWordAsPath(self.items)
+endfunction
+
+"
+function s:handler.onModeLeavePost(opened)
+endfunction
+
+" }}}1
+"=============================================================================
+" vim: set fdm=marker:
         - ファイル
         - ディレクトリ
         - 最近使ったファイル
+        - 最近使ったファイルの近くのファイル
         - 最近使ったコマンドライン
         - ブックマーク
         - タグ
 次のコマンドで FuzzyFinder を起動します:
 
          コマンド                  モード ~
-        |:FufBuffer|     - Buffer モード (|fuf-buffer-mode|)
-        |:FufFile|       - File モード (|fuf-file-mode|)
-        |:FufDir|        - Directory モード (|fuf-dir-mode|)
-        |:FufMruFile|    - MRU-File モード (|fuf-mrufile-mode|)
-        |:FufMruCmd|     - MRU-Command モード (|fuf-mrucmd-mode|)
-        |:FufBookmark|   - Bookmark モード (|fuf-bookmark-mode|)
-        |:FufTag|        - Tag モード (|fuf-tag-mode|)
-        |:FufTaggedFile| - Tagged-File モード (|fuf-taggedfile-mode|)
-        |:FufJumpList|   - Jump-List モード (|fuf-jumplist-mode|)
-        |:FufChangeList| - Change-List モード (|fuf-changelist-mode|)
-        |:FufQuickfix|   - Quickfix モード (|fuf-quickfix-mode|)
-        |:FufLine|       - Line モード (|fuf-line-mode|)
-        |:FufHelp|       - Help モード (|fuf-help-mode|)
+        |:FufBuffer|       - Buffer モード (|fuf-buffer-mode|)
+        |:FufFile|         - File モード (|fuf-file-mode|)
+        |:FufDir|          - Directory モード (|fuf-dir-mode|)
+        |:FufMruFile|      - MRU-File モード (|fuf-mrufile-mode|)
+        |:FufAroundMruFile|- Around-MRU-File モード (|fuf-aroundmrufile-mode|)
+        |:FufMruCmd|       - MRU-Command モード (|fuf-mrucmd-mode|)
+        |:FufBookmark|     - Bookmark モード (|fuf-bookmark-mode|)
+        |:FufTag|          - Tag モード (|fuf-tag-mode|)
+        |:FufTaggedFile|   - Tagged-File モード (|fuf-taggedfile-mode|)
+        |:FufJumpList|     - Jump-List モード (|fuf-jumplist-mode|)
+        |:FufChangeList|   - Change-List モード (|fuf-changelist-mode|)
+        |:FufQuickfix|     - Quickfix モード (|fuf-quickfix-mode|)
+        |:FufLine|         - Line モード (|fuf-line-mode|)
+        |:FufHelp|         - Help モード (|fuf-help-mode|)
 
 これらのコマンドを押しやすいキーにマッピングすることを推奨します。
 
 |BufEnter| と |BufWritePost| で行う処理がパフォーマンス上の問題を起こしうるの
 で、デフォルトでは|g:fuf_modesDisable|で無効化するモードに指定されています。
 
+                                                      *fuf-aroundmrufile-mode*
+Around-MRU-File モード ~
+
+このモードは最近使ったファイルの付近にあるファイルを選択して開くインターフェー
+スを提供します。ディレクトリを選択した場合、そこからFile モードを開始します。
+
+|BufEnter| と |BufWritePost| で行う処理がパフォーマンス上の問題を起こしうるの
+で、デフォルトでは|g:fuf_modesDisable|で無効化するモードに指定されています。
+
                                                              *fuf-mrucmd-mode*
 MRU-Command モード ~
 
 
         FuzzyFinder 起動後に {pattern} が挿入されます。
 
+                                                           *:FufAroundMruFile*
+:FufAroundMruFile [{pattern}]
+        Around-MRU-File モードを起動します。
+
+        ! 修飾子を付けて実行した場合、あいまい検索ではなく部分一致検索を行うよ
+        うになります。
+
+        FuzzyFinder 起動後に {pattern} が挿入されます。
+
                                                                   *:FufMruCmd*
 :FufMruCmd [{pattern}]
         MRU-Command モードを起動します。
 全モード用 ~
 
                                                        *g:fuf_modesDisable*  >
-  let g:fuf_modesDisable = [ 'mrufile', 'mrucmd', ]
+  let g:fuf_modesDisable = [ 'mrufile', 'aroundmrufile', 'mrucmd', ]
 <
         無効にするモード名のリスト。これに含まれるモードは初期化されず、イベン
         トの処理も行われません。
         されます。0 ならプレビュー機能は無効になります。
 
                                                         *g:fuf_autoPreview*  >
-  let g:fuf_autoPreview = 1
+  let g:fuf_autoPreview = 0
 <
         TODO
 
         補完リストから除外したいアイテムの正規表現パターン。
 
                                                 *fuf-options-for-mrufile-mode*
-Mru-File モード用 ~
+MRU-File モード用 ~
 
                                                      *g:fuf_mrufile_prompt*  >
-  let g:fuf_mrufile_prompt = '>Mru-File[]>'
+  let g:fuf_mrufile_prompt = '>MRU-File[]>'
 <
         プロンプト文字列。"[]" はインジケータに置換されます。
 
 <
         保持するMRUアイテムの上限値。
 
+                                          *fuf-options-for-aroundmrufile-mode*
+Around-MRU-File モード用 ~
+
+                                               *g:fuf_aroundmrufile_prompt*  >
+  let g:fuf_aroundmrufile_prompt = '>MRU-File[]>'
+<
+        プロンプト文字列。"[]" はインジケータに置換されます。
+
+                                          *g:fuf_aroundmrufile_switchOrder*  >
+  let g:fuf_aroundmrufile_switchOrder = 50
+<
+        次/前のモードに切り替えるときの、モードの順位です。負数ならこのモード
+        には切り替えません。
+
+                                              *g:fuf_aroundmrufile_exclude*  >
+  let g:fuf_aroundmrufile_exclude = '\v\~$|\.(o|exe|dll|bak|sw[po])$|(^|[/\\])\.(hg|git|bzr)($|[/\\])|^(\/\/|\\\\|\/mnt\/|\/media\/)'
+<
+        補完リストから除外したいアイテムの正規表現パターン。
+
+                                              *g:fuf_aroundmrufile_maxDir*  >
+  let g:fuf_aroundmrufile_maxDir = 100
+<
+        保持するMRUアイテムの親ディレクトリの上限値。
+
                                                  *fuf-options-for-mrucmd-mode*
-Mru-Cmd モード用 ~
+MRU-Cmd モード用 ~
 
                                                       *g:fuf_mrucmd_prompt*  >
-  let g:fuf_mrucmd_prompt = '>Mru-Cmd[]>'
+  let g:fuf_mrucmd_prompt = '>MRU-Cmd[]>'
 <
         プロンプト文字列。"[]" はインジケータに置換されます。
 
                                                  *g:fuf_mrucmd_switchOrder*  >
-  let g:fuf_mrucmd_switchOrder = 50
+  let g:fuf_mrucmd_switchOrder = 60
 <
         次/前のモードに切り替えるときの、モードの順位です。負数ならこのモード
         には切り替えません。
         プロンプト文字列。"[]" はインジケータに置換されます。
 
                                                *g:fuf_bookmark_switchOrder*  >
-  let g:fuf_bookmark_switchOrder = 60
+  let g:fuf_bookmark_switchOrder = 70
 <
         次/前のモードに切り替えるときの、モードの順位です。負数ならこのモード
         には切り替えません。
         プロンプト文字列。"[]" はインジケータに置換されます。
 
                                                     *g:fuf_tag_switchOrder*  >
-  let g:fuf_tag_switchOrder = 70
+  let g:fuf_tag_switchOrder = 80
 <
         次/前のモードに切り替えるときの、モードの順位です。負数ならこのモード
         には切り替えません。
         プロンプト文字列。"[]" はインジケータに置換されます。
 
                                              *g:fuf_taggedfile_switchOrder*  >
-  let g:fuf_taggedfile_switchOrder = 80
+  let g:fuf_taggedfile_switchOrder = 90
 <
         次/前のモードに切り替えるときの、モードの順位です。負数ならこのモード
         には切り替えません。
         プロンプト文字列。"[]" はインジケータに置換されます。
 
                                                *g:fuf_jumplist_switchOrder*  >
-  let g:fuf_jumplist_switchOrder = 90
+  let g:fuf_jumplist_switchOrder = 100
 <
         次/前のモードに切り替えるときの、モードの順位です。負数ならこのモード
         には切り替えません。
         プロンプト文字列。"[]" はインジケータに置換されます。
 
                                              *g:fuf_changelist_switchOrder*  >
-  let g:fuf_changelist_switchOrder = 100
+  let g:fuf_changelist_switchOrder = 110
 <
         次/前のモードに切り替えるときの、モードの順位です。負数ならこのモード
         には切り替えません。
         プロンプト文字列。"[]" はインジケータに置換されます。
 
                                              *g:fuf_quickfix_switchOrder*  >
-  let g:fuf_quickfix_switchOrder = 110
+  let g:fuf_quickfix_switchOrder = 120
 <
         次/前のモードに切り替えるときの、モードの順位です。負数ならこのモード
         には切り替えません。
         プロンプト文字列。"[]" はインジケータに置換されます。
 
                                                    *g:fuf_line_switchOrder*  >
-  let g:fuf_line_switchOrder = 120
+  let g:fuf_line_switchOrder = 130
 <
         次/前のモードに切り替えるときの、モードの順位です。負数ならこのモード
         には切り替えません。
         プロンプト文字列。"[]" はインジケータに置換されます。
 
                                                    *g:fuf_help_switchOrder*  >
-  let g:fuf_help_switchOrder = 130
+  let g:fuf_help_switchOrder = 140
 <
         次/前のモードに切り替えるときの、モードの順位です。負数ならこのモード
         には切り替えません。
         \   '^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_mrucmd_maxItem = 400
+  let g:fuf_mrufile_maxItem = 500
+  let g:fuf_mrucmd_maxItem = 500
   nnoremap <silent> <C-n>      :FufBuffer<CR>
   nnoremap <silent> <C-p>      :FufFileWithCurrentBufferDir<CR>
   nnoremap <silent> <C-f><C-p> :FufFileWithFullCwd<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-k>      :FufAroundMruFile<CR>
+  nnoremap <silent> <C-f><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>
         - files
         - directories
         - most recently used files
+        - files around most recently used files
         - most recently used command-lines
         - bookmarks
         - tags
 You can launch FuzzyFinder by following commands:
 
          Command           Mode ~
-        |:FufBuffer|     - Buffer mode (|fuf-buffer-mode|)
-        |:FufFile|       - File mode (|fuf-file-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|)
-        |:FufTag|        - Tag mode (|fuf-tag-mode|)
-        |:FufTaggedFile| - Tagged-File mode (|fuf-taggedfile-mode|)
-        |:FufJumpList|   - Jump-List mode (|fuf-jumplist-mode|)
-        |:FufChangeList| - Change-List mode (|fuf-changelist-mode|)
-        |:FufQuickfix|   - Quickfix mode (|fuf-quickfix-mode|)
-        |:FufLine|       - Line mode (|fuf-line-mode|)
-        |:FufHelp|       - Help mode (|fuf-help-mode|)
+        |:FufBuffer|       - Buffer mode (|fuf-buffer-mode|)
+        |:FufFile|         - File mode (|fuf-file-mode|)
+        |:FufDir|          - Directory mode (|fuf-dir-mode|)
+        |:FufMruFile|      - MRU-File mode (|fuf-mrufile-mode|)
+        |:FufAroundMruFile|- Around-MRU-File mode (|fuf-aroundmrufile-mode|)
+        |:FufMruCmd|       - MRU-Command mode (|fuf-mrucmd-mode|)
+        |:FufBookmark|     - Bookmark mode (|fuf-bookmark-mode|)
+        |:FufTag|          - Tag mode (|fuf-tag-mode|)
+        |:FufTaggedFile|   - Tagged-File mode (|fuf-taggedfile-mode|)
+        |:FufJumpList|     - Jump-List mode (|fuf-jumplist-mode|)
+        |:FufChangeList|   - Change-List mode (|fuf-changelist-mode|)
+        |:FufQuickfix|     - Quickfix mode (|fuf-quickfix-mode|)
+        |:FufLine|         - Line mode (|fuf-line-mode|)
+        |:FufHelp|         - Help mode (|fuf-help-mode|)
 
 It is recommended to map these commands.
 
                                                             *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
+processes for this mode in |BufEnter| and |BufWritePost| could cause
+Performance issue.
+
+                                                      *fuf-aroundmrufile-mode*
+Around-MRU-File mode ~
+
+This mode provides an interface to select a file around the most recently used
+files and open it. If a directory is selected, File mode will be launched from
+there.
 
 This mode is set to disable in |g:fuf_modesDisable| by default because
 processes for this mode in |BufEnter| and |BufWritePost| could cause
                                                              *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
 <CR> of Command-line mode required by this mode has side effects.
 
         {pattern} will be inserted after launching FuzzyFinder.
 
+                                                           *:FufAroundMruFile*
+:FufAroundMruFile[!] [{pattern}]
+        Launchs Around-MRU-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.
+
                                                                   *:FufMruCmd*
 :FufMruCmd[!] [{pattern}]
         Launchs MRU-Command mode.
 For All Modes ~
 
                                                        *g:fuf_modesDisable*  >
-  let g:fuf_modesDisable = [ 'mrufile', 'mrucmd', ]
+  let g:fuf_modesDisable = [ 'mrufile', 'aroundmrufile', 'mrucmd', ]
 <
         List of mode names to disable.
 
         area. If zero, preview feature is disabled.
 
                                                         *g:fuf_autoPreview*  >
-  let g:fuf_autoPreview = 1
+  let g:fuf_autoPreview = 0
 <
         TODO
 
         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.
 
 <
         Ceiling for the number of MRU items to be stored.
 
+                                          *fuf-options-for-aroundmrufile-mode*
+For Around-MRU-File Mode ~
+
+                                               *g:fuf_aroundmrufile_prompt*  >
+  let g:fuf_aroundmrufile_prompt = '>MRU-File[]>'
+<
+        Prompt string. "[]" will be substituted with indicators.
+
+                                          *g:fuf_aroundmrufile_switchOrder*  >
+  let g:fuf_aroundmrufile_switchOrder = 50
+<
+        Number of order for switching to the next/previous mode. If negative
+        number, Fuzzyfinder never switches to this mode.
+
+                                              *g:fuf_aroundmrufile_exclude*  >
+  let g:fuf_aroundmrufile_exclude = '\v\~$|\.(bak|sw[po])$|^(\/\/|\\\\|\/mnt\/|\/media\/)'
+  let g:fuf_aroundmrufile_exclude = '\v\~$|\.(o|exe|dll|bak|sw[po])$|(^|[/\\])\.(hg|git|bzr)($|[/\\])|^(\/\/|\\\\|\/mnt\/|\/media\/)'
+<
+        Regexp pattern for items which you want to exclude from completion
+        list.
+
+                                              *g:fuf_aroundmrufile_maxDir*  >
+  let g:fuf_aroundmrufile_maxDir = 100
+<
+        Ceiling for the number of parent directories of MRU items to be
+        stored.
+
                                                  *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.
         Prompt string. "[]" will be substituted with indicators.
 
                                                *g:fuf_bookmark_switchOrder*  >
-  let g:fuf_bookmark_switchOrder = 60
+  let g:fuf_bookmark_switchOrder = 70
 <
         Number of order for switching to the next/previous mode. If negative
         number, Fuzzyfinder never switches to this mode.
         Prompt string. "[]" will be substituted with indicators.
 
                                                     *g:fuf_tag_switchOrder*  >
-  let g:fuf_tag_switchOrder = 70
+  let g:fuf_tag_switchOrder = 80
 <
         Number of order for switching to the next/previous mode. If negative
         number, Fuzzyfinder never switches to this mode.
         Prompt string. "[]" will be substituted with indicators.
 
                                              *g:fuf_taggedfile_switchOrder*  >
-  let g:fuf_taggedfile_switchOrder = 80
+  let g:fuf_taggedfile_switchOrder = 90
 <
         Number of order for switching to the next/previous mode. If negative
         number, Fuzzyfinder never switches to this mode.
         Prompt string. "[]" will be substituted with indicators.
 
                                                *g:fuf_jumplist_switchOrder*  >
-  let g:fuf_jumplist_switchOrder = 90
+  let g:fuf_jumplist_switchOrder = 100
 <
         Number of order for switching to the next/previous mode. If negative
         number, Fuzzyfinder never switches to this mode.
         Prompt string. "[]" will be substituted with indicators.
 
                                              *g:fuf_changelist_switchOrder*  >
-  let g:fuf_changelist_switchOrder = 100
+  let g:fuf_changelist_switchOrder = 110
 <
         Number of order for switching to the next/previous mode. If negative
         number, Fuzzyfinder never switches to this mode.
         Prompt string. "[]" will be substituted with indicators.
 
                                              *g:fuf_quickfix_switchOrder*  >
-  let g:fuf_quickfix_switchOrder = 110
+  let g:fuf_quickfix_switchOrder = 120
 <
         Number of order for switching to the next/previous mode. If negative
         number, Fuzzyfinder never switches to this mode.
         Prompt string. "[]" will be substituted with indicators.
 
                                                    *g:fuf_line_switchOrder*  >
-  let g:fuf_line_switchOrder = 120
+  let g:fuf_line_switchOrder = 130
 <
         Number of order for switching to the next/previous mode. If negative
         number, Fuzzyfinder never switches to this mode.
         Prompt string. "[]" will be substituted with indicators.
 
                                                    *g:fuf_help_switchOrder*  >
-  let g:fuf_help_switchOrder = 130
+  let g:fuf_help_switchOrder = 140
 <
         Number of order for switching to the next/previous mode. If negative
         number, Fuzzyfinder never switches to this mode.
         \   '^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_mrucmd_maxItem = 400
+  let g:fuf_mrufile_maxItem = 500
+  let g:fuf_mrucmd_maxItem = 500
   nnoremap <silent> <C-n>      :FufBuffer<CR>
   nnoremap <silent> <C-p>      :FufFileWithCurrentBufferDir<CR>
   nnoremap <silent> <C-f><C-p> :FufFileWithFullCwd<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-k>      :FufAroundMruFile<CR>
+  nnoremap <silent> <C-f><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>
 CHANGELOG                                                      *fuf-changelog*
 
 4.0: [TODO]
+  - Added Around-MRU-File mode.
+  - Added new feature which is auto-preview and g:fuf_autoPreview option.
   - 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

File plugin/fuf.vim

 function s:initialize()
   "---------------------------------------------------------------------------
   call l9#defineVariableDefault('g:fuf_modes'  , [
-        \   'buffer', 'file', 'dir', 'mrufile', 'mrucmd',
+        \   'buffer', 'file', 'dir', 'mrufile', 'aroundmrufile', 'mrucmd',
         \   'bookmark', 'tag', 'taggedfile',
         \   'jumplist', 'changelist', 'quickfix', 'line', 'help',
         \   'givenfile', 'givendir', 'givencmd',
         \   'callbackfile', 'callbackitem',
         \ ])
-  call l9#defineVariableDefault('g:fuf_modesDisable'     , [ 'mrufile', 'mrucmd', ])
+  call l9#defineVariableDefault('g:fuf_modesDisable'     , [ 'mrufile', 'aroundmrufile', '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_enumeratingLimit' , 50)
   call l9#defineVariableDefault('g:fuf_maxMenuWidth'     , 78)
   call l9#defineVariableDefault('g:fuf_previewHeight'    , 10)
-  call l9#defineVariableDefault('g:fuf_autoPreview'      , 1)
+  call l9#defineVariableDefault('g:fuf_autoPreview'      , 0)
   call l9#defineVariableDefault('g:fuf_useMigemo'        , 0)
   "---------------------------------------------------------------------------
   call l9#defineVariableDefault('g:fuf_buffer_prompt'     , '>Buffer[]>')
   call l9#defineVariableDefault('g:fuf_dir_switchOrder', 30)
   call l9#defineVariableDefault('g:fuf_dir_exclude'    , '\v(^|[/\\])\.(hg|git|bzr)($|[/\\])')
   "---------------------------------------------------------------------------
-  call l9#defineVariableDefault('g:fuf_mrufile_prompt'     , '>Mru-File[]>')
+  call l9#defineVariableDefault('g:fuf_mrufile_prompt'     , '>MRU-File[]>')
   call l9#defineVariableDefault('g:fuf_mrufile_switchOrder', 40)
   call l9#defineVariableDefault('g:fuf_mrufile_exclude'    , '\v\~$|\.(bak|sw[po])$|^(\/\/|\\\\|\/mnt\/|\/media\/)')
   call l9#defineVariableDefault('g:fuf_mrufile_maxItem'    , 200)
   "---------------------------------------------------------------------------
-  call l9#defineVariableDefault('g:fuf_mrucmd_prompt'     , '>Mru-Cmd[]>')
-  call l9#defineVariableDefault('g:fuf_mrucmd_switchOrder', 50)
+  call l9#defineVariableDefault('g:fuf_aroundmrufile_prompt'     , '>Around-MRU-File[]>')
+  call l9#defineVariableDefault('g:fuf_aroundmrufile_switchOrder', 50)
+  call l9#defineVariableDefault('g:fuf_aroundmrufile_exclude'    , '\v\~$|\.(o|exe|dll|bak|sw[po])$|(^|[/\\])\.(hg|git|bzr)($|[/\\])|^(\/\/|\\\\|\/mnt\/|\/media\/)')
+  call l9#defineVariableDefault('g:fuf_aroundmrufile_maxDir'    , 100)
+  "---------------------------------------------------------------------------
+  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 l9#defineVariableDefault('g:fuf_bookmark_prompt'     , '>Bookmark[]>')
-  call l9#defineVariableDefault('g:fuf_bookmark_switchOrder', 60)
+  call l9#defineVariableDefault('g:fuf_bookmark_switchOrder', 70)
   call l9#defineVariableDefault('g:fuf_bookmark_searchRange', 400)
   call l9#defineVariableDefault('g:fuf_bookmark_keyDelete'  , '<C-]>')
   "---------------------------------------------------------------------------
   call l9#defineVariableDefault('g:fuf_tag_prompt'     , '>Tag[]>')
-  call l9#defineVariableDefault('g:fuf_tag_switchOrder', 70)
+  call l9#defineVariableDefault('g:fuf_tag_switchOrder', 80)
   call l9#defineVariableDefault('g:fuf_tag_cache_dir'  , '~/.vim-fuf-cache/tag')
   "---------------------------------------------------------------------------
   call l9#defineVariableDefault('g:fuf_taggedfile_prompt'     , '>Tagged-File[]>')
-  call l9#defineVariableDefault('g:fuf_taggedfile_switchOrder', 80)
+  call l9#defineVariableDefault('g:fuf_taggedfile_switchOrder', 90)
   call l9#defineVariableDefault('g:fuf_taggedfile_cache_dir'  , '~/.vim-fuf-cache/taggedfile')
   "---------------------------------------------------------------------------
   call l9#defineVariableDefault('g:fuf_jumplist_prompt'     , '>Jump-List[]>')
-  call l9#defineVariableDefault('g:fuf_jumplist_switchOrder', 90)
+  call l9#defineVariableDefault('g:fuf_jumplist_switchOrder', 100)
   "---------------------------------------------------------------------------
   call l9#defineVariableDefault('g:fuf_changelist_prompt'     , '>Change-List[]>')
-  call l9#defineVariableDefault('g:fuf_changelist_switchOrder', 100)
+  call l9#defineVariableDefault('g:fuf_changelist_switchOrder', 110)
   "---------------------------------------------------------------------------
   call l9#defineVariableDefault('g:fuf_quickfix_prompt'     , '>Quickfix[]>')
-  call l9#defineVariableDefault('g:fuf_quickfix_switchOrder', 110)
+  call l9#defineVariableDefault('g:fuf_quickfix_switchOrder', 120)
   "---------------------------------------------------------------------------
   call l9#defineVariableDefault('g:fuf_line_prompt'     , '>Line[]>')
-  call l9#defineVariableDefault('g:fuf_line_switchOrder', 120)
+  call l9#defineVariableDefault('g:fuf_line_switchOrder', 130)
   "---------------------------------------------------------------------------
   call l9#defineVariableDefault('g:fuf_help_prompt'     , '>Help[]>')
-  call l9#defineVariableDefault('g:fuf_help_switchOrder', 130)
+  call l9#defineVariableDefault('g:fuf_help_switchOrder', 140)
   call l9#defineVariableDefault('g:fuf_help_cache_dir'  , '~/.vim-fuf-cache/help')
   "---------------------------------------------------------------------------
   call filter(g:fuf_modes, 'count(g:fuf_modesDisable, v:val) == 0')