diff --git a/_home.macos/private_dot_config/vim b/_home.macos/private_dot_config/vim deleted file mode 120000 index b02d60b..0000000 --- a/_home.macos/private_dot_config/vim +++ /dev/null @@ -1 +0,0 @@ -../../_src.posix/vim \ No newline at end of file diff --git a/_src.all/private_dot_config/vim/_init b/_src.all/private_dot_config/vim/_init new file mode 100644 index 0000000..f19db37 --- /dev/null +++ b/_src.all/private_dot_config/vim/_init @@ -0,0 +1,30 @@ +" Set custom Vim config directory +let s:vim_config_dir = '~/.config/vim' +let s:autoload_dir = s:vim_config_dir . '/autoload' +let s:plug_vim = s:autoload_dir . '/plug.vim' + +" Install vim-plug if not found +if empty(glob(s:plug_vim)) + silent execute '!curl -fLo ' . s:plug_vim . ' --create-dirs ' . + \ 'https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' +endif + +" Ensure Vim uses the custom runtime path +set runtimepath+=~/.config/vim +execute 'source ' . s:plug_vim + + +" Initialize vim-plug +call plug#begin('~/.config/vim/plugged') + +" Define plugins here +"Plug 'junegunn/vim-plug' " Example, replace with actual plugins + +call plug#end() + +" Run PlugInstall if there are missing plugins +autocmd VimEnter * if len(filter(values(g:plugs), '!isdirectory(v:val.dir)')) + \| PlugInstall --sync | source $MYVIMRC +\| endif + +" vim: set ft=vim sw=4 sts=4 et: diff --git a/_src.posix/private_dot_config/vim/_init b/_src.posix/private_dot_config/vim/_init deleted file mode 100644 index f19db37..0000000 --- a/_src.posix/private_dot_config/vim/_init +++ /dev/null @@ -1,30 +0,0 @@ -" Set custom Vim config directory -let s:vim_config_dir = '~/.config/vim' -let s:autoload_dir = s:vim_config_dir . '/autoload' -let s:plug_vim = s:autoload_dir . '/plug.vim' - -" Install vim-plug if not found -if empty(glob(s:plug_vim)) - silent execute '!curl -fLo ' . s:plug_vim . ' --create-dirs ' . - \ 'https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' -endif - -" Ensure Vim uses the custom runtime path -set runtimepath+=~/.config/vim -execute 'source ' . s:plug_vim - - -" Initialize vim-plug -call plug#begin('~/.config/vim/plugged') - -" Define plugins here -"Plug 'junegunn/vim-plug' " Example, replace with actual plugins - -call plug#end() - -" Run PlugInstall if there are missing plugins -autocmd VimEnter * if len(filter(values(g:plugs), '!isdirectory(v:val.dir)')) - \| PlugInstall --sync | source $MYVIMRC -\| endif - -" vim: set ft=vim sw=4 sts=4 et: diff --git a/_src.posix/private_dot_config/vim/_init b/_src.posix/private_dot_config/vim/_init new file mode 120000 index 0000000..0309e32 --- /dev/null +++ b/_src.posix/private_dot_config/vim/_init @@ -0,0 +1 @@ +../../../_src.all/private_dot_config/vim/_init \ No newline at end of file