refactor: Simplify vimrc

This commit is contained in:
ziro 2023-08-28 16:51:58 +07:00
parent cda9433be6
commit 117dd11f8f
Signed by: null2264
GPG key ID: BA64F8B60AF3EFB6

View file

@ -26,24 +26,18 @@
" Automatically source config for the correct OS " Automatically source config for the correct OS
" NOTE: By default the directory of Windows config will be located on " NOTE: By default the directory of Windows config will be located on
" "C:\_config\vim" " "C:\_config\vim"
if has('win64') || has('win32') || has('win16') if has('win64') || has('win32') || has('win16')
" Windows let $ZVIM_CONFIG_DIR = "C:/_config/vim"
so C:\_config\vim\vim_win let $ZVIM_OS_TYPE = "win"
" Universal
so C:\_config\vim\vim_uni
" ----- PlugIns
if !exists('g:vscode')
source C:\_config\vim\vim_plug
endif
else else
" *nix (Linux/Mac) let $ZVIM_CONFIG_DIR = "~/.config/vim"
so ~/.config/vim/vim_nix let $ZVIM_OS_TYPE = "nix"
" Universal endif
so ~/.config/vim/vim_uni
so $ZVIM_CONFIG_DIR/vim_$ZVIM_OS_TYPE
" ----- PlugIns so $ZVIM_CONFIG_DIR/vim_uni
if !exists('g:vscode')
source ~/.config/vim/vim_plug if !exists('g:vscode')
endif source $ZVIM_CONFIG_DIR/vim_plug
endif endif