Automaticially install vim plugins | More informations in the setup
This commit is contained in:
parent
fe08e1debe
commit
0901fc6e10
1 changed files with 13 additions and 2 deletions
15
setup.sh
15
setup.sh
|
@ -6,6 +6,7 @@ commandExists()
|
|||
}
|
||||
|
||||
# remove all current dotfiles
|
||||
echo '[INFO] Removing current dotfiles...'
|
||||
rm -f ~/.zshrc
|
||||
rm -f ~/.vimrc
|
||||
rm -rf ~/.vim
|
||||
|
@ -13,6 +14,7 @@ rm -f ~/.tmux.conf
|
|||
rm -rf ~/.atom
|
||||
|
||||
# create symbolic links to dotfiles
|
||||
echo '[INFO] Creating symlinks to new config files in .dotfiles...'
|
||||
ln -s ~/.dotfiles/.vimrc ~/.vimrc
|
||||
ln -s ~/.dotfiles/.zshrc ~/.zshrc
|
||||
ln -s ~/.dotfiles/.vim ~/.vim
|
||||
|
@ -21,17 +23,27 @@ ln -s ~/.dotfiles/.atom ~/.atom
|
|||
|
||||
# install vundle
|
||||
if ! [ -d ~/.vim/bundle/Vundle.vim ]; then
|
||||
echo '[INFO] Installing Vundle...'
|
||||
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
|
||||
else
|
||||
echo '[INFO] Vundle is already installed.'
|
||||
fi
|
||||
|
||||
if commandExists vim; then
|
||||
echo '[INFO] Installing vim plugins via Vundle...'
|
||||
vim +PluginInstall +qall
|
||||
else
|
||||
echo '[INFO] Vim is not installed, could not install the plugins.'
|
||||
fi
|
||||
|
||||
# if atom is installed import configs
|
||||
if commandExists atom; then
|
||||
if commandExists apm; then
|
||||
if [ -f ~/.dotfiles/.atom/packages.list ]; then
|
||||
echo '[INFO] Installing atom packages, this can take a while...'
|
||||
apm install --packages-file ~/.dotfiles/.atom/packages.list
|
||||
else
|
||||
echo '[INFO] Cannot find packages.txt skipping atom package installation.'
|
||||
echo '[INFO] Cannot find packages.list skipping atom package installation.'
|
||||
fi
|
||||
else
|
||||
echo '[INFO] Atom is installed but the apm command is not available. Cannot import atom packages!'
|
||||
|
@ -41,5 +53,4 @@ else
|
|||
fi
|
||||
|
||||
# next steps:
|
||||
# - install Vundle plugins from inside vim :PluginInstall
|
||||
# - backup config files first before removing them
|
||||
|
|
Loading…
Add table
Reference in a new issue