mirror of
https://github.com/klmp200/vim-sync.git
synced 2024-11-21 21:53:32 +00:00
Added backup and fancy messages
This commit is contained in:
parent
36687d7db0
commit
9729f2467b
13
install.pl
13
install.pl
@ -3,7 +3,12 @@
|
|||||||
use 5.018;
|
use 5.018;
|
||||||
use autodie;
|
use autodie;
|
||||||
use Cwd 'realpath';
|
use Cwd 'realpath';
|
||||||
|
use File::Copy 'move';
|
||||||
|
|
||||||
|
say "Backuping your original vimrc";
|
||||||
|
move "$ENV{'HOME'}/.vimrc", "$ENV{'HOME'}/.vimrc.old";
|
||||||
|
|
||||||
|
say "Writing your new config";
|
||||||
open my $vimrc, '>', "$ENV{'HOME'}/.vimrc";
|
open my $vimrc, '>', "$ENV{'HOME'}/.vimrc";
|
||||||
|
|
||||||
my $script = realpath($0);
|
my $script = realpath($0);
|
||||||
@ -12,8 +17,12 @@ my $path = $script =~ s#/(\w|\.)+\z##ar;
|
|||||||
select $vimrc;
|
select $vimrc;
|
||||||
say "let syncdir=\"$path/\"";
|
say "let syncdir=\"$path/\"";
|
||||||
say 'exec "source ".syncdir."vimrc"';
|
say 'exec "source ".syncdir."vimrc"';
|
||||||
select STDIN;
|
select STDOUT;
|
||||||
|
|
||||||
close $vimrc;
|
close $vimrc;
|
||||||
|
|
||||||
`git clone https://github.com/VundleVim/Vundle.vim $ENV{'HOME'}/.vim/bundle/Vundle.vim`
|
say "Installing Vundle";
|
||||||
|
`git clone https://github.com/VundleVim/Vundle.vim $ENV{'HOME'}/.vim/bundle/Vundle.vim`;
|
||||||
|
|
||||||
|
say "Installation complete";
|
||||||
|
say "Now just launch vim and use :PluginInstall to complete your install";
|
||||||
|
Loading…
Reference in New Issue
Block a user