Skip to content

Commit ccfa1b7

Browse files
committed
Update
* `*netrw-usermaps*` * `*netrw-p17*` * `*netrw-P18*` * `*netrw-P19*` * `*netrw-P20*` * `*netrw-P21*` * `*netrw-P22*`
1 parent b88a3a4 commit ccfa1b7

File tree

1 file changed

+80
-72
lines changed

1 file changed

+80
-72
lines changed

doc/pi_netrw.jax

Lines changed: 80 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -2395,7 +2395,7 @@ netrw によって url が開かれ、タグに移動できます。
23952395

23962396
"mu" マップを使うと現在設定されているすべてのマークが解除されます。
23972397
このコマンドは "mF" とは異なる。"mu" はすべてのグローバルマークファイル
2398-
リストとバッファーローカルマークファイルリストを解除するのに対し
2398+
リストとバッファローカルマークファイルリストを解除するのに対し
23992399
"mF" はカレントディレクトリのファイルの選択のみを解除する (|netrw-mF|参照)。
24002400

24012401

@@ -3104,47 +3104,47 @@ netrw ウィンドウ/エクスプローラーウインドウを拡大・縮小
31043104

31053105
ユーザー定義のマッピング *netrw-usermaps* {{{1
31063106

3107-
One may make customized user maps. Specify a variable, |g:Netrw_UserMaps|,
3108-
to hold a |List| of lists of keymap strings and function names: >
3107+
ユーザーはユーザー定義のマップを作成することができます。
3108+
キーマップの文字列と関数名の |List| を保持する|g:Netrw_UserMaps|
3109+
指定してください: >
31093110
31103111
[["keymap-sequence","ExampleUserMapFunc"],...]
31113112
<
3112-
When netrw is setting up maps for a netrw buffer, if |g:Netrw_UserMaps|
3113-
exists, then the internal function netrw#UserMaps(islocal) is called.
3114-
This function goes through all the entries in the |g:Netrw_UserMaps| list:
3113+
netrw netrw バッファ用のマップを設定する時、もし |g:Netrw_UserMaps|
3114+
が存在するなら、内部関数 netrw#UserMaps(islocal) が呼ばれます。
3115+
この関数は |g:Netrw_UserMaps| のすべての要素を走査します:
31153116

3116-
* sets up maps: >
3117+
* マップを設定します: >
31173118
nno <buffer> <silent> KEYMAP-SEQUENCE
31183119
:call s:UserMaps(islocal,"ExampleUserMapFunc")
3119-
< * refreshes if result from that function call is the string
3120-
"refresh"
3121-
* if the result string is not "", then that string will be
3122-
executed (:exe result)
3123-
* if the result is a List, then the above two actions on results
3124-
will be taken for every string in the result List
3120+
< * その関数からの返り値が文字列の "refresh" ならリフレッシュします。
3121+
* もしその返り値の文字列が "" ではない場合、その文字列は
3122+
実行されます (:exe 返り値)
3123+
* もし返り値が List なら、上記の結果に対する2つのアクションは
3124+
List の中のすべての文字列に行われます。
31253125

3126-
The user function is passed one argument; it resembles >
3126+
ユーザー関数には1つの引数が渡されます。以下のように >
31273127
31283128
fun! ExampleUserMapFunc(islocal)
31293129
<
3130-
where a:islocal is 1 if its a local-directory system call or 0 when
3131-
remote-directory system call.
3130+
もしそれがローカルディレクトリの呼び出しなら a:islocal は 1、
3131+
もしそれがリモートディレクトリの呼び出しなら a:islocal は 0 になります。
31323132

3133-
Use netrw#Expose("varname") to access netrw-internal (script-local)
3134-
variables.
3135-
Use netrw#Modify("varname",newvalue) to change netrw-internal variables.
3136-
Use netrw#Call("funcname"[,args]) to call a netrw-internal function with
3137-
specified arguments.
3133+
netrw#Expose("varname") netrw の (スクリプトローカルな)
3134+
内部変数にアクセスできます。
3135+
netrw#Modify("varname",newvalue) netrw の内部変数を変更できます。
3136+
netrw#Call("funcname"[,args]) netrw の内部関数を指定の引数で
3137+
呼び出すことができます。
31383138

3139-
Example: Get a copy of netrw's marked file list: >
3139+
例: netrw のマークファイルリストのコピーを取得します: >
31403140
31413141
let netrwmarkfilelist= netrw#Expose("netrwmarkfilelist")
31423142
<
3143-
Example: Modify the value of netrw's marked file list: >
3143+
例: netrw のマークファイルリストの値を変更します: >
31443144
31453145
call netrw#Modify("netrwmarkfilelist",[])
31463146
<
3147-
Example: Clear netrw's marked file list via a mapping on gu >
3147+
例: netrw のマークファイルリストを gu マッピング経由でクリアします: >
31483148
" ExampleUserMap: {{{2
31493149
fun! ExampleUserMap(islocal)
31503150
call netrw#Modify("netrwmarkfilelist",[])
@@ -3349,13 +3349,13 @@ Example: Clear netrw's marked file list via a mapping on gu >
33493349
P11. ウィンドウを二分割して、左の細いウィンドウをブラウザ表示に、右の
33503350
ウィンドウをファイル編集用にしたいんだけど、どうすればいいの?
33513351

3352-
You probably want netrw running as in a side window. If so, you
3353-
will likely find that ":[N]Lexplore" does what you want. The
3354-
optional "[N]" allows you to select the quantity of columns you
3355-
wish the |:Lexplore|r window to start with (see |g:netrw_winsize|
3356-
for how this parameter works).
3352+
おそらく netrw を横のウィンドウで表示させたいのではないでしょう
3353+
か。もしそうなら、 ":[N]Lexplore" が目的のものかと思います。
3354+
省略可能な "[N]" で :Lexplorer ウィンドウの起動時の幅を
3355+
指定することができます (設定値については |g:netrw_winsize|
3356+
を参照)。
33573357

3358-
Previous solution:
3358+
以前の解決法:
33593359

33603360
* <.vimrc> に次の設定を書く:
33613361
let g:netrw_altv = 1
@@ -3450,76 +3450,84 @@ Example: Clear netrw's marked file list via a mapping on gu >
34503450
ください。
34513451

34523452
*netrw-p17*
3453-
P17. Netrw is closing buffers on its own.
3454-
What steps will reproduce the problem?
3455-
1. :Explore, navigate directories, open a file
3456-
2. :Explore, open another file
3457-
3. Buffer opened in step 1 will be closed. o
3458-
What is the expected output? What do you see instead?
3459-
I expect both buffers to exist, but only the last one does.
3460-
3461-
(Lance) Problem is caused by "set autochdir" in .vimrc.
3462-
(drchip) I am able to duplicate this problem with |'acd'| set.
3463-
It appears that the buffers are not exactly closed;
3464-
a ":ls!" will show them (although ":ls" does not).
3453+
P17. Netrw が自身のバッファを閉じてしまう。
3454+
どうやって問題を再現させればいいの?
3455+
1. :Explore する、ディレクトリを歩く、ファイルを開く
3456+
2. :Explore する、別のファイルを開く
3457+
3. ステップ1で開いたバッファが閉じる
3458+
期待される出力は何ですか?
3459+
あなたの環境では何が表示されますか?
3460+
私は両方のバッファが存在していて欲しいけど、
3461+
実際は最後のバッファだけが残る。
3462+
3463+
(Lance) .vimrc に書かれた "set autochdir" が原因だ。
3464+
(drchip) |'acd'| オプションをセットすると再現できた。
3465+
バッファが正しく閉じられていないように見える。
3466+
":ls!" すると閉じられていないバッファが表示される
3467+
(":ls" では表示されない)。
34653468

34663469
*netrw-P18*
3467-
P18. How to locally edit a file that's only available via
3468-
another server accessible via ssh?
3469-
See http://stackoverflow.com/questions/12469645/
3470+
P18. ssh でのみ到達可能なサーバー上のファイルを
3471+
ローカルで編集するにはどうしたらいいの?
3472+
http://stackoverflow.com/questions/12469645/ 参照。
34703473
"Using Vim to Remotely Edit A File on ServerB Only
34713474
Accessible From ServerA"
34723475

34733476
*netrw-P19*
3474-
P19. How do I get numbering on in directory listings?
3475-
With |g:netrw_bufsettings|, you can control netrw's buffer
3476-
settings; try putting >
3477+
P19. ディレクトリのファイル一覧表示の際に行番号を表示するには
3478+
どうしたらいいの?
3479+
|g:netrw_bufsettings| によって netrw バッファの設定を
3480+
制御できる。次を .vimrc に書いてみて欲しい。 >
34773481
let g:netrw_bufsettings="noma nomod nu nobl nowrap ro nornu"
3478-
< in your .vimrc. If you'd like to have relative numbering
3479-
instead, try >
3482+
< もし相対的な行番号を表示したかったら代わりにこれを
3483+
試して欲しい。 >
34803484
let g:netrw_bufsettings="noma nomod nonu nobl nowrap ro rnu"
34813485
<
34823486
*netrw-P20*
3483-
P20. How may I have gvim start up showing a directory listing?
3484-
Try putting the following code snippet into your .vimrc: >
3487+
P20. ディレクトリのファイル一覧を表示して gvim を起動できますか?
3488+
次のコードを .vimrc に書いてみて欲しい: >
34853489
augroup VimStartup
34863490
au!
34873491
au VimEnter * if expand("%") == "" && argc() == 0 &&
34883492
\ (v:servername =~ 'GVIM\d*' || v:servername == "")
34893493
\ | e . | endif
34903494
augroup END
3491-
< You may use Lexplore instead of "e" if you're so inclined.
3492-
This snippet assumes that you have client-server enabled
3493-
(ie. a "huge" vim version).
3495+
< その気があれば "e" の代わりに Lexplore を使うこともできる。
3496+
このコードは client-server を有効化しているのを仮定している
3497+
(例えば "huge" バージョンのvim)。
34943498

34953499
*netrw-P21*
3496-
P21. I've made a directory (or file) with an accented character, but
3497-
netrw isn't letting me enter that directory/read that file:
3500+
P21. アクセント記号付き文字を含んだディレクトリ (またはファイル)
3501+
を作成したけど、 netrw でそのディレクトリに入ったり、
3502+
そのファイルを読み込んだりできません:
34983503

3499-
Its likely that the shell or o/s is using a different encoding
3500-
than you have vim (netrw) using. A patch to vim supporting
3501-
"systemencoding" may address this issue in the future; for
3502-
now, just have netrw use the proper encoding. For example: >
3504+
おそらくあなたのシェルかo/sが、あなたのvimが使っている
3505+
エンコーディングと異なるエンコーディングを使っていることが
3506+
原因ではないでしょうか。 将来 vim に "systemencoding" を
3507+
サポートさせるパッチがこれを解決してくれるのではないで
3508+
しょうか。今は netrw に適切なエンコーディングを使わせて
3509+
ください。例えば: >
35033510
35043511
au FileType netrw set enc=latin1
35053512
<
35063513
*netrw-P22*
3507-
P22. I get an error message when I try to copy or move a file:
3514+
P22. ファイルをコピーもしくは移動させようとするとエラーが出ます:
35083515

35093516
**error** (netrw) tried using g:netrw_localcopycmd<cp>; it doesn't work!
35103517

3511-
What's wrong?
3512-
3513-
Netrw uses several system level commands to do things (see
3518+
何がおかしいの?
35143519

3520+
Netrw はコピーや移動を行うためにいくつかのシステム用コマンドを
3521+
持っています (次を参照
35153522
|g:netrw_localcopycmd|, |g:netrw_localmovecmd|,
3516-
|g:netrw_localrmdir|, |g:netrw_mkdir_cmd|).
3517-
3518-
You may need to adjust the default commands for one or more of
3519-
these commands by setting them properly in your .vimrc. Another
3520-
source of difficulty is that these commands use vim's local
3521-
directory, which may not be the same as the browsing directory
3522-
shown by netrw (see |g:netrw_keepdir|).
3523+
|g:netrw_localrmdir|, |g:netrw_mkdir_cmd|)。
3524+
3525+
もしかしたら .vimrc でそれらを適切に設定して、
3526+
デフォルトのコマンドを1つかそれ以上調整する必要が
3527+
あるかもしれません。また違う面で難しいのは
3528+
これらのコマンドは vim のローカルディレクトリを使用します。
3529+
それは netrw でブラウズしているディレクトリとは同じでは
3530+
ないかもしれません (|g:netrw_keepdir| 参照)。
35233531

35243532

35253533
==============================================================================

0 commit comments

Comments
 (0)