Complete deploy.sh, update vimrc

This commit is contained in:
Ceda EI 2019-05-12 14:55:21 +05:30
parent c0cf39e1f0
commit 85f5e482a0
2 changed files with 33 additions and 17 deletions

View File

@ -1,9 +1,9 @@
#!/usr/bin/env bash
function find_package_manager() {
hash pacman && echo pacman && return 0
hash apt-get && echo apt-get && return 0
hash apk && echo apk && return 0
hash pacman &> /dev/null && echo pacman && return 0
hash apt-get &> /dev/null && echo apt-get && return 0
hash apk &> /dev/null && echo apk && return 0
return 1
}
@ -13,7 +13,7 @@ function install_package() {
echo -e "\033[38;5;1mCould not find package manager" >&2
exit
fi
case package_manager in
case $package_manager in
pacman)
sudo pacman -S $*
;;
@ -61,7 +61,33 @@ check_and_install bash
check_and_install tmux
check_and_install vim
check_and_install curl
check_and_install git
echo -e "\n\033[38;5;2mStowing config\n"
mv ~/.bashrc{,.old} &> /dev/null
stow_cfg bash
mv ~/.tmux.conf{,.old} &> /dev/null
mv ~/.tmux{,.old} &> /dev/null
stow_cfg tmux
mv ~/.vimrc{,.old} &> /dev/null
mv ~/.vim{,.old} &> /dev/null
stow_cfg vim
echo -e "\n\033[38;5;2mSetting up wish\n"
mkdir -p ~/.config/
git clone https://gitlab.com/ceda_ei/wish.git ~/.config/wish
echo -e "\n\033[38;5;2mSetting up tmux plugins\n"
mkdir -p ~/.tmux/plugins/
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
~/.tmux/plugins/tpm/bin/install_plugins
echo -e "\n\033[38;5;2mSetting up vim plugins\n"
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
vim +PlugInstall +qall
echo -e "\n\033[38;5;2mComplete\n"

View File

@ -30,7 +30,6 @@ set undofile
call plug#begin('~/.vim/plugged')
Plug 'valloric/MatchTagAlways'
Plug 'tyru/caw.vim'
Plug 'airblade/vim-gitgutter'
Plug 'jiangmiao/auto-pairs'
" For func argument completion
Plug 'christoomey/vim-conflicted'
@ -82,19 +81,14 @@ nnoremap ; :
iabbrev <// </<C-X><C-O>
let g:indentLine_char = ''
let g:indentLine_char = '|'
set termguicolors
let &t_8f = "\<Esc>[38:2:%lu:%lu:%lum"
let &t_8b = "\<Esc>[48:2:%lu:%lu:%lum"
set colorcolumn=80
colorscheme Tomorrow-Night-Bright
let g:gitgutter_sign_added = '▐ '
let g:gitgutter_sign_modified = '▐ '
let g:gitgutter_sign_removed = '▐ '
let g:gitgutter_sign_removed_first_line = '▐▌'
let g:gitgutter_sign_modified_removed = '▐▌'
let g:netrw_banner=0
let g:airline_powerline_fonts = 1
let g:airline_theme='wombat'
let g:airline#extensions#tabline#enabled = 1
@ -104,7 +98,6 @@ let g:ctrlp_user_command = ['.git', 'cd %s && git ls-files -co --exclude-standar
" Toggle spell checking on and off with `,s`
let mapleader = ","
nmap <silent> <leader>s :set spell!<CR>
nmap <leader>v :tabedit $MYVIMRC<CR>
nmap <leader>u :MundoToggle<CR>
" Restore cursor position
@ -112,6 +105,3 @@ autocmd BufReadPost *
\ if line("'\"") > 1 && line("'\"") <= line("$") |
\ exe "normal! g`\"" |
\ endif
let g:airline_section_error = '%{airline#util#wrap(airline#extensions#coc#get_error(),0)}'
let g:airline_section_warning = '%{airline#util#wrap(airline#extensions#coc#get_warning(),0)}'