vim: Add a function for sourcing config files
This commit is contained in:
parent
238f7bed4f
commit
594e5acce6
|
@ -1,3 +1,14 @@
|
||||||
|
let mapleader = " "
|
||||||
|
|
||||||
|
function! s:SourceConfigFilesIn(directory)
|
||||||
|
let directory_splat = '~/.config/nvim/' . a:directory . '/*'
|
||||||
|
for config_file in split(glob(directory_splat), '\n')
|
||||||
|
if filereadable(config_file)
|
||||||
|
execute 'source' config_file
|
||||||
|
endif
|
||||||
|
endfor
|
||||||
|
endfunction
|
||||||
|
|
||||||
call plug#begin('~/.config/nvim/plugged')
|
call plug#begin('~/.config/nvim/plugged')
|
||||||
Plug 'arcticicestudio/nord-vim'
|
Plug 'arcticicestudio/nord-vim'
|
||||||
Plug 'christoomey/vim-sort-motion'
|
Plug 'christoomey/vim-sort-motion'
|
||||||
|
@ -38,7 +49,6 @@ set termguicolors
|
||||||
colorscheme nord
|
colorscheme nord
|
||||||
|
|
||||||
" Remaps
|
" Remaps
|
||||||
let mapleader = " "
|
|
||||||
nnoremap <leader>pv :Vex<CR>
|
nnoremap <leader>pv :Vex<CR>
|
||||||
nnoremap <Leader>so :so ~/.config/nvim/init.vim<CR>
|
nnoremap <Leader>so :so ~/.config/nvim/init.vim<CR>
|
||||||
nnoremap <C-p> :Files<CR>
|
nnoremap <C-p> :Files<CR>
|
||||||
|
|
Loading…
Reference in a new issue