junegunn / fzf.vim

fzf :heart: vim
MIT License
9.62k stars 584 forks source link

BTags not returning any results with universal-ctags on Termux #1390

Open abbood opened 2 years ago

abbood commented 2 years ago

note: Unfortunately I couldn't try vim's minimal configuration, since in my case my problem is only happening on my Android Termux application, and the vim minimal configuration example assumes that you are a root user (I'll have to root my android to do that) - The script itself writes stuff to the /tmp directory, which can only be done by a root user on Android.

That said I've done a lot of homework before I made this post.

My problem is very similar to the one posted here, however I made sure that it's not a temporary directory problem, I put this in my ~/.config/nvim/init.vim

if empty($TMPDIR)
    let $TMPDIR = '/data/data/com.termux/files/usr/tmp'
endif

and I still got the same problem.

Problem

When I run :BTags on a file, no tags show up, specifically I get this error

No tags found

I debugged the exact command that runs, and it works fine when I run it on the terminal like so

ctags -f - --sort=yes --excmd=number 'app/Repositories/Orders/AppOrdersRepo.php' 2> /dev/null | sort -s -k 5

App\\Http\\Controllers\\Orders  app/Http/Controllers/Orders/CheckoutController.php      3;"     n
checkout        app/Http/Controllers/Orders/CheckoutController.php      69;"    f       
..

What am I missing?

misraelson commented 1 year ago

I was getting same error with regular vim on MacOS. Never tried using this command before but wanted to give it a shot. Fix Fixed by running: brew install --HEAD universal-ctags/universal-ctags/universal-ctags Try going to universal ctags github and see if you can install manually: https://github.com/universal-ctags/ctags