Skip to content

Update develop.{txt,jax} #2069

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 3 commits into from
May 16, 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
106 changes: 33 additions & 73 deletions doc/develop.jax
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*develop.txt* For Vim バージョン 9.1. Last change: 2025 Apr 18
*develop.txt* For Vim バージョン 9.1. Last change: 2025 May 05


VIMリファレンスマニュアル by Bram Moolenaar
Expand Down Expand Up @@ -217,7 +217,7 @@ sound.c と sign.c は、配布された .clang-format ファイルに従って
Marriott)


☆コメント *style-comments*
☆コメント *style-comments*

関数本体内に複数行のコメントを入れないようにすること。関数が非常に複雑で、一部
を個別にコメントする必要がある場合は、関数の構造を再検討する必要がある。
Expand All @@ -232,15 +232,15 @@ sound.c と sign.c は、配布された .clang-format ファイルに従って
<


☆インデント *style-indentation*
☆インデント *style-indentation*

コードのインデントには 4 つのスペースを使用する。Vim を使用してソースを編集し
ている場合は、|modeline| があるため何もする必要はない。

他のエディタの場合は、リポジトリのルートに `.editorconfig` が提供される。


☆宣言 *style-declarations*
☆宣言 *style-declarations*

可能であれば、ガード内で `for` ループ変数を宣言する:
OK: >
Expand All @@ -260,115 +260,77 @@ OK: >
int *ptr;
<


☆括弧 *style-braces*
☆括弧 *style-braces*

すべての波括弧は改行しなければならない:
OK: >
if (cond)
{
cmd;
cmd;
cmd;
cmd;
}
else
{
cmd;
cmd;
cmd;
cmd;
}
<
間違い: >
if (cond) {
cmd;
cmd;
cmd;
cmd;
} else {
cmd;
cmd;
cmd;
cmd;
}
<
OK: >
while (cond)
{
cmd;
cmd;
}
<
間違い: >
while (cond) {
cmd;
cmd;
}
<
ブロックがコメントを含めて 1 行の場合は、波括弧は省略できる。
OK: >
if (cond)
cmd;
else
cmd;
<
間違い: >
if (cond)
/*
* comment
*/
do
{
cmd;
else
cmd;
} while (cond);
<
`if`/`else` の一方のブロックに波括弧がある場合は、もう一方のブロックにも波括弧
が必要である。
OK: >
if (cond)
{
cmd;
}
else
または >
do
{
cmd;
cmd;
}
while (cond);
<
間違い: >
if (cond)
cmd;
else
{
cmd;
cmd;
}

if (cond)
{
do {
cmd;
cmd;
}
else
cmd;
<
OK: >
while (cond)
cmd;
<
間違い:
>
while (cond)
if (cond)
cmd;
} while (cond);
<


☆型 *style-types*

記述的な型を使用すること。それらのリストは src/structs.h ファイル内、またはお
そらく作業中のファイルの typedef 内にある。

Note すべてのカスタム型には「_T」という接尾辞が付けられることに注意
説明的な型を使用すること。これらは src/vim.h や src/structs.h などで定義されて
いる。
Note すべてのカスタム型には "_T" という接尾辞が付けられることに注意

OK: >
int is_valid_line_number(linenr_T lnum);
<
間違い: >
int is_valid_line_number(unsigned long lnum);
例: >
linenr_T
buf_T
pos_T
<


☆空白と句読法 *style-spaces*

関数名と括弧の間に空白はない:
Expand All @@ -388,8 +350,8 @@ OK: func(arg1, arg2); for (i = 0; i < 2; ++i)

'=', '+', '/' 等の前後に空白を入れる。

間違い: var=a*5;
OK: var = a * 5;
間違い: var=a*5;

似たような動作をグループ化するには、空行を使う。

Expand All @@ -414,7 +376,6 @@ OK: >
while (buf != NULL && !got_int)
<


☆関数 *style-functions*

関数宣言は、戻り値の型を別のインデントされた行に記述して使用する:
Expand Down Expand Up @@ -568,20 +529,19 @@ OK: do
ンドウ、xtermのウィンドウ、Vimのバッファを表示するウィンドウなど。

混乱を避けるため、時にウィンドウと呼ばれる他の物には別の名前が付けられている。
ここに関連する物の概観を示す
ここに関連する物の概観を示す:

スクリーン(screen) ディスプレイ全体。GUIでは例えば1024x768ピクセルの画
面。Vimシェルはスクリーン全体を使うことも一部を使う
こともできる。

シェル(shell) Vimアプリケーション。スクリーン全体(例えばコンソール
で実行した時)、あるいはその一部(xtermやGUI)。

ウィンドウ(window) バッファの表示画面。Vimは複数のウィンドウを持つこと
ができる。ウィンドウはコマンドラインやメニューバー、
ツールバーなどといっしょに表示される。これらはシェル
に納まる。


スペルチェック *develop-spell*

Vim にスペルチェックを追加することになったとき、利用可能なスペルチェックのライ
Expand Down
Loading