lyuts / vim-rtags

Vim bindings for rtags, llvm/clang based c++ code indexer.
BSD 2-Clause "Simplified" License
282 stars 56 forks source link

find files #33

Closed rajukv closed 8 years ago

rajukv commented 8 years ago

Is it possible to provide a new option to find files matching a specific pattern? Basically call "rc -I -P " and show the matching list?

pdavydov108 commented 8 years ago

Hello @rajukv , I'm currious, why do you want it, instead of using a file fuzzy matcher (ctrl-p, fzf, unite, etc)? What's your use case? AFAIK, this can be easily done with the following function:

function! FindFiles(pattern)
    let args = {}
    let args.I = ''
    let args.P = pattern
    let result = rtags#ExecuteRC(args)
    call rtags#DisplayResults(result)
endfunction
rajukv commented 8 years ago

Hi @pdavydov108, I am aware of plugins that make finding files easier, but I dont have a use case for those(and dont want to depend on too many plugins). I am primarily interested in finding files that are indexed by rtags. Thanks for the function, I will add it to my rtags.vim