Skip to content

Commit b273ec0

Browse files
authored
Merge pull request #495 from vim-jp/update_tagsrch
Update tagsrch documents
2 parents 85625b6 + 6324eec commit b273ec0

File tree

2 files changed

+51
-34
lines changed

2 files changed

+51
-34
lines changed

doc/tagsrch.jax

+25-16
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*tagsrch.txt* For Vim バージョン 8.1. Last change: 2019 Feb 25
1+
*tagsrch.txt* For Vim バージョン 8.1. Last change: 2019 Mar 30
22

33

44
VIMリファレンスマニュアル by Bram Moolenaar
@@ -518,11 +518,13 @@ ptags Perl 用、Perl で書かれている。これはここで見つかる
518518
gnatxref Ada用。http://www.gnuada.org/ を参照。
519519
gnatxrefはgnatパッケージの一部である。
520520

521-
tagsファイルは次の3つの形式のどれかで構成されなければならない:
521+
522+
tags ファイルは次の 2 つの形式のどれかで構成されなければならない:
522523

523524
1. {tagname} {TAB} {tagfile} {TAB} {tagaddress}
524-
2. {tagfile}:{tagname} {TAB} {tagfile} {TAB} {tagaddress}
525-
3. {tagname} {TAB} {tagfile} {TAB} {tagaddress} {term} {field} ..
525+
2. {tagname} {TAB} {tagfile} {TAB} {tagaddress} {term} {field} ..
526+
527+
以前には古い形式がサポートされていた、|tag-old-static| を参照。
526528

527529
最初の形式は通常のタグで、Viで完全に互換性がある。伝統的なctagsによってのみ作
528530
られる形式である。これはしばしばグローバルな関数や他のファイルを参照する場合に
@@ -531,24 +533,15 @@ tagsファイルは次の3つの形式のどれかで構成されなければ
531533
タグファイルの行は<LF>または<CR><LF>で終わる。Macintoshでは<CR>も機能する。
532534
<CR><NL>は行内に決して現れない。
533535

534-
*tag-old-static*
535-
2番目の形式はstaticタグにのみ使用できる。現在では廃れており、3番目の形式に置
536-
き換えられている。これはElvis 1.xとVim、それといくつかのバージョンのctagsによっ
537-
てのみサポートされている。staticタグはローカル関数によく用いられ、{tagfile}
538-
のみ参照する。staticタグでは2つの{tagfile}は正確に一致していなければならない
539-
ことに注意すること。staticタグがどのように使われるかについては|tags-option|
540-
参照すること。
541-
542-
3番目の形式は新しい。各行の末尾にある任意的なフィールドに追加の情報を含む。こ
536+
2番目の形式は新しい。各行の末尾にある任意的なフィールドに追加の情報を含む。こ
543537
れは以前のViとも互換性がある。新しいバージョンのctagsにのみサポートされている
544538
(Exuberant ctagsとか)。
545539

546540
{tagname} 識別子。普通は関数名であるが、どんな識別子でも構わない。<Tab>
547541
を含めることはできない。
548542
{TAB} 1文字の<Tab>。 Note: 以前のバージョンではここでどんな空白文字
549-
も許可していた。これは{tagfile}内にスペースを使うことを断念し
550-
たためである。コンパイル時に|+tag_any_white|機能を付加すれば再
551-
び使えるようになる。 *tag-any-white*
543+
も許可していた。これは{tagfile}内にスペースを許可するために放
544+
棄された。
552545
{tagfile} {tagname}の定義を含むファイル名。絶対パスでも相対パスでも構わ
553546
ない。環境変数やワイルドカードを含んでもよい(ワイルドカードの
554547
使用方法はあいまいだが)。<Tab>を含むことはできない。
@@ -585,6 +578,7 @@ tagsファイルは次の3つの形式のどれかで構成されなければ
585578
現在Vimが認識できるその他のフィールドは "file:" (値はなし)だけ
586579
である。これはstaticタグに使われる。
587580

581+
588582
tagsファイルの先頭行には、
589583
!_TAG_
590584
で始まる行を含めることができる。
@@ -639,6 +633,21 @@ Vimが認識するもう1つのタグはタグファイルのエンコーディ
639633
ある。これは型が先頭にあるマクロ名や関数名を見つけるだろう。{Vi には拡張検索
640634
はない}
641635

