+ Improved VIM -> Experimental auto refresh vimrc for windows
This commit is contained in:
parent
9d65e64c3b
commit
6746bd9869
4 changed files with 17 additions and 14 deletions
|
@ -32,16 +32,6 @@ endif
|
||||||
autocmd FileType plaintex command! -nargs=0 Lw w !pdflatex % > /dev/null
|
autocmd FileType plaintex command! -nargs=0 Lw w !pdflatex % > /dev/null
|
||||||
autocmd FileType tex command! -nargs=0 Lw w !pdflatex % > /dev/null
|
autocmd FileType tex command! -nargs=0 Lw w !pdflatex % > /dev/null
|
||||||
|
|
||||||
" ----- Auto refresh vimrc
|
|
||||||
augroup myvimrc
|
|
||||||
au!
|
|
||||||
au BufWritePost vimrc so $MYVIMRC | if has('gui_running') | so $MYGVIMRC | endif
|
|
||||||
au BufWritePost vim_nix so $MYVIMRC | if has('gui_running') | so $MYGVIMRC | endif
|
|
||||||
au BufWritePost vim_plug so $MYVIMRC | if has('gui_running') | so $MYGVIMRC | endif
|
|
||||||
au BufWritePost vim_uni so $MYVIMRC | if has('gui_running') | so $MYGVIMRC | endif
|
|
||||||
au BufWritePost vim_win so $MYVIMRC | if has('gui_running') | so $MYGVIMRC | endif
|
|
||||||
augroup END
|
|
||||||
|
|
||||||
" ----- Install plug (Plugin Manager)
|
" ----- Install plug (Plugin Manager)
|
||||||
if empty(glob('~/.config/vim/autoload/plug.vim'))
|
if empty(glob('~/.config/vim/autoload/plug.vim'))
|
||||||
silent !curl -fLo ~/.config/vim/autoload/plug.vim --create-dirs
|
silent !curl -fLo ~/.config/vim/autoload/plug.vim --create-dirs
|
||||||
|
|
|
@ -46,3 +46,13 @@ augroup Binary
|
||||||
au BufWritePost *.bin if &bin | %!xxd
|
au BufWritePost *.bin if &bin | %!xxd
|
||||||
au BufWritePost *.bin set nomod | endif
|
au BufWritePost *.bin set nomod | endif
|
||||||
augroup END
|
augroup END
|
||||||
|
|
||||||
|
" ----- Auto refresh vimrc
|
||||||
|
augroup myvimrc
|
||||||
|
au!
|
||||||
|
au BufWritePost vimrc so $MYVIMRC | if has('gui_running') | so $MYGVIMRC | endif
|
||||||
|
au BufWritePost vim_nix so $MYVIMRC | if has('gui_running') | so $MYGVIMRC | endif
|
||||||
|
au BufWritePost vim_plug so $MYVIMRC | if has('gui_running') | so $MYGVIMRC | endif
|
||||||
|
au BufWritePost vim_uni so $MYVIMRC | if has('gui_running') | so $MYGVIMRC | endif
|
||||||
|
au BufWritePost vim_win so $MYVIMRC | if has('gui_running') | so $MYGVIMRC | endif
|
||||||
|
augroup END
|
||||||
|
|
|
@ -3,6 +3,9 @@
|
||||||
" Windows Specific Configuration
|
" Windows Specific Configuration
|
||||||
" ==============================
|
" ==============================
|
||||||
|
|
||||||
|
" ----- Cleaning up
|
||||||
|
let $MYVIMRC="C:\_config\vim\vimrc"
|
||||||
|
|
||||||
" ----- Install plug (Plugin Manager)
|
" ----- Install plug (Plugin Manager)
|
||||||
md ~\AppData\Local\nvim-data\site\autoload
|
md ~\AppData\Local\nvim-data\site\autoload
|
||||||
$uri = 'https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
|
$uri = 'https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
|
||||||
|
|
|
@ -25,15 +25,15 @@
|
||||||
" 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')
|
||||||
" Universal
|
|
||||||
so C:\_config\vim\vim_uni
|
|
||||||
" Windows
|
" Windows
|
||||||
so C:\_config\vim\vim_win
|
so C:\_config\vim\vim_win
|
||||||
else
|
|
||||||
" Universal
|
" Universal
|
||||||
so ~/.config/vim/vim_uni
|
so C:\_config\vim\vim_uni
|
||||||
|
else
|
||||||
" *nix (Linux/Mac)
|
" *nix (Linux/Mac)
|
||||||
so ~/.config/vim/vim_nix
|
so ~/.config/vim/vim_nix
|
||||||
|
" Universal
|
||||||
|
so ~/.config/vim/vim_uni
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" ----- PlugIns
|
" ----- PlugIns
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue