refactor bashrc's to bash folder and vimrc's to vim folder

This commit is contained in:
Wryn Wagner 2019-08-20 09:52:04 -06:00
parent 613e4799de
commit 9f2276c4e3
9 changed files with 39 additions and 16 deletions

View File

@ -17,4 +17,4 @@ function pika {
imgcat $IMAGE
echo;
}
alias pikabox='while true; do clear; pika; sleep 120; done'
alias pikabox='while true; do reset; pika; sleep 120; done'

View File

@ -1,12 +1,13 @@
#!/bin/bash
function planktimer() {
# dependencies: 'say' 'termdown'
message='Push-up Time'
while true;
do
termdown 1h30m;
clear;
figlet "Plank Time" | lolcat;
say -v $(say -v ? | sed -n "/en_/p" | sed "s/ .*//" | shuf -n 1) "plank time";
figlet "$message" | lolcat;
say -v $(say -v ? | sed -n "/en_/p" | sed "s/ .*//" | shuf -n 1) "$message";
read -n 1;
if [ $1 ]; then
termdown $1;

View File

@ -3,7 +3,7 @@ DOTWRYN="$HOME/.wryn"
RC_DIR="$DOTWRYN/bash"
# source .wryn/bash files
for file in $(find $RC_DIR -maxdepth 1 -type f); do source $file; done;
for file in $(find $RC_DIR -maxdepth 1 -type f ! -name 'rc'); do source $file; done;
# osx
if [[ "$OSTYPE" == "darwin"* ]]; then

View File

@ -45,14 +45,14 @@ function rntbranchcleanup() {
for dir in $(ls $RD_PATH); do
rnt $dir >/dev/null 2>/dev/null;
if [ -d .git ]; then
printf "clearing repository $dir...";
printf " - %s\e[1;34m %s\e[0m..." "clearing repository" "$dir";
git branch -d $(git branch | sed -E "/develop|master|\*/d") >/dev/null 2>/dev/null;
printf "done!\n";
printf "\e[1;32m%s\e[0m\n" " DONE";
else
echo $dir is not a git repository;
printf " - \e[1;34m%s\e[1;31m %s\e[0m" "$dir" "is not a git repository";
fi
rnt;
done;
echo && echo RentDynamics repository branches all clean!
printf "\n\n\e[1;36m%s\e[1;35m %s\e[0m\n\n" "RentDynamics" "repository branches all clean!";
}

View File

@ -9,3 +9,8 @@ function notes() { NOTE="$NOTE_PATH/$1$NOTE_EXTENSION"; [ $1 ] && [ -f $NOTE ] &
# --- GIT -----------------------------------------------------
alias gitbranchcleanup='git branch -d $(git branch | sed -E "/develop|master|\*/d")'
alias pd='pushd';
alias qd='popd';
alias ds='dirs';

View File

@ -1,4 +1,4 @@
#!/bin/bash
RC_DIR='$HOME/.wryn'
echo source $RC_DIR/bashrc >> $HOME/.bashrc
echo source $RC_DIR/vimrc >> $HOME/.vimrc
echo source $RC_DIR/bash/rc >> $HOME/.bashrc
echo source $RC_DIR/vim/rc.vim >> $HOME/.vimrc

BIN
vim/en.utf-8.add.spl Normal file

Binary file not shown.

View File

@ -1,6 +1,7 @@
" -- Environment Variables --------------------------------------- {{{
let $RC_DIR="/Users/w0ryn/.wryn"
let $WRYNVIMRC="$RC_DIR/vimrc"
let $VIM_DIR="$RC_DIR/vim"
let $WRYNVIMRC="$VIM_DIR/rc.vim"
let $WRYNBASH="$RC_DIR/bashrc"
let $MYBASHRC="/Users/w0ryn/.bashrc"
" }}}
@ -21,7 +22,7 @@ syntax on " detect syntax
set autoindent " match indentation with next line
set smartindent " match indentation with syntax
set spellfile=$RC_DIR/en.utf-8.add
set spellfile=$VIM_DIR/en.utf-8.add
set spelllang=en
set showmatch " -- emit 'beep' when no matching symbol,
@ -33,7 +34,7 @@ set timeoutlen=200 " -- short timeout for multi-key functions
" -- File Formatting ------------------------------------- {{{
augroup filetype_specific_formatting
autocmd!
autocmd FileType python setlocal tabstop=4 softtabstop=4 shiftwidth=4 noexpandtab foldmethod=indent foldlevel=99
autocmd FileType python setlocal tabstop=4 softtabstop=4 shiftwidth=4 expandtab foldmethod=indent foldlevel=99
autocmd FileType java setlocal tabstop=4 softtabstop=4 shiftwidth=4 noexpandtab foldmethod=indent foldlevel=99
autocmd FileType cs setlocal tabstop=4 softtabstop=4 shiftwidth=4 noexpandtab foldmethod=indent foldlevel=99
autocmd FileType html setlocal tabstop=2 softtabstop=2 shiftwidth=2 noexpandtab foldmethod=indent foldlevel=99
@ -41,7 +42,7 @@ augroup filetype_specific_formatting
autocmd FileType vim setlocal tabstop=4 softtabstop=4 shiftwidth=4 noexpandtab foldmethod=marker foldlevel=1
autocmd FileType sh setlocal tabstop=4 softtabstop=4 shiftwidth=4 noexpandtab foldmethod=indent foldlevel=99
autocmd FileType lisp setlocal tabstop=2 softtabstop=2 shiftwidth=2 expandtab foldmethod=manual foldlevel=99
augroup END
augroup end
" }}}
" -- Key bindings ---------------------------------------- {{{
@ -87,6 +88,9 @@ nnoremap Q !!$SHELL<CR>
" \q for `q:`
nnoremap <Leader>q q:
" \t for rerun tests
nnoremap <Leader>t q:?test<CR><CR>
" \f for fold
nnoremap <Leader>f z
nnoremap <Leader>f z
@ -102,6 +106,6 @@ nnoremap _ :m -2 <CR>
inoremap <c-u> <esc>viwUea
" - specialized formatting
source $VIM_DIR/rd_formatting.vim
" }}}

13
vim/rd_formatting.vim Normal file
View File

@ -0,0 +1,13 @@
augroup rent_dynamics
autocmd!
autocmd BufRead,BufEnter,BufNewFile */RentDynamics/* setlocal expandtab
autocmd BufRead,BufEnter,BufNewFile */RentDynamics/*.cs setlocal tabstop=2 softtabstop=2 shiftwidth=2
autocmd BufRead,BufEnter,BufNewFile */RentDynamics/*.ts* setlocal tabstop=2 softtabstop=2 shiftwidth=2
autocmd BufRead,BufEnter,BufNewFile */RentDynamics/*.scss setlocal tabstop=2 softtabstop=2 shiftwidth=2
autocmd BufRead,BufEnter,BufNewFile */lead-mgmt-api-v1/* setlocal expandtab
autocmd BufRead,BufEnter,BufNewFile */lead-mgmt-api-v1/*.cs setlocal tabstop=2 softtabstop=2 shiftwidth=2
autocmd BufRead,BufEnter,BufNewFile */lead-mgmt-api-v1/*.cshtml setlocal tabstop=2 softtabstop=2 shiftwidth=2 filetype=html
autocmd BufRead,BufNewFile */RentDynamics/* foldmethod=indent foldlevel=99
augroup end