File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -937,6 +937,11 @@ fu! s:ToggleKeyLoop()
937937 en
938938endf
939939
940+ fu ! s: ToggleMRURelative ()
941+ cal ctrlp#mrufiles#tgrel ()
942+ cal s: PrtClearCache ()
943+ endf
944+
940945fu ! s: PrtSwitcher ()
941946 let [s: force , s: matches ] = [1 , 1 ]
942947 cal s: BuildPrompt (1 )
Original file line number Diff line number Diff line change @@ -126,6 +126,10 @@ fu! ctrlp#mrufiles#bufs()
126126 retu s: mrbs
127127endf
128128
129+ fu ! ctrlp#mrufiles#tgrel ()
130+ let {s: re } = ! {s: re }
131+ endf
132+
129133fu ! ctrlp#mrufiles#cachefile ()
130134 if ! exists (' s:cadir' ) || ! exists (' s:cafile' )
131135 let s: cadir = ctrlp#utils#cachedir ().ctrlp#utils#lash ().' mru'
Original file line number Diff line number Diff line change @@ -572,6 +572,9 @@ Example: >
572572Set this to 1 to show only MRU files in the current working directory: >
573573 let g:ctrlp_mruf_relative = 0
574574<
575+ Note: you can use a custom mapping to toggle this option inside the prompt: >
576+ let g:ctrlp_prompt_mappings = { 'ToggleMRURelative()': ['<F2>'] }
577+ <
575578
576579 *'g:ctrlp_mruf_default_order'*
577580Set this to 1 to disable sorting when searching in MRU mode: >
You can’t perform that action at this time.
0 commit comments