~gpanders/dotfiles

be3e0b135f496f0287ee5ad95f78c9a7db9df2dd — Greg Anders a month ago 69738d0
Use stdpath function if it exists
1 files changed, 8 insertions(+), 0 deletions(-)

M .vim/autoload/vim.vim
M .vim/autoload/vim.vim => .vim/autoload/vim.vim +8 -0
@@ 2,6 2,10 @@ let s:cachedir = ''
let s:datadir = ''

function! vim#cachedir()
    if exists('*stdpath')
        return stdpath('cache')
    endif

    if empty(s:cachedir)
        let n = has('nvim') ? 'n' : ''
        if exists('$XDG_CACHE_HOME')


@@ 16,6 20,10 @@ function! vim#cachedir()
endfunction

function! vim#datadir()
    if exists('*stdpath')
        return stdpath('data')
    endif

    if empty(s:datadir)
        let n = has('nvim') ? 'n' : ''
        if exists('$XDG_DATA_HOME')