improve structure
This commit is contained in:
+5
-13
@@ -1,11 +1,11 @@
|
||||
REM This script is for configurating vim on windows 10 machine
|
||||
REM
|
||||
:: This script is for configurating vim on windows 10 machine
|
||||
|
||||
@if not exist "%HOME%" @set HOME=%HOMEDRIVE%%HOMEPATH%
|
||||
@if not exist "%HOME%" @set HOME=%USERPROFILE%
|
||||
|
||||
@set NVIM_CONFIG_PATH=%HOME%\appdata\local\nvim\init.vim
|
||||
@set APP_PATH=%HOME%\.dotfiles
|
||||
|
||||
IF NOT EXIST "%APP_PATH%" (
|
||||
call git clone "https://github.com/Donaldttt/dotfiles" "%APP_PATH%"
|
||||
) ELSE (
|
||||
@@ -17,23 +17,15 @@ IF NOT EXIST "%APP_PATH%" (
|
||||
call cd "%APP_PATH%"
|
||||
)
|
||||
|
||||
:: Install vim-plug
|
||||
curl -fLo %HOME%/vimfiles/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
||||
|
||||
call mklink "%HOME%\.vimrc" "%APP_PATH%\.vimrc"
|
||||
call mklink "%HOME%\.vimrc.bundles" "%APP_PATH%\.vimrc.bundles"
|
||||
|
||||
IF NOT EXIST "%APP_PATH%\.vim" (
|
||||
call mkdir "%APP_PATH%\.vim"
|
||||
)
|
||||
IF NOT EXIST "%APP_PATH%\.vim\bundle" (
|
||||
call mkdir "%APP_PATH%\.vim\bundle"
|
||||
)
|
||||
|
||||
IF NOT EXIST "%HOME%/.vim/bundle/vundle" (
|
||||
call git clone https://github.com/gmarik/vundle.git "%HOME%/.vim/bundle/vundle"
|
||||
) ELSE (
|
||||
call cd "%HOME%/.vim/bundle/vundle"
|
||||
call git pull
|
||||
call cd %HOME%
|
||||
)
|
||||
|
||||
if exist "%NVIM_CONFIG_PATH%" (
|
||||
move "%NVIM_CONFIG_PATH%" "%NVIM_CONFIG_PATH%.backup""
|
||||
|
||||
Reference in New Issue
Block a user