diff options
-rw-r--r-- | runtime/autoload/netrw.vim | 17 | ||||
-rw-r--r-- | runtime/doc/pi_netrw.txt | 5 |
2 files changed, 3 insertions, 19 deletions
diff --git a/runtime/autoload/netrw.vim b/runtime/autoload/netrw.vim index 1fe4ec5a89..7a799abb13 100644 --- a/runtime/autoload/netrw.vim +++ b/runtime/autoload/netrw.vim @@ -5781,22 +5781,7 @@ fun! s:NetrwHome() if exists("g:netrw_home") let home= expand(g:netrw_home) else - " go to vim plugin home - for home in split(&rtp,',') + [''] - if isdirectory(s:NetrwFile(home)) && filewritable(s:NetrwFile(home)) | break | endif - let basehome= substitute(home,'[/\\]\.vim$','','') - if isdirectory(s:NetrwFile(basehome)) && filewritable(s:NetrwFile(basehome)) - let home= basehome."/.vim" - break - endif - endfor - if home == "" - " just pick the first directory - let home= substitute(&rtp,',.*$','','') - endif - if (has("win32") || has("win95") || has("win64") || has("win16")) - let home= substitute(home,'/','\\','g') - endif + let home = stdpath('data') endif " insure that the home directory exists if g:netrw_dirhistmax > 0 && !isdirectory(s:NetrwFile(home)) diff --git a/runtime/doc/pi_netrw.txt b/runtime/doc/pi_netrw.txt index d5dfd37fab..7312ab721b 100644 --- a/runtime/doc/pi_netrw.txt +++ b/runtime/doc/pi_netrw.txt @@ -2744,9 +2744,8 @@ your browsing preferences. (see also: |netrw-settings|) *g:netrw_home* The home directory for where bookmarks and history are saved (as .netrwbook and .netrwhist). - Netrw uses |expand()|on the string. - default: the first directory on the - |'runtimepath'| + Netrw uses |expand()| on the string. + default: stdpath('data') (see |stdpath()|) *g:netrw_keepdir* =1 (default) keep current directory immune from the browsing directory. |