aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Łuczyński <doubleloop@users.noreply.github.com>2021-02-17 03:21:43 +0100
committerGitHub <noreply@github.com>2021-02-16 21:21:43 -0500
commit4bc74c24318a544f30a9d2431dbd969f9d5cd0f5 (patch)
tree2b320c4a9cf5197eb55db9eb0108526bfd4e3219
parent03383ee27b04c82265de45a90f9dbccfc502dbc9 (diff)
downloadrneovim-4bc74c24318a544f30a9d2431dbd969f9d5cd0f5.tar.gz
rneovim-4bc74c24318a544f30a9d2431dbd969f9d5cd0f5.tar.bz2
rneovim-4bc74c24318a544f30a9d2431dbd969f9d5cd0f5.zip
netrw: move netrw_home to XDA_DATA_HOME (#13939)
-rw-r--r--runtime/autoload/netrw.vim17
-rw-r--r--runtime/doc/pi_netrw.txt5
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.