Questions tagged [ctrlp]

CtrlP is a vim plugin which allows fast switching of buffers and files.

87 questions
1
vote
0 answers

How to make ctrl-p plugin for vim only search within a given list of directories

I am working in a mammoth codebase. There are too many files and folders at the top-level. But, I work in a small corner of the codebase - no more than 10 directories hanging off of the top-level. How do I give ctrl-p the list of these 10…
The Vivandiere
  • 3,059
  • 3
  • 28
  • 50
1
vote
0 answers

Vim+ctrlP : disable MRU sorting in buffers list

in Vim, I use CtrlP to switch between my open files. But the displayed list of buffers (in the tab ) is sorted with the most recently used at the bottom. I would like to disable this sort, and keep my buffers list in the same order I…
MeanStreet
  • 1,217
  • 1
  • 15
  • 33
1
vote
1 answer

make Ctrlp results only show filename?

How to make vim Ctrlp plugin's results(file list) only show filename without path? like: a.c b.c c.c instead of: Desktop/Development/Project/XXX/src/a.c AnotherPath1/Project/XXX/src/b.c AnotherPath2/Project/XXX/src/c.c
Al2O3
  • 3,103
  • 4
  • 26
  • 52
1
vote
2 answers

Open CtrlP on VimEnter Only If Opening a Directory

I'd like to open CtrlP if I am opening a directory with vim, but not a file. I like to have it automatically open in I just open a directory for convenience. However, it is slightly inconvenient if I know exactly which file I want to open because of…
ijsnow
  • 152
  • 7
1
vote
0 answers

ViM + CtrlP: g:ctrlp_custom_ignore not used

In ~/.vimrc , I've set: " Configure CtrlP " Ctrl-O opens CtrlP for the current word. map w " Ensure we aren't using a custom command. if exists("g:ctrl_user_command") unlet g:ctrlp_user_command endif " Specify the cache…
nickh
  • 4,721
  • 2
  • 29
  • 31
1
vote
1 answer

Why nnoremap doesn't work with CtrlP and nmap does work? - VIM

I have this in my .vimrc nnoremap p :CtrlPw I change all nmap to nnoremap in my .vimrc and everything works fine except this one: nnoremap p :CtrlPw With nmap p :CtrlPw it does automatically…
whitesiroi
  • 2,725
  • 4
  • 30
  • 64
1
vote
2 answers

How to run/call CtrlP first time in the background - VIM

When calling CtrlP for the first time it cause quite a delay to build the cache. Is there a way to run it in the background so I can continue doing stuff in vim?
whitesiroi
  • 2,725
  • 4
  • 30
  • 64
1
vote
1 answer

Vim Ctrlp Plugin: ctrlp_root_markers ignores the values I set?

My root project directory has the following: root/ .git Assets Library obj Temp etc. Ctrlp by default looks in this root directory. I want to set the directory it starts looking in to "Assets". I looked at the docs and read…
vexe
  • 5,433
  • 12
  • 52
  • 81
1
vote
0 answers

Use ctrlp.vim to browse files without recursing?

Is there any way to use ctrlp.vim to browse files without recursing through all the possible directories? For example, so that it can usefully be used from a home directory (or other large directory): co " matches ~/code…
David Wolever
  • 148,955
  • 89
  • 346
  • 502
1
vote
1 answer

Escape key re-opens Ctrl+P in Vim

I started using Ctrl+P with Vim a couple months ago. In the documentation, it says that escape should exit the Ctrl+P search mode, which I like. However, there is also undocumented (that I can find) functionality such that pressing the escape key…
1
vote
0 answers

Simple 'in-file' completion with XCode

XCode has really good completion when it comes to library functions. But is there any way to accomplish simple 'in-file' completion like sublime or vim (with ctrl-p) does? For example I define a variable named myCustomSuperVariable. Now when I enter…
tonekk
  • 470
  • 3
  • 16
1
vote
1 answer

detect, if ctrlp is opened/active

I like the relativenumbers, but they turn out to be slow if I move through files with very long lines. So I added autocmd CursorMoved,CursorMovedI * if &relativenumber | set norelativenumber | endif autocmd CursorHold,CursorHoldI * set…
iGEL
  • 16,540
  • 11
  • 60
  • 74
1
vote
2 answers

Vim E194: No alternate file name to substitute for '#'

I am using ctrlp.vim plugin which is essentially a file finder. I followed the installation steps as mentioned here: http://kien.github.io/ctrlp.vim/#installation (using git) My plugin is working fine and as expected but on starting vim I get…
shivam
  • 16,048
  • 3
  • 56
  • 71
1
vote
2 answers

How to autocomplete in CtrlP search bar?

If I want to create a new file config/initializers/NEW_FILE.rb under CTRLP, I need to type the full path, how could I use the fuzzy search function to auto-complete the config/initializers/ in the typing area. That is, I can type cfg/ini_ then I…
newBike
  • 14,385
  • 29
  • 109
  • 192
1
vote
1 answer

How to make Ctrl-P exit when I accidentally try to open the opened file?

Some times when I'm using VIM, I try to open the file that is already opened. This happens because I have a really quick reflex when I think in editing a file, which is faster than checking which file I'm in. The problem is that CtrlP complains and…
MaiaVictor
  • 51,090
  • 44
  • 144
  • 286