ctrlpvim / ctrlp.vim

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

:CtrlPBufTag not working in vue #548

Open dyllandry opened 4 years ago

dyllandry commented 4 years ago

For some reason :CtrlPBufTag is not working in my small vue file.

 == NO ENTRIES ==

But :CtrlPTag does work.

myFunction  test.vue  /^    myFunction() {$/;"  M
methods test.vue  /^  methods: {$/;"  P

My tags file:

!_TAG_FILE_FORMAT   2   /extended format; --format=1 will not append ;" to lines/
!_TAG_FILE_SORTED   1   /0=unsorted, 1=sorted, 2=foldcase/
!_TAG_PROGRAM_AUTHOR    Darren Hiebert  /dhiebert@users.sourceforge.net/
!_TAG_PROGRAM_NAME  Exuberant Ctags //
!_TAG_PROGRAM_URL   http://ctags.sourceforge.net    /official site/
!_TAG_PROGRAM_VERSION   5.9~svn20110310 //
methods test.vue    /^  methods: {$/;"  P
myFunction  test.vue    /^    myFunction() {$/;"    M

My vue file:

<template>
</template>
<script>
export default {
  methods: {
    myFunction() {
      console.log('hello')
    }
  }
}
</script>
<style>
</style>
tacahiroy commented 4 years ago

Do you set g:ctrlp_buftag_types and / or g:ctrlp_buftag_ctags_bin?

Actually, CtrlPBufTag doesn't use existing tags files like :CtrlPTag does, but instead it generates tags file by itself and parses it.

BioBox commented 1 year ago

I've doing this with vlang and get the same issue. And yes, I did set g:ctrlp_buftag_types and it still doesn't work. And why should the user even need to do this? Shouldn't the plugin have some sort of default for languages not explicitly set in buffertag.vim?