From 75ef943c355e0f53fb6ee48f1117ba8dfdfe3f58 Mon Sep 17 00:00:00 2001 From: Kien N Date: Wed, 18 Apr 2012 03:29:47 +0700 Subject: [PATCH] Option to disable sorting in MRU mode Close #177 --- autoload/ctrlp.vim | 4 +++- doc/ctrlp.txt | 7 +++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/autoload/ctrlp.vim b/autoload/ctrlp.vim index b2212e5..6f258ee 100644 --- a/autoload/ctrlp.vim +++ b/autoload/ctrlp.vim @@ -30,6 +30,7 @@ fu! s:opts() \ 'max_files': ['s:maxfiles', 10000], \ 'max_height': ['s:mxheight', 10], \ 'max_history': ['s:maxhst', hst], + \ 'mruf_default_order': ['s:mrudef', 0], \ 'open_multi': ['s:opmul', '1v'], \ 'open_new_file': ['s:newfop', 'v'], \ 'prompt_mappings': ['s:urprtmaps', 0], @@ -1423,7 +1424,8 @@ endf fu! s:dosort() retu s:matcher == {} && ( ( s:itemtype != 2 && s:nolim != 1 ) - \ || s:prompt != ['', '', ''] ) && s:dosort + \ || s:prompt != ['', '', ''] ) && !( s:itemtype == 2 && s:mrudef ) + \ && s:dosort endf fu! s:narrowable() diff --git a/doc/ctrlp.txt b/doc/ctrlp.txt index cdc2c01..6560364 100644 --- a/doc/ctrlp.txt +++ b/doc/ctrlp.txt @@ -70,6 +70,7 @@ Overview:~ |ctrlp_mruf_exclude| Files that shouldn’t be remembered. |ctrlp_mruf_include| Files to be remembered. |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. 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 < + *'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'* Match this with your file system case-sensitivity setting to avoid duplicate MRU entries: > @@ -983,6 +989,7 @@ Special thanks:~ =============================================================================== CHANGELOG *ctrlp-changelog* + + New option: |g:ctrlp_mruf_default_order| + New feature: Bookmarked directories extension. + New commands: |:CtrlPBookmarkDir| |:CtrlPBookmarkDirAdd|