636+
637+
*tag-old-static*
638+
旧式のフォーマットは 2019 年 3 月 (patch 8.1.1092) までサポートされていた:
639+
{tagfile}:{tagname} {TAB} {tagfile} {TAB} {tagaddress}
640+
641+
この形式は static タグにのみ使用できる。現在では廃れており、2 番目の形式に置き
642+
換えられている。これは Elvis 1.x と古いバージョンの Vim、それといくつかのバー
643+
ジョンの ctags によってのみサポートされている。static タグはローカル関数によく
644+
用いられ、{tagfile} 内のみ参照する。static タグでは 2 つの {tagfile} は正確に
645+
一致していなければならないことに注意すること。static タグがどのように使われる
646+
かについては |tags-option| を参照すること。
647+
648+
新しいバージョンの Vim に更新するときに、2 番目の形式をサポートする ctags に更
649+
新できるべきでもあるので、このサポートは削除された。
650+
642651
==============================================================================
643652
6. インクルードファイルの検索 *include-search* *definition-search*
644653
*E387* *E388* *E389*

en/tagsrch.txt

+26-18
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*tagsrch.txt* For Vim version 8.1. Last change: 2019 Feb 25
1+
*tagsrch.txt* For Vim version 8.1. Last change: 2019 Mar 30
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -529,37 +529,29 @@ gnatxref For Ada. See http://www.gnuada.org/. gnatxref is
529529
part of the gnat package.
530530

531531

532-
The lines in the tags file must have one of these three formats:
532+
The lines in the tags file must have one of these two formats:
533533

534534
1. {tagname} {TAB} {tagfile} {TAB} {tagaddress}
535-
2. {tagfile}:{tagname} {TAB} {tagfile} {TAB} {tagaddress}
536-
3. {tagname} {TAB} {tagfile} {TAB} {tagaddress} {term} {field} ..
535+
2. {tagname} {TAB} {tagfile} {TAB} {tagaddress} {term} {field} ..
537536

538-
The first is a normal tag, which is completely compatible with Vi. It is the
539-
only format produced by traditional ctags implementations. This is often used
540-
for functions that are global, also referenced in other files.
537+
Previously an old format was supported, see |tag-old-static|.
538+
539+
The first format is a normal tag, which is completely compatible with Vi. It
540+
is the only format produced by traditional ctags implementations. This is
541+
often used for functions that are global, also referenced in other files.
541542

542543
The lines in the tags file can end in <LF> or <CR><LF>. On the Macintosh <CR>
543544
also works. The <CR> and <NL> characters can never appear inside a line.
544545

545-
*tag-old-static*
546-
The second format is for a static tag only. It is obsolete now, replaced by
547-
the third format. It is only supported by Elvis 1.x and Vim and a few
548-
versions of ctags. A static tag is often used for functions that are local,
549-
only referenced in the file {tagfile}. Note that for the static tag, the two
550-
occurrences of {tagfile} must be exactly the same. Also see |tags-option|
551-
below, for how static tags are used.
552-
553-
The third format is new. It includes additional information in optional
546+
The second format is new. It includes additional information in optional
554547
fields at the end of each line. It is backwards compatible with Vi. It is
555548
only supported by new versions of ctags (such as Exuberant ctags).
556549

557550
{tagname} The identifier. Normally the name of a function, but it can
558551
be any identifier. It cannot contain a <Tab>.
559552
{TAB} One <Tab> character. Note: previous versions allowed any
560553
white space here. This has been abandoned to allow spaces in
561-
{tagfile}. It can be re-enabled by including the
562-
|+tag_any_white| feature at compile time. *tag-any-white*
554+
{tagfile}.
563555
{tagfile} The file that contains the definition of {tagname}. It can
564556
have an absolute or relative path. It may contain environment
565557
variables and wildcards (although the use of wildcards is
@@ -599,6 +591,7 @@ only supported by new versions of ctags (such as Exuberant ctags).
599591
The only other field currently recognized by Vim is "file:"
600592
(with an empty value). It is used for a static tag.
601593

594+
602595
The first lines in the tags file can contain lines that start with
603596
!_TAG_
604597
These are sorted to the first lines, only rare tags that start with "!" can
@@ -652,6 +645,21 @@ If the command is a normal search command (it starts and ends with "/" or
652645
followed by white space and a '('. This will find macro names and function
653646
names with a type prepended. {the extra searches are not in Vi}
654647

648+
649+
*tag-old-static*
650+
Until March 2019 (patch 8.1.1092) an outdated format was supported:
651+
{tagfile}:{tagname} {TAB} {tagfile} {TAB} {tagaddress}
652+
653+
This format is for a static tag only. It is obsolete now, replaced by
654+
the second format. It is only supported by Elvis 1.x, older Vim versions and
655+
a few versions of ctags. A static tag is often used for functions that are
656+
local, only referenced in the file {tagfile}. Note that for the static tag,
657+
the two occurrences of {tagfile} must be exactly the same. Also see
658+
|tags-option| below, for how static tags are used.
659+
660+
The support was removed, since when you can update to the new Vim version you
661+
should also be able to update ctags to one that supports the second format.
662+
655663
==============================================================================
656664
6. Include file searches *include-search* *definition-search*
657665
*E387* *E388* *E389*

0 commit comments

Comments
 (0)