ctrlpvim / ctrlp.vim

Active fork of kien/ctrlp.vim—Fuzzy file, buffer, mru, tag, etc finder.
ctrlpvim.github.com/ctrlp.vim
Other
5.58k stars 259 forks source link

how to add buffer files to ctrlp? #493

Closed luoyanghero closed 5 years ago

luoyanghero commented 5 years ago

I usually 'set autochdir' in _vimrc file. So ':CtrlP' is not so good for me. Because I can not specify a fixed directory for ctrlp. I try to use ':CtrlPBuffer' to search files in my buffer. But I don't know how to add files to CtrlPBuffer. I try to use ':args */.sv' to add all .sv files to my buffer, but CtrlPBuffer cannot see them.

mattn commented 5 years ago

Specifiying directory name into CtrlP is not good for you?

luoyanghero commented 5 years ago

@mattn I am not specifying directory name. I expect CtrlP can search buffer's file.

luoyanghero commented 5 years ago

I just don't know how to map vim buffer's files into CtrlP's buffer.

tacahiroy commented 5 years ago

@luoyanghero You do use :CtrlPBuffer, don't you? If so you don't need to do anything other than opening buffers. I mean buffers should be listed if you create buffers by :edit, :args, etc., there are some filter conditions though.

luoyanghero commented 5 years ago

@luoyanghero You do use :CtrlPBuffer, don't you? If so you don't need to do anything other than opening buffers. I mean buffers should be listed if you create buffers by :edit, :args, etc., there are some filter conditions though.

:args */.sv "add all my .sv files. :buffers "I can see all my added files. hit Ctrl+p "open ctrlp hit Ctrl+f "switch to buffer mode "hit keyword to filter files. It works ok for me. THANKS. :+1: