Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update tagsrch documents #495

Merged
merged 2 commits into from
Apr 4, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 25 additions & 16 deletions doc/tagsrch.jax
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*tagsrch.txt* For Vim バージョン 8.1. Last change: 2019 Feb 25
*tagsrch.txt* For Vim バージョン 8.1. Last change: 2019 Mar 30


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

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

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

1. {tagname} {TAB} {tagfile} {TAB} {tagaddress}
2. {tagfile}:{tagname} {TAB} {tagfile} {TAB} {tagaddress}
3. {tagname} {TAB} {tagfile} {TAB} {tagaddress} {term} {field} ..
2. {tagname} {TAB} {tagfile} {TAB} {tagaddress} {term} {field} ..

以前には古い形式がサポートされていた、|tag-old-static| を参照。

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

*tag-old-static*
2番目の形式はstaticタグにのみ使用できる。現在では廃れており、3番目の形式に置
き換えられている。これはElvis 1.xとVim、それといくつかのバージョンのctagsによっ
てのみサポートされている。staticタグはローカル関数によく用いられ、{tagfile}内
のみ参照する。staticタグでは2つの{tagfile}は正確に一致していなければならない
ことに注意すること。staticタグがどのように使われるかについては|tags-option|を
参照すること。

3番目の形式は新しい。各行の末尾にある任意的なフィールドに追加の情報を含む。こ
2番目の形式は新しい。各行の末尾にある任意的なフィールドに追加の情報を含む。こ
れは以前のViとも互換性がある。新しいバージョンのctagsにのみサポートされている
(Exuberant ctagsとか)。

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


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


*tag-old-static*
旧式のフォーマットは 2019 年 3 月までサポートされていた:
{tagfile}:{tagname} {TAB} {tagfile} {TAB} {tagaddress}

この形式は static タグにのみ使用できる。現在では廃れており、2 番目の形式に置き
換えられている。これは Elvis 1.x と古いバージョンの Vim、それといくつかのバー
ジョンの ctags によってのみサポートされている。static タグはローカル関数によく
用いられ、{tagfile} 内のみ参照する。static タグでは 2 つの {tagfile} は正確に
一致していなければならないことに注意すること。static タグがどのように使われる
かについては |tags-option| を参照すること。

新しいバージョンの Vim に更新するときに、2 番目の形式をサポートする ctags に更
新できるべきでもあるので、このサポートは削除された。

==============================================================================
6. インクルードファイルの検索 *include-search* *definition-search*
*E387* *E388* *E389*
Expand Down
44 changes: 26 additions & 18 deletions en/tagsrch.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*tagsrch.txt* For Vim version 8.1. Last change: 2019 Feb 25
*tagsrch.txt* For Vim version 8.1. Last change: 2019 Mar 30


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


The lines in the tags file must have one of these three formats:
The lines in the tags file must have one of these two formats:

1. {tagname} {TAB} {tagfile} {TAB} {tagaddress}
2. {tagfile}:{tagname} {TAB} {tagfile} {TAB} {tagaddress}
3. {tagname} {TAB} {tagfile} {TAB} {tagaddress} {term} {field} ..
2. {tagname} {TAB} {tagfile} {TAB} {tagaddress} {term} {field} ..

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

The first format is a normal tag, which is completely compatible with Vi. It
is the only format produced by traditional ctags implementations. This is
often used for functions that are global, also referenced in other files.

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

*tag-old-static*
The second format is for a static tag only. It is obsolete now, replaced by
the third format. It is only supported by Elvis 1.x and Vim and a few
versions of ctags. A static tag is often used for functions that are local,
only referenced in the file {tagfile}. Note that for the static tag, the two
occurrences of {tagfile} must be exactly the same. Also see |tags-option|
below, for how static tags are used.

The third format is new. It includes additional information in optional
The second format is new. It includes additional information in optional
fields at the end of each line. It is backwards compatible with Vi. It is
only supported by new versions of ctags (such as Exuberant ctags).

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


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


*tag-old-static*
Until March 2019 (patch 8.1.1092) an outdated format was supported:
{tagfile}:{tagname} {TAB} {tagfile} {TAB} {tagaddress}

This format is for a static tag only. It is obsolete now, replaced by
the second format. It is only supported by Elvis 1.x, older Vim versions and
a few versions of ctags. A static tag is often used for functions that are
local, only referenced in the file {tagfile}. Note that for the static tag,
the two occurrences of {tagfile} must be exactly the same. Also see
|tags-option| below, for how static tags are used.

The support was removed, since when you can update to the new Vim version you
should also be able to update ctags to one that supports the second format.

==============================================================================
6. Include file searches *include-search* *definition-search*
*E387* *E388* *E389*
Expand Down