Git Product home page Git Product logo

Comments (3)

eyalk11 avatar eyalk11 commented on June 3, 2024

See #353

from vim-gutentags.

lukelbd avatar lukelbd commented on June 3, 2024

Thanks. I saw the g:gutentags_project_root_finder option in the docs and set to a custom function, but somehow I missed g:gutentags_file_list_command.

However it looks like g:gutentags_file_list_command only accepts shell commands. Could it be amended to also accept vim function references like g:gutentags_project_root_finder? Then one could easily set it to a function that returns open vim buffers or tabs. Or someone could add a separate g:gutentags_file_list_function option.

Maybe I'll try a PR sometime.

from vim-gutentags.

eyalk11 avatar eyalk11 commented on June 3, 2024

Arguably , you can save the results from vim to a file and do cat from that file.
This maybe helpful

function! GitF(regfilter,curfile) 
    if (a:curfile)

    let tmp=getcwd()
    :exe ":cd ". expand("%:p:h")
endif 
    let top = systemlist("git rev-parse --show-toplevel")[0]
    "echo top
    :exe ':cd '. top
    let a=systemlist("git ls-files --full-name" )
    :if len(a:regfilter)>0
    let a = filter(a,{idx,val -> (val =~ a:regfilter)})
    let a= map(a, {idx,fname -> fnamemodify(fname, ':p')})
    :endif 
    ":echo a
    :call writefile(a,'c:\temp\filelist.txt')
    try
        echohl Question
        let pattern = input("Search pattern: ")
        let pattern = escape(pattern,'"')
    finally
        echohl None
    endtry
    if (a:curfile)
    
    :exe ':cd '.tmp
endif 
    exec printf("Leaderf rg --filelist c:\\temp\\filelist.txt %s\"%s\"", pattern =~ '^\s*$' ? '' : '-e ', pattern )

endfunction




from vim-gutentags.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.