diff --git a/doc/pi_netrw.jax b/doc/pi_netrw.jax index 271128505..1261aadfe 100644 --- a/doc/pi_netrw.jax +++ b/doc/pi_netrw.jax @@ -1,4 +1,4 @@ -*pi_netrw.txt* For Vim バージョン 9.1. Last change: 2024 Nov 23 +*netrw.txt* For Vim バージョン 9.1. ------------------------------------------------ NETRW REFERENCE MANUAL by Charles E. Campbell @@ -7,7 +7,7 @@ Original Author: Charles E. Campbell Copyright: Copyright (C) 2017 Charles E Campbell *netrw-copyright* The VIM LICENSE applies to the files in this package, including - netrw.vim, pi_netrw.txt, netrwSettings.vim, and + netrw.vim, netrw.txt, netrwSettings.vim, and syntax/netrw.vim. Like anything else that's free, netrw.vim and its associated files are provided *as is* and comes with no warranty of any kind, either expressed or implied. No guarantees of @@ -111,10 +111,7 @@ Copyright: Copyright (C) 2017 Charles E Campbell *netrw-copyright* ソートの種類を変更する..............................|netrw-s| ファイルを開くウィンドウを指定する..................|netrw-C| 10. 問題と対策............................................|netrw-problems| -11. Netrw をデバッグする..................................|netrw-debug| -12. 変更履歴..............................................|netrw-history| -13. Todo..................................................|netrw-todo| -14. クレジット............................................|netrw-credits| +11. クレジット............................................|netrw-credits| ============================================================================== 2. Netrw の準備 *netrw-start* {{{1 @@ -403,9 +400,6 @@ Netrw にはたくさんの変数が用意されていて、好きなように *g:netrw_menu* =0 netrw のメニューを使う =1 (初期設定) netrw のメニューを使わない - *g:netrw_nogx* この変数が存在する場合、"gx" マップは定義されません。 - (|netrw-gx|参照) - *g:netrw_uid* (ftp) user-id Vim セッションごとに記録される *s:netrw_passwd* (ftp) password Vim セッションごとに記録される @@ -1093,7 +1087,7 @@ QUICK HELP *netrw-quickhelp* {{{2 U 次に訪れたディレクトリに移動する |netrw-U| v カーソル位置のファイル/ディレクトリを |netrw-v| 新しいウィンドウで開く。垂直分割。 - x 関連付けられたプログラムでファイルを表示する |netrw-x| + x 関連付けられたプログラムでファイルを表示する。(|:Open| 参照) X カーソル位置のファイルを |system()| で実行する |netrw-X| % 表示しているディレクトリで新しいファイルを開く |netrw-%| @@ -1434,106 +1428,6 @@ NETRW CLEAN *netrw-clean* *:NetrwClean* {{{2 どちらのコマンドも、本当に削除していいかどうかを確認するダイアログが最初に表示 されます。ファイルを削除する権限がない場合はエラーメッセージが表示されます。 -☆特殊ハンドラでブラウジングをカスタマイズ *netrw-x* *netrw-handler* {{{2 - -html, gif, jpeg, (word/office) doc などのファイルは専用ハンドラ (コンピュータ -にあらかじめ備わっているようなツール) で処理するのが一番です。Netrw ではそのよ -うな専用ハンドラの呼び出しをサポートしています: - - * ファイルパスの上にあるカーソルで gx を押すか、netrw バッファで x を - 押す。前者は |g:netrw_nogx| 変数を定義することで無効にできます。 - * コマンドラインで、:Open と入力します。下記 |:Open| を参照。 - -ビジュアルモード (|visual-start| を参照) を使用して、特殊ハンドラが使用するテ -キストを選択することもできます。通常、gx はカーソルの下のテキストを取得するた -めに近くの URL またはファイル名をチェックします。|expand()| が使用するテキスト -は、|g:netrw_gx| 変数 (オプションには ""、"" が含まれます) を介 -して変更できます。Note expand("") は、|'isfname'| の設定に依存すること -に注意してください。または、ビジュアル選択 (|visual-block| を参照) を行ってか -ら gx を押すことで、gx が使用するテキストを選択することもできます。 - -選択関数は、関数 `Netrw_get_URL_` を追加することで各ファイルタイプに -適応できます。 は 'filetype' で指定します。 -この関数は、gx が使用する URL またはファイル名を返す必要があり、空の文字列を返 -す場合はデフォルトの動作に戻ります。 -例えば、Markdown と HTML のリンク用の特別なハンドラは、 -> -" 正確なカーソル位置に関係なく、gx が concealed なリンクで動作するようにする: > - - function Netrw_get_URL_markdown() - " 次のような markdown URL [link text](http://ya.ru 'yandex search') - try - let save_view = winsaveview() - if searchpair('\[.\{-}\](', '', ')\zs', 'cbW', '', line('.')) > 0 - return matchstr(getline('.')[col('.')-1:], - \ '\[.\{-}\](\zs' .. g:netrw_regex_url .. '\ze\(\s\+.\{-}\)\?)') - endif - return '' - finally - call winrestview(save_view) - endtry - endfunction - - function Netrw_get_URL_html() - " 次のような HTML URL Python is here - " - try - let save_view = winsaveview() - if searchpair('\|/>\)\zs', 'cbW', '', line('.')) > 0 - return matchstr(getline('.')[col('.') - 1 : ], - \ 'href=["'.."'"..']\?\zs\S\{-}\ze["'.."'"..']\?/\?>') - endif - return '' - finally - call winrestview(save_view) - endtry - endfunction -< -ファイルパス以外に、カーソルの下のテキストが URL である場合もあります。Netrw -は、デフォルトで次の正規表現を使用して、カーソルの下のテキストが URL であるか -どうかを判断します。 -> - :let g:netrw_regex_url = '\%(\%(http\|ftp\|irc\)s\?\|file\)://\S\{-}' -< -関連する設定変数: - |g:netrw_gx| gx がカーソルの下のテキストを取得する方法を制御する - |g:netrw_nogx| 編集中の gx マップを防止する - |g:netrw_suppress_gx_mesg| gx のブラウザーメッセージの抑制を制御する - -☆ファイルを開いてアプリを起動する *netrw-gx* *:Open* *:Launch* {{{2 - -Netrw は、次の方法で特殊ハンドラを決定します: - - * |g:netrw_browsex_viewer| が存在する場合、それを使用してファイルを表示しよ - うとします。 - 使用したいビューアがリモート URL ディレクトリの処理をサポートしていない場 - 合は、|g:netrw_browsex_support_remote| を 0 に設定します。 - * 上記以外: - - * Windows では : explorer.exe が使用されます - * Mac OS X では : open が使用されます - * Linux では : xdg-open が使用されます - -適切なハンドラでパス (または URL) を開くには、以下を入力します。 > - - :Open -< -シェルでも Vim のコマンドラインでもエスケープは必要ありません。 - -特定のアプリケーションを起動するには、 、多くの場合、 は - です > - - :Launch . - -< は作為的に複雑になる可能性があり、特に多くのファイルパスが含まれる場 -合、エスケープはユーザーに任されます。 - -g:loaded_netrwPlugin を設定して netrw プラグインを無効にした場合 -(|netrw-noload| を参照) は、以下が使用できます > - - :call netrw#Launch(' ') - :call netrw#Open('') -< *netrw-curdir* ☆ブックマークを削除する *netrw-mB* {{{2 @@ -2532,14 +2426,6 @@ netrw ブラウザーの各種設定は変数で管理されていて、それ |netrw-C| |netrw-cr| |netrw-ctrl-r| - *g:netrw_browsex_viewer* ユーザー指定のビューア: > - "kfmclient exec" - "gnome-open" -< - *g:netrw_browsex_support_remote* - 指定しているビューアがリモートURLをサポートす - るかどうかを設定します(|netrw-handler| 参照)。 - *g:netrw_chgperm* Unix/Linux: "chmod PERM FILENAME" Windows: "cacls FILENAME /e /p PERM" ファイルのアクセス権限を変更するのに使われま @@ -2567,7 +2453,6 @@ netrw ブラウザーの各種設定は変数で管理されていて、それ で大文字が使われていますが、これは関数参照を保 存するために必要です) - *g:netrw_ctags* ="ctags" タグを作成するための外部コマンド @@ -2708,12 +2593,6 @@ netrw ブラウザーの各種設定は変数で管理されていて、それ 設定された文字がディレクトリ名に使われていたら glob() を適用する前にエスケープされる。 - *g:netrw_gx* ="" - このオプションは gx (|netrw-gx|)がどのように - カーソル位置のテキストを取得するかを制御しま - す。可能な引数については |expand()| を参照して - ください。 - *g:netrw_hide* "a" マップを制御する (|netrw-a| 参照) =0 : すべて表示 =1 : 非隠しファイルを表示 @@ -3339,7 +3218,6 @@ netrw#Call("funcname"[,args]) netrw の内部関数を指定の引数で 10. 問題と対策 *netrw-problems* {{{1 (何かフィードバックがあればこの項に追加していきます) - (|netrw-debug| も参照) *netrw-p1* P1. Windows を使っています。ftp を使ったブラウジングで時間やサイズで {{{2 ソートできません。- あるいは - リモートシステムが Windows サーバー @@ -3703,605 +3581,7 @@ netrw#Call("funcname"[,args]) netrw の内部関数を指定の引数で ============================================================================== -11. Netrw をデバッグする *netrw-debug* {{{1 - -ステップ1: あなたが直面した問題が以下の netrw の最新版(開発版)のコピーを取得す -ることで解決するか確認してください: - - http://www.drchip.org/astronaut/vim/index.html#NETRW - - スクリプトはたいていは次のような場所にあります: -> - /usr/local/share/vim/vim8x/plugin/netrwPlugin.vim - /usr/local/share/vim/vim8x/autoload/netrw.vim -< -これらは起動時に自動的に読み込まれます (:set nocp を想定)。 -新しい netrw を次の場所にインストールしてください。 > - - $HOME/.vim/plugin/netrwPlugin.vim - $HOME/.vim/autoload/netrw.vim -< -ステップ2: netrw の最新版をインストールしたら、その問題が本当に netrw によるも -のか確認してください。netrw.vimrc という次の内容のファイルを作成してください。 > - - set nocp - so $HOME/.vim/plugin/netrwPlugin.vim -< -次に netrw を次のように起動してください: > - - vim -u netrw.vimrc --noplugins -i NONE [他にパスがあればここに追加] -< -必要な netrw のコマンドを実行し、問題がまだ起きていることを確認してください。 -この手順は個人の .vimrc の設定、.viminfo ファイル、他のプラグインによる問題を -回避するためです。もし問題が再現しなくなったら、あなたの .vimrc のどの設定が -netrw かあるいは関与している他のプラグインと衝突しているかを見極める必要があり -ます。 - -ステップ3: 問題がまだ起きているようなら、netrw からデバッグトレースを取得して -ください: - - 1. スクリプトを入手してください: - - http://www.drchip.org/astronaut/vim/index.html#DECHO - or - http://vim.sourceforge.net/scripts/script.php?script_id=120 - - Decho.vim は "vimball" の形で提供されています。|vimball-intro|参照。 - Decho.vba.gz ファイルを編集してから source するには: > - - vim Decho.vba.gz - :so % - :q -< - 2. netrw デバッグでの追跡を有効にし、 ファイルを編集してく - ださい: > - - vim netrw.vim - :DechoOn - :wq -< - 通常のデバッグなし状態に戻すには再び を編集します > - - vim netrw.vim - :DechoOff - :wq -< - このコマンドは で定義されており、すべての Decho デバッ - グステートメント (Dfunc(), Dret(), Decho(), Dredir()) をコメントア - ウトします。 - - 3. Vim を起動して、ネットワークファイルを開いたりブラウジングしたりし - て問題を再現してください。 がネットワーク上のファイルを - 読み込んだり書き込んだりする過程が別のタブか、サーバー Vim のウィン - ドウに出力されます。 - - netrw.vimrc ファイルに Decho プラグインを入れるには: > - - set nocp - so $HOME/.vim/plugin/Decho.vim - so $HOME/.vim/plugin/netrwPlugin.vim -< - 続けて次のように vim を動かします > - - vim -u netrw.vimrc --noplugins -i NONE [some path here] -< - こうしてオプションや他のプラグインとの絡みを回避できます。 - - ファイルに保存するには: linux 下では、出力がリモートサーバーのウィ - ンドウに分割されるので、ファイルに保存するには次のようにします > - - :w! DBG - -< clientserver をサポートしない vim では、デバッグ出力は別のタブに出 - して: > - - :tabnext - :set bt= - :w! DBG - -< - 加えて、次のコマンドも使うと助けになります > - - :Dsep - -< は次にあなたがタイプするコマンドです。これによって、デ - バッグ出力のどの部分がどのコマンドに対応するかを関連付けるのが簡単 - になります。 - - バグレポートについては、|bugs| を参照してください。 -============================================================================== -12. 変更履歴 *netrw-history* {{{1 - - v172: Sep 02, 2021 * (Bram Moolenaar) Changed "l:go" to "go" - * (Bram Moolenaar) no need for "b" in - netrw-safe guioptions - Nov 15, 2021 * removed netrw_localrm and netrw_localrmdir - references - Aug 18, 2022 * (Miguel Barro) improving compatibility with - powershell - v171: Oct 09, 2020 * included code in s:NetrwOptionsSafe() - to allow |'bh'| to be set to delete when - rather than hide when g:netrw_fastbrowse - was zero. - * Installed |g:netrw_clipboard| setting - * Installed option bypass for |'guioptions'| - a/A settings - * Changed popup_beval() to |popup_atcursor()| - in netrw#ErrorMsg (lacygoill). Apparently - popup_beval doesn't reliably close the - popup when the mouse is moved. - * VimEnter() now using win_execute to examine - buffers for an attempt to open a directory. - Avoids issues with popups/terminal from - command line. (lacygoill) - Jun 28, 2021 * (zeertzjq) provided a patch for use of - xmap,xno instead of vmap,vno in - netrwPlugin.vim. Avoids entanglement with - select mode. - Jul 14, 2021 * Fixed problem addressed by tst976; opening - a file using tree mode, going up a - directory, and opening a file there was - opening the file in the wrong directory. - Jul 28, 2021 * (Ingo Karkat) provided a patch fixing an - E488 error with netrwPlugin.vim - (occurred for vim versions < 8.02) - v170: Mar 11, 2020 * (reported by Reiner Herrmann) netrw+tree - would not hide with the ^\..* pattern - correctly. - * (Marcin Szamotulski) NetrwOptionRestore - did not restore options correctly that - had a single quote in the option string. - Apr 13, 2020 * implemented error handling via popup - windows (see |popup_beval()|) - Apr 30, 2020 * (reported by Manatsu Takahashi) while - using Lexplore, a modified file could - be overwritten. Sol'n: will not overwrite, - but will emit an |E37| (although one cannot - add an ! to override) - Jun 07, 2020 * (reported by Jo Totland) repeatedly invoking - :Lexplore and quitting it left unused - hidden buffers. Netrw will now set netrw - buffers created by :Lexplore to |'bh'|=wipe. - v169: Dec 20, 2019 * (reported by amkarthik) that netrw's x - (|netrw-x|) would throw an error when - attempting to open a local directory. - v168: Dec 12, 2019 * scp timeout error message not reported, - hopefully now fixed (Shane Xb Qian) - v167: Nov 29, 2019 * netrw does a save&restore on @* and @+. - That causes problems with the clipboard. - Now restores occurs only if @* or @+ have - been changed. - * netrw will change @* or @+ less often. - Never if I happen to have caught all the - operations that modify the unnamed - register (which also writes @*). - * Modified hiding behavior so that "s" - will not ignore hiding. - v166: Nov 06, 2019 * Removed a space from a nmap for "-" - * Numerous debugging statement changes - v163: Dec 05, 2017 * (Cristi Balan) reported that a setting ('sel') - was left changed - * (Holger Mitschke) reported a problem with - saving and restoring history. Fixed. - * Hopefully I fixed a nasty bug that caused a - file rename to wipe out a buffer that it - should not have wiped out. - * (Holger Mitschke) amended this help file - with additional |g:netrw_special_syntax| - items - * Prioritized wget over curl for - g:netrw_http_cmd - v162: Sep 19, 2016 * (haya14busa) pointed out two syntax errors - with a patch; these are now fixed. - Oct 26, 2016 * I started using mate-terminal and found that - x and gx (|netrw-x| and |netrw-gx|) were no - longer working. Fixed (using atril when - $DESKTOP_SESSION is "mate"). - Nov 04, 2016 * (Martin Vuille) pointed out that @+ was - being restored with keepregstar rather than - keepregplus. - Nov 09, 2016 * Broke apart the command from the options, - mostly for Windows. Introduced new netrw - settings: |g:netrw_localcopycmdopt| - |g:netrw_localcopydircmdopt| - |g:netrw_localmkdiropt| - |g:netrw_localmovecmdopt| - Nov 21, 2016 * (mattn) provided a patch for preview; swapped - winwidth() with winheight() - Nov 22, 2016 * (glacambre) reported that files containing - spaces weren't being obtained properly via - scp. Fix: apparently using single quotes - such as with 'file name' wasn't enough; the - spaces inside the quotes also had to be - escaped (ie. 'file\ name'). - * Also fixed obtain (|netrw-O|) to be able to - obtain files with spaces in their names - Dec 20, 2016 * (xc1427) Reported that using "I" (|netrw-I|) - when atop "Hiding" in the banner also caused - the active-banner hiding control to occur - Jan 03, 2017 * (Enno Nagel) reported that attempting to - apply netrw to a directory that was without - read permission caused a syntax error. - Jan 13, 2017 * (Ingo Karkat) provided a patch which makes - using netrw#Call() better. Now returns - value of internal routines return, for example. - Jan 13, 2017 * (Ingo Karkat) changed netrw#FileUrlRead to - use |:edit| instead of |:read|. I also - changed the routine name to netrw#FileUrlEdit. - Jan 16, 2017 * (Sayem) reported a problem where :Lexplore - could generate a new listing buffer and - window instead of toggling the netrw display. - Unfortunately, the directions for eliciting - the problem weren't complete, so I may or - may not have fixed that issue. - Feb 06, 2017 * Implemented cb and cB. Changed "c" to "cd". - (see |netrw-cb|, |netrw-cB|, and |netrw-cd|) - Mar 21, 2017 * previously, netrw would specify (safe) settings - even when the setting was already safe for - netrw. Netrw now attempts to leave such - already-netrw-safe settings alone. - (affects s:NetrwOptionRestore() and - s:NetrwSafeOptions(); also introduced - s:NetrwRestoreSetting()) - Jun 26, 2017 * (Christian Brabandt) provided a patch to - allow curl to follow redirects (ie. -L - option) - Jun 26, 2017 * (Callum Howard) reported a problem with - :Lexpore not removing the Lexplore window - after a change-directory - Aug 30, 2017 * (Ingo Karkat) one cannot switch to the - previously edited file (e.g. with CTRL-^) - after editing a file:// URL. Patch to - have a "keepalt" included. - Oct 17, 2017 * (Adam Faryna) reported that gn (|netrw-gn|) - did not work on directories in the current - tree - v157: Apr 20, 2016 * (Nicola) had set up a "nmap ..." with - a function that returned a 0 while silently - invoking a shell command. The shell command - activated a ShellCmdPost event which in turn - called s:LocalBrowseRefresh(). That looks - over all netrw buffers for changes needing - refreshes. However, inside a |:map-|, - tab and window changes are disallowed. Fixed. - (affects netrw's s:LocalBrowseRefresh()) - * g:netrw_localrmdir not used any more, but - the relevant patch that causes |delete()| to - take over was #1107 (not #1109). - * |expand()| is now used on |g:netrw_home|; - consequently, g:netrw_home may now use - environment variables - * s:NetrwLeftmouse and s:NetrwCLeftmouse will - return without doing anything if invoked - when inside a non-netrw window - Jun 15, 2016 * gx now calls netrw#GX() which returns - the word under the cursor. The new - wrinkle: if one is in a netrw buffer, - then netrw's s:NetrwGetWord(). - Jun 22, 2016 * Netrw was executing all its associated - Filetype commands silently; I'm going - to try doing that "noisily" and see if - folks have a problem with that. - Aug 12, 2016 * Changed order of tool selection for - handling http://... viewing. - (Nikolay Aleksandrovich Pavlov) - Aug 21, 2016 * Included hiding/showing/all for tree - listings - * Fixed refresh (^L) for tree listings - v156: Feb 18, 2016 * Changed =~ to =~# where appropriate - Feb 23, 2016 * s:ComposePath(base,subdir) now uses - fnameescape() on the base portion - Mar 01, 2016 * (gt_macki) reported where :Explore would - make file unlisted. Fixed (tst943) - Apr 04, 2016 * (reported by John Little) netrw normally - suppresses browser messages, but sometimes - those "messages" are what is wanted. - See |g:netrw_suppress_gx_mesg| - Apr 06, 2016 * (reported by Carlos Pita) deleting a remote - file was giving an error message. Fixed. - Apr 08, 2016 * (Charles Cooper) had a problem with an - undefined b:netrw_curdir. He also provided - a fix. - Apr 20, 2016 * Changed s:NetrwGetBuffer(); now uses - dictionaries. Also fixed the "No Name" - buffer problem. - v155: Oct 29, 2015 * (Timur Fayzrakhmanov) reported that netrw's - mapping of ctrl-l was not allowing refresh of - other windows when it was done in a netrw - window. - Nov 05, 2015 * Improved s:TreeSqueezeDir() to use search() - instead of a loop - * NetrwBrowse() will return line to - w:netrw_bannercnt if cursor ended up in - banner - Nov 16, 2015 * Added a NetrwTreeSqueeze (|netrw-s-cr|) - Nov 17, 2015 * Commented out imaps -- perhaps someone can - tell me how they're useful and should be - retained? - Nov 20, 2015 * Added |netrw-ma| and |netrw-mA| support - Nov 20, 2015 * gx (|netrw-gx|) on a URL downloaded the - file in addition to simply bringing up the - URL in a browser. Fixed. - Nov 23, 2015 * Added |g:netrw_sizestyle| support - Nov 27, 2015 * Inserted a lot of s into various netrw - maps. - Jan 05, 2016 * |netrw-qL| implemented to mark files based - upon |location-list|s; similar to |netrw-qF|. - Jan 19, 2016 * using - call delete(directoryname,"d") - - instead of using g:netrw_localrmdir if - v7.4 + patch#1107 is available - Jan 28, 2016 * changed to using |winsaveview()| and - |winrestview()| - Jan 28, 2016 * s:NetrwTreePath() now does a save and - restore of view - Feb 08, 2016 * Fixed a tree-listing problem with remote - directories - v154: Feb 26, 2015 * (Yuri Kanivetsky) reported a situation where - a file was not treated properly as a file - due to g:netrw_keepdir == 1 - Mar 25, 2015 * (requested by Ben Friz) one may now sort by - extension - Mar 28, 2015 * (requested by Matt Brooks) netrw has a lot - of buffer-local mappings; however, some - plugins (such as vim-surround) set up - conflicting mappings that cause vim to wait. - The "" modifier has been included - with most of netrw's mappings to avoid that - delay. - Jun 26, 2015 * |netrw-gn| mapping implemented - * :Ntree NotADir resulted in having - the tree listing expand in the error messages - window. Fixed. - Jun 29, 2015 * Attempting to delete a file remotely caused - an error with "keepsol" mentioned; fixed. - Jul 08, 2015 * Several changes to keep the |:jumps| table - correct when working with - |g:netrw_fastbrowse| set to 2 - * wide listing with accented characters fixed - (using %-S instead of %-s with a |printf()| - Jul 13, 2015 * (Daniel Hahler) CheckIfKde() could be true - but kfmclient not installed. Changed order - in netrw#BrowseX(): checks if kde and - kfmclient, then will use xdg-open on a unix - system (if xdg-open is executable) - Aug 11, 2015 * (McDonnell) tree listing mode wouldn't - select a file in a open subdirectory. - * (McDonnell) when multiple subdirectories - were concurrently open in tree listing - mode, a ctrl-L wouldn't refresh properly. - * The netrw:target menu showed duplicate - entries - Oct 13, 2015 * (mattn) provided an exception to handle - windows with shellslash set but no shell - Oct 23, 2015 * if g:netrw_usetab and now used - to control whether NetrwShrink is used - (see |netrw-c-tab|) - v153: May 13, 2014 * added another |g:netrw_ffkeep| usage {{{2 - May 14, 2014 * changed s:PerformListing() so that it - always sets ft=netrw for netrw buffers - (ie. even when syntax highlighting is - off, not available, etc) - May 16, 2014 * introduced the |netrw-ctrl-r| functionality - May 17, 2014 * introduced the |netrw-:NetrwMB| functionality - * mb and mB (|netrw-mb|, |netrw-mB|) will - add/remove marked files from bookmark list - May 20, 2014 * (Enno Nagel) reported that :Lex - wasn't working. Fixed. - May 26, 2014 * restored test to prevent leftmouse window - resizing from causing refresh. - (see s:NetrwLeftmouse()) - * fixed problem where a refresh caused cursor - to go just under the banner instead of - staying put - May 28, 2014 * (László Bimba) provided a patch for opening - the |:Lexplore| window 100% high, optionally - on the right, and will work with remote - files. - May 29, 2014 * implemented :NetrwC (see |netrw-:NetrwC|) - Jun 01, 2014 * Removed some "silent"s from commands used - to implemented scp://... and pscp://... - directory listing. Permits request for - password to appear. - Jun 05, 2014 * (Enno Nagel) reported that user maps "/" - caused problems with "b" and "w", which - are mapped (for wide listings only) to - skip over files rather than just words. - Jun 10, 2014 * |g:netrw_gx| introduced to allow users to - override default "" with the gx - (|netrw-gx|) map - Jun 11, 2014 * gx (|netrw-gx|), with |'autowrite'| set, - will write modified files. s:NetrwBrowseX() - will now save, turn off, and restore the - |'autowrite'| setting. - Jun 13, 2014 * added visual map for gx use - Jun 15, 2014 * (Enno Nagel) reported that with having hls - set and wide listing style in use, that the - b and w maps caused unwanted highlighting. - Jul 05, 2014 * |netrw-mv| and |netrw-mX| commands included - Jul 09, 2014 * |g:netrw_keepj| included, allowing optional - keepj - Jul 09, 2014 * fixing bugs due to previous update - Jul 21, 2014 * (Bruno Sutic) provided an updated - netrw_gitignore.vim - Jul 30, 2014 * (Yavuz Yetim) reported that editing two - remote files of the same name caused the - second instance to have a "temporary" - name. Fixed: now they use the same buffer. - Sep 18, 2014 * (Yasuhiro Matsumoto) provided a patch which - allows scp and windows local paths to work. - Oct 07, 2014 * gx (see |netrw-gx|) when atop a directory, - will now do |gf| instead - Nov 06, 2014 * For cygwin: cygstart will be available for - netrw#BrowseX() to use if its executable. - Nov 07, 2014 * Began support for file://... urls. Will use - |g:netrw_file_cmd| (typically elinks or links) - Dec 02, 2014 * began work on having mc (|netrw-mc|) copy - directories. Works for linux machines, - cygwin+vim, but not for windows+gvim. - Dec 02, 2014 * in tree mode, netrw was not opening - directories via symbolic links. - Dec 02, 2014 * added resolved link information to - thin and tree modes - Dec 30, 2014 * (issue#231) |:ls| was not showing - remote-file buffers reliably. Fixed. - v152: Apr 08, 2014 * uses the |'noswapfile'| option (requires {{{2 - vim 7.4 with patch 213) - * (Enno Nagel) turn |'rnu'| off in netrw - buffers. - * (Quinn Strahl) suggested that netrw - allow regular window splitting to occur, - thereby allowing |'equalalways'| to take - effect. - * (qingtian zhao) normally, netrw will - save and restore the |'fileformat'|; - however, sometimes that isn't wanted - Apr 14, 2014 * whenever netrw marks a buffer as ro, - it will also mark it as nomod. - Apr 16, 2014 * sftp protocol now supported by - netrw#Obtain(); this means that one - may use "mc" to copy a remote file - to a local file using sftp, and that - the |netrw-O| command can obtain remote - files via sftp. - * added [count]C support (see |netrw-C|) - Apr 18, 2014 * when |g:netrw_chgwin| is one more than - the last window, then vertically split - the last window and use it as the - chgwin window. - May 09, 2014 * SavePosn was "saving filename under cursor" - from a non-netrw window when using :Rex. - v151: Jan 22, 2014 * extended :Rexplore to return to buffer {{{2 - prior to Explore or editing a directory - * (Ken Takata) netrw gave error when - clipboard was disabled. Sol'n: Placed - several if has("clipboard") tests in. - * Fixed ftp://X@Y@Z// problem; X@Y now - part of user id, and only Z is part of - hostname. - * (A Loumiotis) reported that completion - using a directory name containing spaces - did not work. Fixed with a retry in - netrw#Explore() which removes the - backslashes vim inserted. - Feb 26, 2014 * :Rexplore now records the current file - using w:netrw_rexfile when returning via - |:Rexplore| - Mar 08, 2014 * (David Kotchan) provided some patches - allowing netrw to work properly with - windows shares. - * Multiple one-liner help messages available - by pressing while atop the "Quick - Help" line - * worked on ShellCmdPost, FocusGained event - handling. - * |:Lexplore| path: will be used to update - a left-side netrw browsing directory. - Mar 12, 2014 * |netrw-s-cr|: use to close - tree directory implemented - Mar 13, 2014 * (Tony Mechylynck) reported that using - the browser with ftp on a directory, - and selecting a gzipped txt file, that - an E19 occurred (which was issued by - gzip.vim). Fixed. - Mar 14, 2014 * Implemented :MF and :MT (see |netrw-:MF| - and |netrw-:MT|, respectively) - Mar 17, 2014 * |:Ntree| [dir] wasn't working properly; fixed - Mar 18, 2014 * Changed all uses of set to setl - Mar 18, 2014 * Commented the netrw_btkeep line in - s:NetrwOptionSave(); the effect is that - netrw buffers will remain as |'bt'|=nofile. - This should prevent swapfiles being created - for netrw buffers. - Mar 20, 2014 * Changed all uses of lcd to use s:NetrwLcd() - instead. Consistent error handling results - and it also handles Window's shares - * Fixed |netrw-d| command when applied with ftp - * https: support included for netrw#NetRead() - v150: Jul 12, 2013 * removed a "keepalt" to allow ":e #" to {{{2 - return to the netrw directory listing - Jul 13, 2013 * (Jonas Diemer) suggested changing - a to . - Jul 21, 2013 * (Yuri Kanivetsky) reported that netrw's - use of mkdir did not produce directories - following the user's umask. - Aug 27, 2013 * introduced |g:netrw_altfile| option - Sep 05, 2013 * s:Strlen() now uses |strdisplaywidth()| - when available, by default - Sep 12, 2013 * (Selyano Baldo) reported that netrw wasn't - opening some directories properly from the - command line. - Nov 09, 2013 * |:Lexplore| introduced - * (Ondrej Platek) reported an issue with - netrw's trees (P15). Fixed. - * (Jorge Solis) reported that "t" in - tree mode caused netrw to forget its - line position. - Dec 05, 2013 * Added file marking - (see |netrw-mf|) - Dec 05, 2013 * (Yasuhiro Matsumoto) Explore should use - strlen() instead s:Strlen() when handling - multibyte chars with strpart() - (ie. strpart() is byte oriented, not - display-width oriented). - Dec 09, 2013 * (Ken Takata) Provided a patch; File sizes - and a portion of timestamps were wrongly - highlighted with the directory color when - setting `:let g:netrw_liststyle=1` on Windows. - * (Paul Domaskis) noted that sometimes - cursorline was activating in non-netrw - windows. All but one setting of cursorline - was done via setl; there was one that was - overlooked. Fixed. - Dec 24, 2013 * (esquifit) asked that netrw allow the - /cygdrive prefix be a user-alterable - parameter. - Jan 02, 2014 * Fixed a problem with netrw-based ballon - evaluation (ie. netrw#NetrwBaloonHelp() - not having been loaded error messages) - Jan 03, 2014 * Fixed a problem with tree listings - * New command installed: |:Ntree| - Jan 06, 2014 * (Ivan Brennan) reported a problem with - |netrw-P|. Fixed. - Jan 06, 2014 * Fixed a problem with |netrw-P| when the - modified file was to be abandoned. - Jan 15, 2014 * (Matteo Cavalleri) reported that when the - banner is suppressed and tree listing is - used, a blank line was left at the top of - the display. Fixed. - Jan 20, 2014 * (Gideon Go) reported that, in tree listing - style, with a previous window open, that - the wrong directory was being used to open - a file. Fixed. (P21) - v149: Apr 18, 2013 * in wide listing format, now have maps for {{{2 - w and b to move to next/previous file - Apr 26, 2013 * one may now copy files in the same - directory; netrw will issue requests for - what names the files should be copied under - Apr 29, 2013 * Trying Benzinger's problem again. Seems - that commenting out the BufEnter and - installing VimEnter (only) works. Weird - problem! (tree listing, vim -O Dir1 Dir2) - May 01, 2013 * :Explore ftp://... wasn't working. Fixed. - May 02, 2013 * introduced |g:netrw_bannerbackslash| as - requested by Paul Domaskis. - Jul 03, 2013 * Explore now avoids splitting when a buffer - will be hidden. - v148: Apr 16, 2013 * changed Netrw's Style menu to allow direct {{{2 - choice of listing style, hiding style, and - sorting style - - -============================================================================== -13. Todo *netrw-todo* {{{1 - -07/29/09 : banner :|g:netrw_banner| can be used to suppress the - suppression banner. This feature is new and experimental, - so its in the process of being debugged. -09/04/09 : "gp" : See if it can be made to work for remote systems. - : See if it can be made to work with marked files. - -============================================================================== -14. クレジット *netrw-credits* {{{1 +11. クレジット *netrw-credits* {{{1 Vim editor by Bram Moolenaar (Thanks, Bram!) dav support by C Campbell diff --git a/en/pi_netrw.txt b/en/pi_netrw.txt index c22aad354..4afe53819 100644 --- a/en/pi_netrw.txt +++ b/en/pi_netrw.txt @@ -1,4 +1,4 @@ -*pi_netrw.txt* For Vim version 9.1. Last change: 2024 Nov 23 +*netrw.txt* ------------------------------------------------ NETRW REFERENCE MANUAL by Charles E. Campbell @@ -7,7 +7,7 @@ Original Author: Charles E. Campbell Copyright: Copyright (C) 2017 Charles E Campbell *netrw-copyright* The VIM LICENSE applies to the files in this package, including - netrw.vim, pi_netrw.txt, netrwSettings.vim, and + netrw.vim, netrw.txt, netrwSettings.vim, and syntax/netrw.vim. Like anything else that's free, netrw.vim and its associated files are provided *as is* and comes with no warranty of any kind, either expressed or implied. No guarantees of @@ -110,10 +110,7 @@ Copyright: Copyright (C) 2017 Charles E Campbell *netrw-copyright* Selecting Sorting Style.............................|netrw-s| Setting Editing Window..............................|netrw-C| 10. Problems and Fixes....................................|netrw-problems| -11. Debugging Netrw Itself................................|netrw-debug| -12. History...............................................|netrw-history| -13. Todo..................................................|netrw-todo| -14. Credits...............................................|netrw-credits| +11. Credits...............................................|netrw-credits| ============================================================================== 2. Starting With Netrw *netrw-start* {{{1 @@ -406,9 +403,6 @@ settings are described below, in |netrw-browser-options|, and in *g:netrw_menu* =0 disable netrw's menu =1 (default) netrw's menu enabled - *g:netrw_nogx* if this variable exists, then the "gx" map will not - be available (see |netrw-gx|) - *g:netrw_uid* (ftp) user-id, retained on a per-vim-session basis *s:netrw_passwd* (ftp) password, retained on a per-vim-session basis @@ -1116,7 +1110,7 @@ QUICK REFERENCE: MAPS *netrw-browse-maps* {{{2 U Change to subsequently-visited directory |netrw-U| v Enter the file/directory under the cursor in a new |netrw-v| browser window. A vertical split is used. - x View file with an associated program |netrw-x| + x View file with an associated program. (see |:Open|) X Execute filename under cursor via |system()| |netrw-X| % Open a new file in netrw's current directory |netrw-%| @@ -1469,106 +1463,6 @@ With either form of the command, netrw will first ask for confirmation that the removal is in fact what you want to do. If netrw doesn't have permission to remove a file, it will issue an error message. -CUSTOMIZING BROWSING WITH A SPECIAL HANDLER *netrw-x* *netrw-handler* {{{2 - -Certain files, such as html, gif, jpeg, (word/office) doc, etc, files, are -best seen with a special handler (ie. a tool provided with your computer's -operating system). Netrw allows one to invoke such special handlers by: - - * hitting gx with the cursor atop the file path or alternatively x - in a netrw buffer; the former can be disabled by defining the - |g:netrw_nogx| variable - * when in command line, typing :Open , see |:Open| below. - -One may also use visual mode (see |visual-start|) to select the text that the -special handler will use. Normally gx checks for a close-by URL or file name -to pick up the text under the cursor; one may change what |expand()| uses via the -|g:netrw_gx| variable (options include "", ""). Note that -expand("") depends on the |'isfname'| setting. Alternatively, one may -select the text to be used by gx by making a visual selection (see -|visual-block|) and then pressing gx. - -The selection function can be adapted for each filetype by adding a function -`Netrw_get_URL_`, where is given by the 'filetype'. -The function should return the URL or file name to be used by gx, and will -fall back to the default behavior if it returns an empty string. -For example, special handlers for links Markdown and HTML are - -" make gx work on concealed links regardless of exact cursor position: > - - function Netrw_get_URL_markdown() - " markdown URL such as [link text](http://ya.ru 'yandex search') - try - let save_view = winsaveview() - if searchpair('\[.\{-}\](', '', ')\zs', 'cbW', '', line('.')) > 0 - return matchstr(getline('.')[col('.')-1:], - \ '\[.\{-}\](\zs' .. g:netrw_regex_url .. '\ze\(\s\+.\{-}\)\?)') - endif - return '' - finally - call winrestview(save_view) - endtry - endfunction - - function Netrw_get_URL_html() - " HTML URL such as Python is here - " - try - let save_view = winsaveview() - if searchpair('\|/>\)\zs', 'cbW', '', line('.')) > 0 - return matchstr(getline('.')[col('.') - 1 : ], - \ 'href=["'.."'"..']\?\zs\S\{-}\ze["'.."'"..']\?/\?>') - endif - return '' - finally - call winrestview(save_view) - endtry - endfunction -< -Other than a file path, the text under the cursor may be a URL. Netrw uses -by default the following regular expression to determine if the text under the -cursor is a URL: -> - :let g:netrw_regex_url = '\%(\%(http\|ftp\|irc\)s\?\|file\)://\S\{-}' -< -Associated setting variables: - |g:netrw_gx| control how gx picks up the text under the cursor - |g:netrw_nogx| prevent gx map while editing - |g:netrw_suppress_gx_mesg| controls gx's suppression of browser messages - -OPENING FILES AND LAUNCHING APPS *netrw-gx* *:Open* *:Launch* {{{2 - -Netrw determines which special handler by the following method: - - * if |g:netrw_browsex_viewer| exists, then it will be used to attempt to - view files. - If the viewer you wish to use does not support handling of a remote URL - directory, set |g:netrw_browsex_support_remote| to 0. - * otherwise: - - * for Windows : explorer.exe is used - * for Mac OS X : open is used. - * for Linux : xdg-open is used. - -To open a path (or URL) by the appropriate handler, type > - - :Open -< -No escaping, neither for the shell nor for Vim's command-line, is needed. - -To launch a specific application , often being > - - :Launch . - -Since can be arbitrarily complex, in particular contain many file -paths, the escaping is left to the user. - -If you disabled the netrw plugin by setting g:loaded_netrwPlugin (see -|netrw-noload|), then you can use > - - :call netrw#Launch(' ') - :call netrw#Open('') -< *netrw-curdir* DELETING BOOKMARKS *netrw-mB* {{{2 @@ -2588,14 +2482,6 @@ your browsing preferences. (see also: |netrw-settings|) |netrw-C| |netrw-cr| |netrw-ctrl-r| - *g:netrw_browsex_viewer* specify user's preference for a viewer: > - "kfmclient exec" - "gnome-open" -< - *g:netrw_browsex_support_remote* - specify if the specified viewer supports a - remote URL. (see |netrw-handler|). - *g:netrw_chgperm* Unix/Linux: "chmod PERM FILENAME" Windows: "cacls FILENAME /e /p PERM" Used to change access permission for a file. @@ -2618,12 +2504,11 @@ your browsing preferences. (see also: |netrw-settings|) *g:Netrw_corehandler* Allows one to specify something additional to do when handling files via netrw's - browser's "x" command (see |netrw-x|). If - present, g:Netrw_corehandler specifies - either one or more function references - (see |Funcref|). (the capital g:Netrw... - is required its holding a function reference) - + browser's "x" command. If present, + g:Netrw_corehandler specifies either one or + more function references (see |Funcref|). + (the capital g:Netrw... is required its + holding a function reference) *g:netrw_ctags* ="ctags" The default external program used to create @@ -2772,11 +2657,6 @@ your browsing preferences. (see also: |netrw-settings|) These characters in directory names are escaped before applying glob() - *g:netrw_gx* ="" - This option controls how gx (|netrw-gx|) picks - up the text under the cursor. See |expand()| - for possibilities. - *g:netrw_hide* Controlled by the "a" map (see |netrw-a|) =0 : show all =1 : show not-hidden files @@ -3414,7 +3294,6 @@ Example: Clear netrw's marked file list via a mapping on gu > 10. Problems and Fixes *netrw-problems* {{{1 (This section is likely to grow as I get feedback) - (also see |netrw-debug|) *netrw-p1* P1. I use Windows, and my network browsing with ftp doesn't sort by {{{2 time or size! -or- The remote system is a Windows server; why @@ -3779,606 +3658,7 @@ Example: Clear netrw's marked file list via a mapping on gu > ============================================================================== -11. Debugging Netrw Itself *netrw-debug* {{{1 - -Step 1: check that the problem you've encountered hasn't already been resolved -by obtaining a copy of the latest (often developmental) netrw at: - - http://www.drchip.org/astronaut/vim/index.html#NETRW - -The script is typically installed on systems as something like: -> - /usr/local/share/vim/vim8x/plugin/netrwPlugin.vim - /usr/local/share/vim/vim8x/autoload/netrw.vim - (see output of :echo &rtp) -< -which is loaded automatically at startup (assuming :set nocp). If you -installed a new netrw, then it will be located at > - - $HOME/.vim/plugin/netrwPlugin.vim - $HOME/.vim/autoload/netrw.vim -< -Step 2: assuming that you've installed the latest version of netrw, -check that your problem is really due to netrw. Create a file -called netrw.vimrc with the following contents: > - - set nocp - so $HOME/.vim/plugin/netrwPlugin.vim -< -Then run netrw as follows: > - - vim -u netrw.vimrc --noplugins -i NONE [some path here] -< -Perform whatever netrw commands you need to, and check that the problem is -still present. This procedure sidesteps any issues due to personal .vimrc -settings, .viminfo file, and other plugins. If the problem does not appear, -then you need to determine which setting in your .vimrc is causing the -conflict with netrw or which plugin(s) is/are involved. - -Step 3: If the problem still is present, then get a debugging trace from -netrw: - - 1. Get the script, available as: - - http://www.drchip.org/astronaut/vim/index.html#DECHO - or - http://vim.sourceforge.net/scripts/script.php?script_id=120 - - Decho.vim is provided as a "vimball"; see |vimball-intro|. You - should edit the Decho.vba.gz file and source it in: > - - vim Decho.vba.gz - :so % - :q -< - 2. To turn on debug tracing in netrw, then edit the - file by typing: > - - vim netrw.vim - :DechoOn - :wq -< - To restore to normal non-debugging behavior, re-edit - and type > - - vim netrw.vim - :DechoOff - :wq -< - This command, provided by , will comment out all - Decho-debugging statements (Dfunc(), Dret(), Decho(), Dredir()). - - 3. Then bring up vim and attempt to evoke the problem by doing a - transfer or doing some browsing. A set of messages should appear - concerning the steps that took in attempting to - read/write your file over the network in a separate tab or - server vim window. - - Change the netrw.vimrc file to include the Decho plugin: > - - set nocp - so $HOME/.vim/plugin/Decho.vim - so $HOME/.vim/plugin/netrwPlugin.vim -< - You should continue to run vim with > - - vim -u netrw.vimrc --noplugins -i NONE [some path here] -< - to avoid entanglements with options and other plugins. - - To save the file: under linux, the output will be in a separate - remote server window; in it, just save the file with > - - :w! DBG - -< Under a vim that doesn't support clientserver, your debugging - output will appear in another tab: > - - :tabnext - :set bt= - :w! DBG -< - Furthermore, it'd be helpful if you would type > - - :Dsep - -< where is the command you're about to type next, - thereby making it easier to associate which part of the - debugging trace is due to which command. - - For bug reports, please see |bugs|. -============================================================================== -12. History *netrw-history* {{{1 - - v172: Sep 02, 2021 * (Bram Moolenaar) Changed "l:go" to "go" - * (Bram Moolenaar) no need for "b" in - netrw-safe guioptions - Nov 15, 2021 * removed netrw_localrm and netrw_localrmdir - references - Aug 18, 2022 * (Miguel Barro) improving compatibility with - powershell - v171: Oct 09, 2020 * included code in s:NetrwOptionsSafe() - to allow |'bh'| to be set to delete when - rather than hide when g:netrw_fastbrowse - was zero. - * Installed |g:netrw_clipboard| setting - * Installed option bypass for |'guioptions'| - a/A settings - * Changed popup_beval() to |popup_atcursor()| - in netrw#ErrorMsg (lacygoill). Apparently - popup_beval doesn't reliably close the - popup when the mouse is moved. - * VimEnter() now using win_execute to examine - buffers for an attempt to open a directory. - Avoids issues with popups/terminal from - command line. (lacygoill) - Jun 28, 2021 * (zeertzjq) provided a patch for use of - xmap,xno instead of vmap,vno in - netrwPlugin.vim. Avoids entanglement with - select mode. - Jul 14, 2021 * Fixed problem addressed by tst976; opening - a file using tree mode, going up a - directory, and opening a file there was - opening the file in the wrong directory. - Jul 28, 2021 * (Ingo Karkat) provided a patch fixing an - E488 error with netrwPlugin.vim - (occurred for vim versions < 8.02) - v170: Mar 11, 2020 * (reported by Reiner Herrmann) netrw+tree - would not hide with the ^\..* pattern - correctly. - * (Marcin Szamotulski) NetrwOptionRestore - did not restore options correctly that - had a single quote in the option string. - Apr 13, 2020 * implemented error handling via popup - windows (see |popup_beval()|) - Apr 30, 2020 * (reported by Manatsu Takahashi) while - using Lexplore, a modified file could - be overwritten. Sol'n: will not overwrite, - but will emit an |E37| (although one cannot - add an ! to override) - Jun 07, 2020 * (reported by Jo Totland) repeatedly invoking - :Lexplore and quitting it left unused - hidden buffers. Netrw will now set netrw - buffers created by :Lexplore to |'bh'|=wipe. - v169: Dec 20, 2019 * (reported by amkarthik) that netrw's x - (|netrw-x|) would throw an error when - attempting to open a local directory. - v168: Dec 12, 2019 * scp timeout error message not reported, - hopefully now fixed (Shane Xb Qian) - v167: Nov 29, 2019 * netrw does a save&restore on @* and @+. - That causes problems with the clipboard. - Now restores occurs only if @* or @+ have - been changed. - * netrw will change @* or @+ less often. - Never if I happen to have caught all the - operations that modify the unnamed - register (which also writes @*). - * Modified hiding behavior so that "s" - will not ignore hiding. - v166: Nov 06, 2019 * Removed a space from a nmap for "-" - * Numerous debugging statement changes - v163: Dec 05, 2017 * (Cristi Balan) reported that a setting ('sel') - was left changed - * (Holger Mitschke) reported a problem with - saving and restoring history. Fixed. - * Hopefully I fixed a nasty bug that caused a - file rename to wipe out a buffer that it - should not have wiped out. - * (Holger Mitschke) amended this help file - with additional |g:netrw_special_syntax| - items - * Prioritized wget over curl for - g:netrw_http_cmd - v162: Sep 19, 2016 * (haya14busa) pointed out two syntax errors - with a patch; these are now fixed. - Oct 26, 2016 * I started using mate-terminal and found that - x and gx (|netrw-x| and |netrw-gx|) were no - longer working. Fixed (using atril when - $DESKTOP_SESSION is "mate"). - Nov 04, 2016 * (Martin Vuille) pointed out that @+ was - being restored with keepregstar rather than - keepregplus. - Nov 09, 2016 * Broke apart the command from the options, - mostly for Windows. Introduced new netrw - settings: |g:netrw_localcopycmdopt| - |g:netrw_localcopydircmdopt| - |g:netrw_localmkdiropt| - |g:netrw_localmovecmdopt| - Nov 21, 2016 * (mattn) provided a patch for preview; swapped - winwidth() with winheight() - Nov 22, 2016 * (glacambre) reported that files containing - spaces weren't being obtained properly via - scp. Fix: apparently using single quotes - such as with 'file name' wasn't enough; the - spaces inside the quotes also had to be - escaped (ie. 'file\ name'). - * Also fixed obtain (|netrw-O|) to be able to - obtain files with spaces in their names - Dec 20, 2016 * (xc1427) Reported that using "I" (|netrw-I|) - when atop "Hiding" in the banner also caused - the active-banner hiding control to occur - Jan 03, 2017 * (Enno Nagel) reported that attempting to - apply netrw to a directory that was without - read permission caused a syntax error. - Jan 13, 2017 * (Ingo Karkat) provided a patch which makes - using netrw#Call() better. Now returns - value of internal routines return, for example. - Jan 13, 2017 * (Ingo Karkat) changed netrw#FileUrlRead to - use |:edit| instead of |:read|. I also - changed the routine name to netrw#FileUrlEdit. - Jan 16, 2017 * (Sayem) reported a problem where :Lexplore - could generate a new listing buffer and - window instead of toggling the netrw display. - Unfortunately, the directions for eliciting - the problem weren't complete, so I may or - may not have fixed that issue. - Feb 06, 2017 * Implemented cb and cB. Changed "c" to "cd". - (see |netrw-cb|, |netrw-cB|, and |netrw-cd|) - Mar 21, 2017 * previously, netrw would specify (safe) settings - even when the setting was already safe for - netrw. Netrw now attempts to leave such - already-netrw-safe settings alone. - (affects s:NetrwOptionRestore() and - s:NetrwSafeOptions(); also introduced - s:NetrwRestoreSetting()) - Jun 26, 2017 * (Christian Brabandt) provided a patch to - allow curl to follow redirects (ie. -L - option) - Jun 26, 2017 * (Callum Howard) reported a problem with - :Lexpore not removing the Lexplore window - after a change-directory - Aug 30, 2017 * (Ingo Karkat) one cannot switch to the - previously edited file (e.g. with CTRL-^) - after editing a file:// URL. Patch to - have a "keepalt" included. - Oct 17, 2017 * (Adam Faryna) reported that gn (|netrw-gn|) - did not work on directories in the current - tree - v157: Apr 20, 2016 * (Nicola) had set up a "nmap ..." with - a function that returned a 0 while silently - invoking a shell command. The shell command - activated a ShellCmdPost event which in turn - called s:LocalBrowseRefresh(). That looks - over all netrw buffers for changes needing - refreshes. However, inside a |:map-|, - tab and window changes are disallowed. Fixed. - (affects netrw's s:LocalBrowseRefresh()) - * g:netrw_localrmdir not used any more, but - the relevant patch that causes |delete()| to - take over was #1107 (not #1109). - * |expand()| is now used on |g:netrw_home|; - consequently, g:netrw_home may now use - environment variables - * s:NetrwLeftmouse and s:NetrwCLeftmouse will - return without doing anything if invoked - when inside a non-netrw window - Jun 15, 2016 * gx now calls netrw#GX() which returns - the word under the cursor. The new - wrinkle: if one is in a netrw buffer, - then netrw's s:NetrwGetWord(). - Jun 22, 2016 * Netrw was executing all its associated - Filetype commands silently; I'm going - to try doing that "noisily" and see if - folks have a problem with that. - Aug 12, 2016 * Changed order of tool selection for - handling http://... viewing. - (Nikolay Aleksandrovich Pavlov) - Aug 21, 2016 * Included hiding/showing/all for tree - listings - * Fixed refresh (^L) for tree listings - v156: Feb 18, 2016 * Changed =~ to =~# where appropriate - Feb 23, 2016 * s:ComposePath(base,subdir) now uses - fnameescape() on the base portion - Mar 01, 2016 * (gt_macki) reported where :Explore would - make file unlisted. Fixed (tst943) - Apr 04, 2016 * (reported by John Little) netrw normally - suppresses browser messages, but sometimes - those "messages" are what is wanted. - See |g:netrw_suppress_gx_mesg| - Apr 06, 2016 * (reported by Carlos Pita) deleting a remote - file was giving an error message. Fixed. - Apr 08, 2016 * (Charles Cooper) had a problem with an - undefined b:netrw_curdir. He also provided - a fix. - Apr 20, 2016 * Changed s:NetrwGetBuffer(); now uses - dictionaries. Also fixed the "No Name" - buffer problem. - v155: Oct 29, 2015 * (Timur Fayzrakhmanov) reported that netrw's - mapping of ctrl-l was not allowing refresh of - other windows when it was done in a netrw - window. - Nov 05, 2015 * Improved s:TreeSqueezeDir() to use search() - instead of a loop - * NetrwBrowse() will return line to - w:netrw_bannercnt if cursor ended up in - banner - Nov 16, 2015 * Added a NetrwTreeSqueeze (|netrw-s-cr|) - Nov 17, 2015 * Commented out imaps -- perhaps someone can - tell me how they're useful and should be - retained? - Nov 20, 2015 * Added |netrw-ma| and |netrw-mA| support - Nov 20, 2015 * gx (|netrw-gx|) on a URL downloaded the - file in addition to simply bringing up the - URL in a browser. Fixed. - Nov 23, 2015 * Added |g:netrw_sizestyle| support - Nov 27, 2015 * Inserted a lot of s into various netrw - maps. - Jan 05, 2016 * |netrw-qL| implemented to mark files based - upon |location-list|s; similar to |netrw-qF|. - Jan 19, 2016 * using - call delete(directoryname,"d") - - instead of using g:netrw_localrmdir if - v7.4 + patch#1107 is available - Jan 28, 2016 * changed to using |winsaveview()| and - |winrestview()| - Jan 28, 2016 * s:NetrwTreePath() now does a save and - restore of view - Feb 08, 2016 * Fixed a tree-listing problem with remote - directories - v154: Feb 26, 2015 * (Yuri Kanivetsky) reported a situation where - a file was not treated properly as a file - due to g:netrw_keepdir == 1 - Mar 25, 2015 * (requested by Ben Friz) one may now sort by - extension - Mar 28, 2015 * (requested by Matt Brooks) netrw has a lot - of buffer-local mappings; however, some - plugins (such as vim-surround) set up - conflicting mappings that cause vim to wait. - The "" modifier has been included - with most of netrw's mappings to avoid that - delay. - Jun 26, 2015 * |netrw-gn| mapping implemented - * :Ntree NotADir resulted in having - the tree listing expand in the error messages - window. Fixed. - Jun 29, 2015 * Attempting to delete a file remotely caused - an error with "keepsol" mentioned; fixed. - Jul 08, 2015 * Several changes to keep the |:jumps| table - correct when working with - |g:netrw_fastbrowse| set to 2 - * wide listing with accented characters fixed - (using %-S instead of %-s with a |printf()| - Jul 13, 2015 * (Daniel Hahler) CheckIfKde() could be true - but kfmclient not installed. Changed order - in netrw#BrowseX(): checks if kde and - kfmclient, then will use xdg-open on a unix - system (if xdg-open is executable) - Aug 11, 2015 * (McDonnell) tree listing mode wouldn't - select a file in a open subdirectory. - * (McDonnell) when multiple subdirectories - were concurrently open in tree listing - mode, a ctrl-L wouldn't refresh properly. - * The netrw:target menu showed duplicate - entries - Oct 13, 2015 * (mattn) provided an exception to handle - windows with shellslash set but no shell - Oct 23, 2015 * if g:netrw_usetab and now used - to control whether NetrwShrink is used - (see |netrw-c-tab|) - v153: May 13, 2014 * added another |g:netrw_ffkeep| usage {{{2 - May 14, 2014 * changed s:PerformListing() so that it - always sets ft=netrw for netrw buffers - (ie. even when syntax highlighting is - off, not available, etc) - May 16, 2014 * introduced the |netrw-ctrl-r| functionality - May 17, 2014 * introduced the |netrw-:NetrwMB| functionality - * mb and mB (|netrw-mb|, |netrw-mB|) will - add/remove marked files from bookmark list - May 20, 2014 * (Enno Nagel) reported that :Lex - wasn't working. Fixed. - May 26, 2014 * restored test to prevent leftmouse window - resizing from causing refresh. - (see s:NetrwLeftmouse()) - * fixed problem where a refresh caused cursor - to go just under the banner instead of - staying put - May 28, 2014 * (László Bimba) provided a patch for opening - the |:Lexplore| window 100% high, optionally - on the right, and will work with remote - files. - May 29, 2014 * implemented :NetrwC (see |netrw-:NetrwC|) - Jun 01, 2014 * Removed some "silent"s from commands used - to implemented scp://... and pscp://... - directory listing. Permits request for - password to appear. - Jun 05, 2014 * (Enno Nagel) reported that user maps "/" - caused problems with "b" and "w", which - are mapped (for wide listings only) to - skip over files rather than just words. - Jun 10, 2014 * |g:netrw_gx| introduced to allow users to - override default "" with the gx - (|netrw-gx|) map - Jun 11, 2014 * gx (|netrw-gx|), with |'autowrite'| set, - will write modified files. s:NetrwBrowseX() - will now save, turn off, and restore the - |'autowrite'| setting. - Jun 13, 2014 * added visual map for gx use - Jun 15, 2014 * (Enno Nagel) reported that with having hls - set and wide listing style in use, that the - b and w maps caused unwanted highlighting. - Jul 05, 2014 * |netrw-mv| and |netrw-mX| commands included - Jul 09, 2014 * |g:netrw_keepj| included, allowing optional - keepj - Jul 09, 2014 * fixing bugs due to previous update - Jul 21, 2014 * (Bruno Sutic) provided an updated - netrw_gitignore.vim - Jul 30, 2014 * (Yavuz Yetim) reported that editing two - remote files of the same name caused the - second instance to have a "temporary" - name. Fixed: now they use the same buffer. - Sep 18, 2014 * (Yasuhiro Matsumoto) provided a patch which - allows scp and windows local paths to work. - Oct 07, 2014 * gx (see |netrw-gx|) when atop a directory, - will now do |gf| instead - Nov 06, 2014 * For cygwin: cygstart will be available for - netrw#BrowseX() to use if its executable. - Nov 07, 2014 * Began support for file://... urls. Will use - |g:netrw_file_cmd| (typically elinks or links) - Dec 02, 2014 * began work on having mc (|netrw-mc|) copy - directories. Works for linux machines, - cygwin+vim, but not for windows+gvim. - Dec 02, 2014 * in tree mode, netrw was not opening - directories via symbolic links. - Dec 02, 2014 * added resolved link information to - thin and tree modes - Dec 30, 2014 * (issue#231) |:ls| was not showing - remote-file buffers reliably. Fixed. - v152: Apr 08, 2014 * uses the |'noswapfile'| option (requires {{{2 - vim 7.4 with patch 213) - * (Enno Nagel) turn |'rnu'| off in netrw - buffers. - * (Quinn Strahl) suggested that netrw - allow regular window splitting to occur, - thereby allowing |'equalalways'| to take - effect. - * (qingtian zhao) normally, netrw will - save and restore the |'fileformat'|; - however, sometimes that isn't wanted - Apr 14, 2014 * whenever netrw marks a buffer as ro, - it will also mark it as nomod. - Apr 16, 2014 * sftp protocol now supported by - netrw#Obtain(); this means that one - may use "mc" to copy a remote file - to a local file using sftp, and that - the |netrw-O| command can obtain remote - files via sftp. - * added [count]C support (see |netrw-C|) - Apr 18, 2014 * when |g:netrw_chgwin| is one more than - the last window, then vertically split - the last window and use it as the - chgwin window. - May 09, 2014 * SavePosn was "saving filename under cursor" - from a non-netrw window when using :Rex. - v151: Jan 22, 2014 * extended :Rexplore to return to buffer {{{2 - prior to Explore or editing a directory - * (Ken Takata) netrw gave error when - clipboard was disabled. Sol'n: Placed - several if has("clipboard") tests in. - * Fixed ftp://X@Y@Z// problem; X@Y now - part of user id, and only Z is part of - hostname. - * (A Loumiotis) reported that completion - using a directory name containing spaces - did not work. Fixed with a retry in - netrw#Explore() which removes the - backslashes vim inserted. - Feb 26, 2014 * :Rexplore now records the current file - using w:netrw_rexfile when returning via - |:Rexplore| - Mar 08, 2014 * (David Kotchan) provided some patches - allowing netrw to work properly with - windows shares. - * Multiple one-liner help messages available - by pressing while atop the "Quick - Help" line - * worked on ShellCmdPost, FocusGained event - handling. - * |:Lexplore| path: will be used to update - a left-side netrw browsing directory. - Mar 12, 2014 * |netrw-s-cr|: use to close - tree directory implemented - Mar 13, 2014 * (Tony Mechylynck) reported that using - the browser with ftp on a directory, - and selecting a gzipped txt file, that - an E19 occurred (which was issued by - gzip.vim). Fixed. - Mar 14, 2014 * Implemented :MF and :MT (see |netrw-:MF| - and |netrw-:MT|, respectively) - Mar 17, 2014 * |:Ntree| [dir] wasn't working properly; fixed - Mar 18, 2014 * Changed all uses of set to setl - Mar 18, 2014 * Commented the netrw_btkeep line in - s:NetrwOptionSave(); the effect is that - netrw buffers will remain as |'bt'|=nofile. - This should prevent swapfiles being created - for netrw buffers. - Mar 20, 2014 * Changed all uses of lcd to use s:NetrwLcd() - instead. Consistent error handling results - and it also handles Window's shares - * Fixed |netrw-d| command when applied with ftp - * https: support included for netrw#NetRead() - v150: Jul 12, 2013 * removed a "keepalt" to allow ":e #" to {{{2 - return to the netrw directory listing - Jul 13, 2013 * (Jonas Diemer) suggested changing - a to . - Jul 21, 2013 * (Yuri Kanivetsky) reported that netrw's - use of mkdir did not produce directories - following the user's umask. - Aug 27, 2013 * introduced |g:netrw_altfile| option - Sep 05, 2013 * s:Strlen() now uses |strdisplaywidth()| - when available, by default - Sep 12, 2013 * (Selyano Baldo) reported that netrw wasn't - opening some directories properly from the - command line. - Nov 09, 2013 * |:Lexplore| introduced - * (Ondrej Platek) reported an issue with - netrw's trees (P15). Fixed. - * (Jorge Solis) reported that "t" in - tree mode caused netrw to forget its - line position. - Dec 05, 2013 * Added file marking - (see |netrw-mf|) - Dec 05, 2013 * (Yasuhiro Matsumoto) Explore should use - strlen() instead s:Strlen() when handling - multibyte chars with strpart() - (ie. strpart() is byte oriented, not - display-width oriented). - Dec 09, 2013 * (Ken Takata) Provided a patch; File sizes - and a portion of timestamps were wrongly - highlighted with the directory color when - setting `:let g:netrw_liststyle=1` on Windows. - * (Paul Domaskis) noted that sometimes - cursorline was activating in non-netrw - windows. All but one setting of cursorline - was done via setl; there was one that was - overlooked. Fixed. - Dec 24, 2013 * (esquifit) asked that netrw allow the - /cygdrive prefix be a user-alterable - parameter. - Jan 02, 2014 * Fixed a problem with netrw-based ballon - evaluation (ie. netrw#NetrwBaloonHelp() - not having been loaded error messages) - Jan 03, 2014 * Fixed a problem with tree listings - * New command installed: |:Ntree| - Jan 06, 2014 * (Ivan Brennan) reported a problem with - |netrw-P|. Fixed. - Jan 06, 2014 * Fixed a problem with |netrw-P| when the - modified file was to be abandoned. - Jan 15, 2014 * (Matteo Cavalleri) reported that when the - banner is suppressed and tree listing is - used, a blank line was left at the top of - the display. Fixed. - Jan 20, 2014 * (Gideon Go) reported that, in tree listing - style, with a previous window open, that - the wrong directory was being used to open - a file. Fixed. (P21) - v149: Apr 18, 2013 * in wide listing format, now have maps for {{{2 - w and b to move to next/previous file - Apr 26, 2013 * one may now copy files in the same - directory; netrw will issue requests for - what names the files should be copied under - Apr 29, 2013 * Trying Benzinger's problem again. Seems - that commenting out the BufEnter and - installing VimEnter (only) works. Weird - problem! (tree listing, vim -O Dir1 Dir2) - May 01, 2013 * :Explore ftp://... wasn't working. Fixed. - May 02, 2013 * introduced |g:netrw_bannerbackslash| as - requested by Paul Domaskis. - Jul 03, 2013 * Explore now avoids splitting when a buffer - will be hidden. - v148: Apr 16, 2013 * changed Netrw's Style menu to allow direct {{{2 - choice of listing style, hiding style, and - sorting style - -============================================================================== -13. Todo *netrw-todo* {{{1 - -07/29/09 : banner :|g:netrw_banner| can be used to suppress the - suppression banner. This feature is new and experimental, - so its in the process of being debugged. -09/04/09 : "gp" : See if it can be made to work for remote systems. - : See if it can be made to work with marked files. - -============================================================================== -14. Credits *netrw-credits* {{{1 +11. Credits *netrw-credits* {{{1 Vim editor by Bram Moolenaar (Thanks, Bram!) dav support by C Campbell