samuke
samuke

Reputation: 460

Vim+CtrlP: Behavior to initially show MRU files and switch to searching files when typing

I'm having hard time configuring CtrlP for vim the way I want it to work.

Ideally I'd like CtrlP to open with a list of files in most recently used order. However, when I start typing it would switch to searching for files under my current working directory.

This would allow me to switch buffers by pressing a button and then navigating recent files up and down, switch between two views with to presses and open a file in the project by typing its partial name.

My current CtrlP settings are as follows

nmap § :CtrlPClearCache<CR>:CtrlPMRUFiles<CR>

let g:ctrlp_working_path_mode='ra'
let g:ctrlp_match_window_bottom=0
let g:ctrlp_max_depth=10
let g:ctrlp_max_files=500
let g:ctrlp_mruf_relative=1

.. and I invoke CtrlP by pressing §.

Any tips how to improve my config to get the functionality I'm after, or teaching me a better way to achieve fast switching of buffers.

Upvotes: 4

Views: 4562

Answers (1)

mihai
mihai

Reputation: 38593

I've been asking myself the same question, and I realised CtrlP is not the right plugin for this task. So I went ahead implementing my own. Check out Bufstop. It allows fast switching between recent buffers using three, two or even one single key press.

Upvotes: 2

Related Questions