Thanks to visit codestin.com
Credit goes to github.com

Skip to content

xdg.vim: 'undodir' and 'viewdir' options should be set to $XDG_STATE_HOME/vim #19457

@bam80

Description

@bam80

The options should still be commented, though.

This is wrong. The standard explicitly tell us "undo" and "view" should go to the STATE:

The $XDG_STATE_HOME contains state data that should persist between (application) restarts, but that is not important or portable enough to the user that it should be stored in $XDG_DATA_HOME. It may contain:

  • actions history (logs, history, recently used files, …)

  • current state of the application that can be reused on a restart (view, layout, open files, undo history, …)

Originally posted by @bam80 in 4f04efb

vim/runtime/xdg.vim

Lines 33 to 36 in 68dbb58

" Persistent Data:
" let &undodir = s:mkvimdir(s:data .. '/vim/undo') .. '//'
" let &viewdir = s:mkvimdir(s:data .. '/vim/view') .. '//'
" let g:netrw_home = s:mkvimdir(s:data .. '/vim')

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions