1
0
mirror of https://github.com/jdhao/nvim-config.git synced 2025-06-08 14:14:33 +02:00

Fix a bug in sourcing vim files.

vim files such as 'variables.vim' under the same folder as init.vim can not be correctly sourced with `source somefile.vim`. Because source command is relative to the correct folder, you must specify the absolute path of vim script.
This commit is contained in:
jdhao 2019-09-27 21:49:23 +08:00 committed by GitHub
parent 460ec98052
commit 260c2b9772
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -50,12 +50,13 @@
"}
"{ Main configurations
source variables.vim
source options.vim
source autocommands.vim
source mappings.vim
source plugins.vim
source ui.vim
let g:nvim_config_root = stdpath('config')
execute 'source' g:nvim_config_root . "/variables.vim"
execute 'source' g:nvim_config_root . "/options.vim"
execute 'source' g:nvim_config_root . "/autocommands.vim"
execute 'source' g:nvim_config_root . "/mappings.vim"
execute 'source' g:nvim_config_root . "/plugins.vim"
execute 'source' g:nvim_config_root . "/ui.vim"
"}
"{ A list of resources which inspire me