search

Home  >  Q&A  >  body text

How to configure the vim taglist plug-in?

My relevant configurations in .vimrc are as follows:

filetype on

let Tlist_Ctags_Cmd = '/usr/bin/ctags' 
let Tlist_Show_One_File = 1        "不同时显示多个文件的tag,只显示当前文件的
let Tlist_Exit_OnlyWindow = 1      "如果taglist窗口是最后一个窗口,则退出vim
let Tlist_Use_Right_Window = 1     "在右侧窗口中显示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?

世界只因有你世界只因有你2743 days ago659

reply all(1)I'll reply

  • 習慣沉默

    習慣沉默2017-05-16 16:44:08

    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.

    reply
    0
  • Cancelreply