Add vimrc and ~/.config/vim dir for non nvim support
This commit is contained in:
parent
782d0dbe26
commit
ce04912dc5
|
@ -0,0 +1,11 @@
|
||||||
|
if has('nvim')
|
||||||
|
" Neovim-specific settings
|
||||||
|
set runtimepath+=~/.config/nvim
|
||||||
|
lua require('_init')
|
||||||
|
else
|
||||||
|
" Vim-specific settings
|
||||||
|
set runtimepath+=~/.config/vim
|
||||||
|
source ~/.config/vim/_init
|
||||||
|
endif
|
||||||
|
|
||||||
|
" vim: set ft=vim sw=4 sts=4 et:
|
|
@ -0,0 +1 @@
|
||||||
|
../../_src.posix/vim
|
|
@ -1,3 +1,5 @@
|
||||||
/**/.git
|
/**/.git
|
||||||
/**/.git/**
|
/**/.git/**
|
||||||
|
|
||||||
|
.config/vim/autoload
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
if has('nvim')
|
||||||
|
" Neovim-specific settings
|
||||||
|
set runtimepath+=~/.config/nvim
|
||||||
|
lua require('_init')
|
||||||
|
else
|
||||||
|
" Vim-specific settings
|
||||||
|
set runtimepath+=~/.config/vim
|
||||||
|
source ~/.config/vim/_init
|
||||||
|
endif
|
||||||
|
|
||||||
|
" vim: set ft=vim sw=4 sts=4 et:
|
|
@ -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:
|
Loading…
Reference in New Issue