mirror of
https://github.com/amix/vimrc
synced 2025-07-04 06:44:59 +08:00
Save old vim configs before writing into ~/.vimrc.
If user has some vimrc already present then it will be saved as $HOME/.oldvimrc and then new vimrc will be created.
This commit is contained in:
@ -1,6 +1,11 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
# Save previous vimrc.
|
||||||
|
if [ -f $HOME/.vimrc ]; then
|
||||||
|
mv ~/.vimrc ~/.oldvimrc
|
||||||
|
echo "Saved previous vimrc as $HOME/.oldvimrc"
|
||||||
|
fi
|
||||||
cd ~/.vim_runtime
|
cd ~/.vim_runtime
|
||||||
cat ~/.vim_runtime/vimrcs/basic.vim > ~/.vimrc
|
cat ~/.vim_runtime/vimrcs/basic.vim > ~/.vimrc
|
||||||
echo "Installed the Basic Vim configuration successfully! Enjoy :-)"
|
echo "Installed the Basic Vim configuration successfully! Enjoy :-)"
|
||||||
|
Reference in New Issue
Block a user