option,main: Partial support of XDG base directory specification

- Add functions that are able to query XDG.
- Replace defaults for
  - &runtimepath. Does not follow #78.
  - &viewdir.
  - &undodir.
  - &directory.
  - &backupdir. Does not follow #78.
  - vimrc location.
- Remove user vimrc file line from :version message.
This commit is contained in:
Keerthan Jaic
2015-08-04 21:41:38 -04:00
committed by ZyX
parent e38cbb9367
commit c2dd07448f
8 changed files with 125 additions and 69 deletions

View File

@@ -31,12 +31,6 @@
#ifndef USR_EXRC_FILE
# define USR_EXRC_FILE "~/.exrc"
#endif
#ifndef USR_VIMRC_FILE
# define USR_VIMRC_FILE "~/.nvimrc"
#endif
#ifndef USR_VIMRC_FILE2
# define USR_VIMRC_FILE2 "~/.nvim/nvimrc"
#endif
#ifndef EXRC_FILE
# define EXRC_FILE ".exrc"
#endif
@@ -47,27 +41,4 @@
# define SHADA_FILE "~/.nvim/shada/main.shada"
#endif
// Default for 'backupdir'.
#ifndef DFLT_BDIR
# define DFLT_BDIR ".,~/tmp,~/"
#endif
// Default for 'directory'.
#ifndef DFLT_DIR
# define DFLT_DIR ".,~/tmp,/var/tmp,/tmp"
#endif
// Default for 'viewdir'.
#ifndef DFLT_VDIR
# define DFLT_VDIR "~/.nvim/view"
#endif
#ifdef RUNTIME_GLOBAL
# define DFLT_RUNTIMEPATH "~/.nvim," RUNTIME_GLOBAL ",$VIMRUNTIME," \
RUNTIME_GLOBAL "/after,~/.nvim/after"
#else
# define DFLT_RUNTIMEPATH \
"~/.nvim,$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after,~/.nvim/after"
#endif
#endif // NVIM_OS_UNIX_DEFS_H