Hi,
I was finishing the XDG support for vim but I notices that I had to do a lot of checks to see what was the user directory. Having a mechanism to get the user directory regardless of the OS would be a really nice thing.
I think we could implement neovim's stdpath or $MYVIMDIR as suggested by @ghgary here 1
stdpath({what}) *stdpath()* *E6100*
Returns |standard-path| locations of various default files and
directories.
{what} Type Description ~
cache String Cache directory: arbitrary temporary
storage for plugins, etc.
config String User configuration directory. |init.vim|
is stored here.
config_dirs List Other configuration directories.
data String User data directory.
data_dirs List Other data directories.
log String Logs directory (for use by plugins too).
run String Run directory: temporary, local storage
for sockets, named pipes, etc.
state String Session state directory: storage for file
drafts, swap, undo, |shada|.
Example: >vim
echo stdpath("config")
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
Closed #15518 as resolved.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()