Vim + CtrlP: behavior for initial display of MRU files and switching to file search when typing

I find it hard to configure CtrlP for vim the way I want it to work.

Ideally, I would like CtrlP to open with a list of files in the very last order. However, when I start typing, it will switch to searching for files under my current working directory.

This will allow me to switch buffers by pressing a button, and then moving up and down the last files, switch between two views on clicks and open the 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 advice on improving my configuration to get the functionality I'm doing, or teaching me the best way to quickly switch buffers.

+4
source share
1 answer

I asked myself the same question, and I realized that CtrlP is not the right plugin for this task. Therefore, I continued to implement my own. Check out the Bufstop . It allows you to quickly switch between the last buffers using three, two or even one keystroke of one key.

+2
source

Source: https://habr.com/ru/post/1481783/


All Articles