- Mastering Vim
- Ruslan Osipov
- 232字
- 2021-06-10 18:51:30
Plugin spotlight – CtrlP
CtrlP is a fuzzy completion plugin that helps you open the files you need quickly, given that you somewhat know what you're looking for. CtrlP is available from https://github.com/ctrlpvim/ctrlp.vim (see the Installing plugins section earlier in this chapter for installation instructions).
Install it and hit Ctrl + p:
This shows the list of files in the project directory. Type in a partial filename or a path, and the list of files will narrow down to string matches. You can use Ctrl + j and Ctrl + k to navigate up and down the list, and Enter to open the file. Esc closes the CtrlP window.
CtrlP also allows you to navigate through buffers and most recently used files. With the CtrlP window open, you can use Ctrl + f and Ctrl + b to cycle through the available options.
You can invoke these directly by executing :CtrlPBuffer for buffers and :CtrlPMRU for the most recently used ones. You can also use :CtrlPMixed to search through files, buffers, and the most recently used files at the same time.
You can also add custom mappings for these to your .vimrc file. For example, to map Ctrl + b to :CtrlPBuffer, you could do the following:
nnoremap <C-b> :CtrlPBuffer<cr> " Map CtrlP buffer mode to Ctrl + B.
- VMware View Security Essentials
- 基于粒計算模型的圖像處理
- 從零開始:數字圖像處理的編程基礎與應用
- Go語言高效編程:原理、可觀測性與優化
- 軟件測試項目實戰之性能測試篇
- Amazon S3 Cookbook
- Hands-On Microservices with Kotlin
- Access 2016數據庫管
- HTML 5與CSS 3權威指南(第3版·上冊)
- Learning Apache Karaf
- Python 3.7從入門到精通(視頻教學版)
- Python自然語言理解:自然語言理解系統開發與應用實戰
- 創意UI Photoshop玩轉移動UI設計
- Java EE項目應用開發
- 小學生C++趣味編程從入門到精通