mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
netrw: move netrw_home to XDA_DATA_HOME (#13939)
This commit is contained in:
parent
03383ee27b
commit
4bc74c2431
@ -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))
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user