Option to disable sorting in MRU mode

Close #177
This commit is contained in:
Kien N 2012-04-18 03:29:47 +07:00
parent 2a033dad07
commit 75ef943c35
2 changed files with 10 additions and 1 deletions

View File

@ -30,6 +30,7 @@ fu! s:opts()
\ 'max_files': ['s:maxfiles', 10000], \ 'max_files': ['s:maxfiles', 10000],
\ 'max_height': ['s:mxheight', 10], \ 'max_height': ['s:mxheight', 10],
\ 'max_history': ['s:maxhst', hst], \ 'max_history': ['s:maxhst', hst],
\ 'mruf_default_order': ['s:mrudef', 0],
\ 'open_multi': ['s:opmul', '1v'], \ 'open_multi': ['s:opmul', '1v'],
\ 'open_new_file': ['s:newfop', 'v'], \ 'open_new_file': ['s:newfop', 'v'],
\ 'prompt_mappings': ['s:urprtmaps', 0], \ 'prompt_mappings': ['s:urprtmaps', 0],
@ -1423,7 +1424,8 @@ endf
fu! s:dosort() fu! s:dosort()
retu s:matcher == {} && ( ( s:itemtype != 2 && s:nolim != 1 ) retu s:matcher == {} && ( ( s:itemtype != 2 && s:nolim != 1 )
\ || s:prompt != ['', '', ''] ) && s:dosort \ || s:prompt != ['', '', ''] ) && !( s:itemtype == 2 && s:mrudef )
\ && s:dosort
endf endf
fu! s:narrowable() fu! s:narrowable()

View File

@ -70,6 +70,7 @@ Overview:~
|ctrlp_mruf_exclude| Files that shouldnt be remembered. |ctrlp_mruf_exclude| Files that shouldnt be remembered.
|ctrlp_mruf_include| Files to be remembered. |ctrlp_mruf_include| Files to be remembered.
|ctrlp_mruf_relative| Show only MRU files in the working directory. |ctrlp_mruf_relative| Show only MRU files in the working directory.
|ctrlp_mruf_default_order| Disable sorting.
|ctrlp_mruf_case_sensitive| MRU files are case sensitive or not. |ctrlp_mruf_case_sensitive| MRU files are case sensitive or not.
Advanced options: Advanced options:
@ -420,6 +421,11 @@ Set this to 1 to show only MRU files in the current working directory: >
let g:ctrlp_mruf_relative = 0 let g:ctrlp_mruf_relative = 0
< <
*'g:ctrlp_mruf_default_order'*
Set this to 1 to disable sorting when searching in MRU mode: >
let g:ctrlp_mruf_default_order = 0
<
*'g:ctrlp_mruf_case_sensitive'* *'g:ctrlp_mruf_case_sensitive'*
Match this with your file system case-sensitivity setting to avoid duplicate Match this with your file system case-sensitivity setting to avoid duplicate
MRU entries: > MRU entries: >
@ -983,6 +989,7 @@ Special thanks:~
=============================================================================== ===============================================================================
CHANGELOG *ctrlp-changelog* CHANGELOG *ctrlp-changelog*
+ New option: |g:ctrlp_mruf_default_order|
+ New feature: Bookmarked directories extension. + New feature: Bookmarked directories extension.
+ New commands: |:CtrlPBookmarkDir| + New commands: |:CtrlPBookmarkDir|
|:CtrlPBookmarkDirAdd| |:CtrlPBookmarkDirAdd|