2017-04-20 90 views
3

我看到兩個答案,它們討論如何設置Vim的tags選項,例如 ,它開始尋找當前目錄 中的tags文件,並處理目錄樹直到找到一個。這個命令看起來像是 。我在哪裏可以找到Vim`tags`選項的完整參考?

set tags=./tags;/ 

以下是關於它的文章。

該語法使用分號建立某種的 目錄範圍中搜索(即開始與當前目錄,並用 根目錄結束)。

在在第一個鏈接的答案評論的事實,有一個 評論,說,

你甚至都不需要/如果你去到根目錄下。只需;就夠了。

所有這些東西都記錄在哪裏?我擡頭一看:help 'tags,我發現 沒有提到這一點。

     *'tags'* *'tag'* *E433* 
'tags' 'tag'  string (default "./tags,tags", when compiled with 
       |+emacs_tags|: "./tags,./TAGS,tags,TAGS") 
      global or local to buffer |global-local| 
    Filenames for the tag command, separated by spaces or commas. To 
    include a space or comma in a file name, precede it with a backslash 
    (see |option-backslash| about including spaces and backslashes). 
    When a file name starts with "./", the '.' is replaced with the path 
    of the current file. But only when the 'd' flag is not included in 
    'cpoptions'. Environment variables are expanded |:set_env|. Also see 
    |tags-option|. 
    "*", "**" and other wildcards can be used to search for tags files in 
    a directory tree. See |file-searching|. E.g., "/lib/**/tags" will 
    find all files named "tags" below "/lib". The filename itself cannot 
    contain wildcards, it is used as-is. E.g., "/lib/**/tags?" will find 
    files called "tags?". {not available when compiled without the 
    |+path_extra| feature} 
    The |tagfiles()| function can be used to get a list of the file names 
    actually used. 
    If Vim was compiled with the |+emacs_tags| feature, Emacs-style tag 
    files are also supported. They are automatically recognized. The 
    default value becomes "./tags,./TAGS,tags,TAGS", unless case 
    differences are ignored (MS-Windows). |emacs-tags| 
    The use of |:set+=| and |:set-=| is preferred when adding or removing 
    file names from the list. This avoids problems when a future version 
    uses another default. 
    {Vi: default is "tags /usr/lib/tags"} 

我究竟哪裏可以找到所有的招數的完整參考我可以 的Vim tags選擇用?

回答

4

在哪裏可以找到我可以用於Vim的tags選項的所有技巧的完整參考?

:help 'tags'

"*", "**" and other wildcards can be used to search for tags files in 
a directory tree. See |file-searching|. 

|file-searching]是一個標籤,按<C-]>就可以找到更多關於

「*」, 「**」 等通配符。

相關問題