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

:CtrlPTag works, but :CtrlPBufTag does not. #546

Closed dyllandry closed 4 years ago

dyllandry commented 4 years ago

:CtrlPTag shows the tag I am looking for:

featureIsEnabled  vue/src/comp/Home.vue  /^    featureIsEnabled() {$/;"  M

But :CtrlPBufTag from that file shows == NO ENTRIES ==.

My .ctags file is the following:

--options=/home/me/development/ctags-patterns-for-javascript/ctagsrc
--exclude=.git
--exclude=node_modules

Where I've edited the ctagsrc langmap option to include vue files:

--langmap=javascript:.js.es6.es.jsx.mjs.vue
--javascript-kinds=-c-f-m-p-v

--regex-javascript=/^[ \t]*var[ \t]\{1,\}\([A-Za-z0-9_$]\{1,\}\)[ \t]*=[ \t]*\[/\1/A,Array,Arrays/b
--regex-javascript=/^[ \t]*let[ \t]\{1,\}\([A-Za-z0-9_$]\{1,\}\)[ \t]*=[ \t]*\[/\1/A,Array,Arrays/b
--regex-javascript=/^[ \t]*const[ \t]\{1,\}\([A-Za-z0-9_$]\{1,\}\)[ \t]*=[ \t]*\[/\1/A,Array,Arrays/b
...
dyllandry commented 4 years ago

It has to do with vim's filetype. Because I am writing a vue file, I have to set my filetype specially to get both my javascript and vue plugins working. By default when opening a vue file, my filetype is set to vue.javascript. When I reverse the names and set my filetype to javascript.vue, :CtrlPBufTag works, but some of my other plugins do not.