merge clean branch

This commit is contained in:
Paul Trowbridge 2021-05-15 00:03:02 -04:00
commit 946a694d6e
3 changed files with 90 additions and 16 deletions

View File

@ -119,6 +119,7 @@ fi
EDITOR=/usr/bin/vim.basic
PAGER="less"
LESS="-S"
export IPTOKEN="6ac0a563fc06ab"
export PG="psql -U ptrowbridge -d ubm -p 5432 -h 192.168.1.110"
export PGD="psql -U ptrowbridge -d ubm -p 5434 -h 192.168.1.110"

19
.vimrc
View File

@ -7,11 +7,10 @@ call vundle#begin()
" let Vundle manage Vundle, required
Plugin 'gmarik/Vundle.vim'
Plugin 'vim-airline/vim-airline'
Plugin 'kien/ctrlp.vim'
Plugin 'scrooloose/nerdtree'
Plugin 'tpope/vim-fugitive'
Plugin 'edkolev/tmuxline.vim'
Plugin 'vim-airline/vim-airline-themes'
Plugin 'chrisbra/csv.vim'
"Plugin 'Lokaltog/powerline', {'rtp': 'powerline/bindings/vim/'}
" All of your Plugins must be added before the following line
call vundle#end() " required
@ -22,7 +21,7 @@ map <C-k> <C-W>k
map <C-h> <C-W>h
map <C-l> <C-W>l
let NERDTreeShowHidden=1
set tabstop=8 softtabstop=0 expandtab shiftwidth=4 smarttab
set tabstop=4 softtabstop=0 expandtab shiftwidth=4 smarttab
colorscheme desert
syntax on
set splitright
@ -44,5 +43,19 @@ set showcmd
map <Leader>a :bn<cr>
map <Leader>f :bp<cr>
map <Leader>d :bp<cr>:bd #<cr>
"---move the whole page without moving the cursor---
nnoremap J <C-E>
nnoremap K <C-Y>
"-----nerdtree--------------------
nmap <Leader>e :NERDTreeToggle<CR>
" Search as you type, highlight results
set incsearch
set showmatch
set hlsearch
nnoremap \\ :noh<cr> " Clear higlighting
"nnoremap <esc> :noh<return><esc>
" Resize windows
nnoremap <silent> <Up> 5<C-W>+
nnoremap <silent> <Down> 5<C-W>-
nnoremap <silent> <Right> 10<C-W>>
nnoremap <silent> <Left> 10<C-W><

View File

@ -7,6 +7,38 @@ dir=~/dot_config
backup=~/dot_config_backup
files=".bashrc .vimrc .tmux.conf .psqlrc .gitconfig"
#-------------------------------------------------install debian tooling-----------------------------------------------------------------------------------
#----------curl-----------
if [ "$(dpkg-query -W -f='${Status}' "curl" 2>/dev/null | grep -c "ok installed")" == "1" ]
then
echo "curl already installed"
else
echo "installing curl"
apt update -q4
apt install curl -y
fi
#----------vim-----------
if [ "$(dpkg-query -W -f='${Status}' "curl" 2>/dev/null | grep -c "ok installed")" == "1" ]
then
echo "vim already installed"
else
echo "installing vim"
apt update -q4
apt install vim -y
fi
#----------tmux-----------
if [ "$(dpkg-query -W -f='${Status}' "tmux" 2>/dev/null | grep -c "ok installed")" == "1" ]
then
echo "tmux already installed"
else
echo "installing tmux"
apt update -q4
apt install tmux -y
fi
#------------------------------------------------ create the resore directory if it doesn't already exist--------------------------------------------------
if [ ! -d $backup ]
@ -32,17 +64,35 @@ done
#----------------------------------------------------------install go and go-powerline--------------------------------------------------------------------
# if $GOPATH is null the prompt for golang install
if [ -z "$GOPATH" ]
then
while true; do
read -p "do you want to install golang and go-powerline?" yn
read -p "do you want to install golang (needed for go-powerline)?" yn
case $yn in
[Yy]* )
sudo apt-get install golang -y;
break;;
[Nn]* )
break;;
* ) echo "Please answer yes or no.";;
esac
done
fi
#----------------------------------------------------------install go-powerline---------------------------------------------------------------------------
# see if this file exists, if not prompt for install
if [ ! -f ~/go/bin/powerline-go ]
then
while true; do
read -p "do you want to install go-powerline?" yn
case $yn in
[Yy]* )
sudo apt-get install golang;
go get -u github.com/justjanne/powerline-go;
break;;
[Nn]* )
exit;;
break;;
* ) echo "Please answer yes or no.";;
esac
done
@ -53,7 +103,7 @@ fi
if [ ! -d ~/fonts ]
then
while true; do
read -p "do you want to install powerline fonts from https://github.com/powerline/fonts?" yn
read -p "do you want to install powerline fonts from 'https://github.com/powerline/fonts' ?" yn
case $yn in
[Yy]* )
git clone https://github.com/powerline/fonts ~/fonts;
@ -61,7 +111,7 @@ then
./install.sh;
break;;
[Nn]* )
exit;;
break;;
* ) echo "Please answer yes or no.";;
esac
done
@ -73,13 +123,13 @@ fi
if [ ! -d ~/.tmux/plugins/tpm ]
then
while true; do
read -p "do you want to install the tmux plugin manager from https://github.com/tmux-plugins/tpm" yn
read -p "do you want to install the tmux plugin manager from 'https://github.com/tmux-plugins/tpm' ?" yn
case $yn in
[Yy]* )
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm;
break;;
[Nn]* )
exit;;
break;;
* ) echo "Please answer yes or no.";;
esac
done
@ -88,16 +138,26 @@ fi
#----------------------------------------------------------see if Vundle has been cloned yet and do so-----------------------------------------------------
if [ ! -d ~/.vim ]
if [ ! -d ~/.vim/bundle ]
then
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
while true; do
read -p "Do you want to install the vim plugins now?" yn
read -p "do you want to install the Vundle plugin manager for vim from https://github.com/VundleVim/Vundle.vim.git?" yn
case $yn in
[Yy]* ) vim +PluginInstall +qall; break;;
[Nn]* ) exit;;
[Yy]* )
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
# ask to install plugins after vundle installed
while true; do
read -p "Do you want to install the vim plugins now?" yn
case $yn in
[Yy]* ) vim +PluginInstall +qall; break;;
[Nn]* ) break;;
* ) echo "Please answer yes or no.";;
esac
done
break;;
[Nn]* )
break;;
* ) echo "Please answer yes or no.";;
esac
done
fi
echo "you may need to run vim and execute :PluginInstall to sync packages with the new .vimrc, or \"vim +PluginInstall +qall\" from the command line"