mirror of
https://github.com/Lissy93/dotfiles.git
synced 2025-01-10 06:08:14 +01:00
✏ Working on Vim config
This commit is contained in:
parent
993cf244d6
commit
33d740bc06
3
vim/init.vim
Normal file
3
vim/init.vim
Normal file
@ -0,0 +1,3 @@
|
||||
echom "Init"
|
||||
|
||||
source ~/.config/vim/setup-vim-plug.vim
|
21
vim/setup-vim-plug.vim
Normal file
21
vim/setup-vim-plug.vim
Normal file
@ -0,0 +1,21 @@
|
||||
|
||||
" Get version of Vim running
|
||||
if has('nvim') | let vim_type='nvim' | else | let vim_type='vim' | endif
|
||||
|
||||
let vim_rc=$XDG_CONFIG_HOME.'/vim/vimrc'
|
||||
|
||||
" Location of vim plug script
|
||||
let vim_plug_location=$XDG_DATA_HOME."/".vim_type."/autoload/plug.vim"
|
||||
|
||||
" If vim-plug not present, install it now
|
||||
if !filereadable(expand(vim_plug_location))
|
||||
echom "Vim Plug not found, downloading to '" . vim_plug_location . "'"
|
||||
execute '!curl -o ' . vim_plug_location . ' --create-dirs' .
|
||||
\ ' https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
|
||||
endif
|
||||
|
||||
" Run PlugInstall if there are missing plugins
|
||||
autocmd VimEnter * if len(filter(values(g:plugs), '!isdirectory(v:val.dir)'))
|
||||
\| PlugInstall --sync | exec 'source ' . vim_rc
|
||||
\| endif
|
||||
|
Loading…
Reference in New Issue
Block a user