My relevant configurations in .vimrc are as follows:
filetype on
let Tlist_Ctags_Cmd = '/usr/bin/ctags'
let Tlist_Show_One_File = 1 "不同時(shí)顯示多個(gè)文件的tag,只顯示當(dāng)前文件的
let Tlist_Exit_OnlyWindow = 1 "如果taglist窗口是最后一個(gè)窗口,則退出vim
let Tlist_Use_Right_Window = 1 "在右側(cè)窗口中顯示taglist窗口
map <F8> :! ctags -R --languages=javascript,java,python<CR>
But when F8 is used, the javascript function list cannot be created, and there is no error message. There is a tags file in the current path of the code. When F8 is pressed, the file is updated and contains js-related content. But when displaying the tags list in vim, there is only the code file name and no function list. why?
Okay, I found the problem myself.
ctags only supports styles such as function aa(){}. And my code is all written in this way: var aa = function(){}, so it cannot be displayed.