Skip to content

Update ft_sql.{txt,jax} #2230

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

Merged
merged 1 commit into from
Aug 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
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
18 changes: 9 additions & 9 deletions doc/ft_sql.jax
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*ft_sql.txt* For Vim バージョン 9.1. Last change: 2022 Apr 06
*ft_sql.txt* For Vim バージョン 9.1. Last change: 2025 Aug 06

by David Fishburn

Expand Down Expand Up @@ -167,8 +167,8 @@ g:ftplugin_sql_objects の既定値は以下の通りです: >

1.4 マクロ *sql-macros*
----------
|'define'| に以下の正規表現を設定することにより、マクロ定義を見つけるための
Vim の機能に対応しています: >
'define' に以下の正規表現を設定することにより、マクロ定義を見つけるための Vim
の機能に対応しています: >
\c\<\(VARIABLE\|DECLARE\|IN\|OUT\|INOUT\)\>

この正規表現は以下のようなコードに対応しています: >
Expand Down Expand Up @@ -237,13 +237,13 @@ ftplugin/sql.vim では次のコマンドが定義されています: >

このコマンドを引数なしで実行すると、インデントと構文スクリプトが既定値に戻りま
す。既定値は |sql-type-default| を参照してください。Vi 互換モードをオフにして
いると (|'compatible'|)、<Tab> キーで引数を補完できます。
いると ('compatible')、<Tab> キーで引数を補完できます。

コマンド名とスペースをタイプした後、引数を指定するために補完を利用できます。こ
のコマンドは source したい Vim scriptの名前を受け取ります。
|cmdline-completion| 機能により、SQLSetType コマンドは |'runtimepath'| から名
前に 'sql' を含む Vim script を検索します。これは名前のスペルから推測を取り出
します。以下が例です: >
|cmdline-completion| 機能により、SQLSetType コマンドは 'runtimepath' から名前
'sql' を含む Vim script を検索します。これは名前のスペルから推測を取り出し
ます。以下が例です: >
:SQLSetType
:SQLSetType sqloracle
:SQLSetType sqlanywhere
Expand Down Expand Up @@ -728,7 +728,7 @@ Java, PHP, Javascript はどれもデータベースと対話できます。編
Perl ファイルの編集を始めます。自動的にファイルタイプが "perl" になります。デ
フォルトで、ファイルタイプ・ファイルの ftplugin/perl.vim が読み込まれます。
|ft-syntax-omni| に書かれているコマンドによって構文補完プラグインを使っている
場合は、オプション |'omnifunc'| が "syntax#Complete" にセットされます。
場合は、オプション 'omnifunc' が "syntax#Complete" にセットされます。
<C-X><C-O> を押すと Perl の構文アイテムを含むオムニポップアップが表示されます。

ステップ 2
Expand All @@ -739,7 +739,7 @@ Perl ファイルの編集を始めます。自動的にファイルタイプが
プが作成され、SQL 補完プラグインが初期化されます。全ての SQL 構文アイテムが準
備的にキャッシュされます。SQL ファイルタイプ・スクリプトは2種類の補完プラグイ
ンを使おうとしていることを検出します。<C-C> で始まる SQL 用のマップが呼び出さ
れると、その実行中だけ |'omnifunc'| を切り替えます。そのため、<C-X><C-O> は (構
れると、その実行中だけ 'omnifunc' を切り替えます。そのため、<C-X><C-O> は (構
文補完プラグインによる) Perl 用の補完のために使用し、<C-C> は SQL 補完機能のた
めに使用できます。

Expand Down
12 changes: 6 additions & 6 deletions en/ft_sql.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*ft_sql.txt* For Vim version 9.1. Last change: 2022 Apr 06
*ft_sql.txt* For Vim version 9.1. Last change: 2025 Aug 06

by David Fishburn

Expand Down Expand Up @@ -168,7 +168,7 @@ with comments: >
1.4 Macros *sql-macros*
----------
Vim's feature to find macro definitions, |'define'|, is supported using this
Vim's feature to find macro definitions, 'define', is supported using this
regular expression: >
\c\<\(VARIABLE\|DECLARE\|IN\|OUT\|INOUT\)\>
Expand Down Expand Up @@ -239,13 +239,13 @@ buffer basis, at any time. The ftplugin/sql.vim file defines this function: >
Executing this function without any parameters will set the indent and syntax
scripts back to their defaults, see |sql-type-default|. If you have turned
off Vi's compatibility mode, |'compatible'|, you can use the <Tab> key to
off Vi's compatibility mode, 'compatible', you can use the <Tab> key to
complete the optional parameter.

After typing the function name and a space, you can use the completion to
supply a parameter. The function takes the name of the Vim script you want to
source. Using the |cmdline-completion| feature, the SQLSetType function will
search the |'runtimepath'| for all Vim scripts with a name containing 'sql'.
search the 'runtimepath' for all Vim scripts with a name containing 'sql'.
This takes the guess work out of the spelling of the names. The following are
examples: >
:SQLSetType
Expand Down Expand Up @@ -755,7 +755,7 @@ Step 1
Begins by editing a Perl file. Vim automatically sets the filetype to
"perl". By default, Vim runs the appropriate filetype file
ftplugin/perl.vim. If you are using the syntax completion plugin by following
the directions at |ft-syntax-omni| then the |'omnifunc'| option has been set to
the directions at |ft-syntax-omni| then the 'omnifunc' option has been set to
"syntax#Complete". Pressing <C-X><C-O> will display the omni popup containing
the syntax items for Perl.

Expand All @@ -767,7 +767,7 @@ maps for SQL completion, see |sql-completion-maps|. Now these maps have
been created and the SQL completion plugin has been initialized. All SQL
syntax items have been cached in preparation. The SQL filetype script detects
we are attempting to use two different completion plugins. Since the SQL maps
begin with <C-C>, the maps will toggle the |'omnifunc'| when in use. So you
begin with <C-C>, the maps will toggle the 'omnifunc' when in use. So you
can use <C-X><C-O> to continue using the completion for Perl (using the syntax
completion plugin) and <C-C> to use the SQL completion features.

Expand Down