Made changes

This commit is contained in:
Austen Adler 2014-07-21 06:34:23 -04:00
parent ebf4c95ac7
commit 376613630e
2 changed files with 76 additions and 15 deletions

87
bashrc
View File

@ -4,8 +4,6 @@ case $- in
esac
HISTCONTROL=ignoreboth
shopt -s histappend
HISTSIZE=1000
HISTFILESIZE=2000
shopt -s checkwinsize
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
@ -118,18 +116,6 @@ function tsh(){
echo -e "\n\n\n\n\n\n\nSESSION CLOSED\n\n\n\n\n\n\n"
}
#History control
if [ "$BASH" ]; then
export HISTTIMEFORMAT="%Y-%m-%d_%H:%M:%S "
export PROMPT_COMMAND="${PROMPT_COMMAND:+$PROMPT_COMMAND ; }"'echo "`date +'%y.%m.%d-%H:%M:%S:'`" $USER "$(pwd)" "$(history 1 | cut -c8-)" >> ~/.bash_eternal_history'
alias ehistory='cat ~/.bash_eternal_history|grep $@'
#readonly PROMPT_COMMAND
#readonly HISTSIZE
readonly HISTFILE
readonly HOME
readonly HISTIGNORE
#readonly HISTCONTROL
fi
#Functions
extract () {
@ -183,3 +169,76 @@ function initify(){
git co master
}
export -f initify
#Color definitions
txtblk='\e[0;30m' # Black - Regular
txtred='\e[0;31m' # Red
txtgrn='\e[0;32m' # Green
txtylw='\e[0;33m' # Yellow
txtblu='\e[0;34m' # Blue
txtpur='\e[0;35m' # Purple
txtcyn='\e[0;36m' # Cyan
txtwht='\e[0;37m' # White
bldblk='\e[1;30m' # Black - Bold
bldred='\e[1;31m' # Red
bldgrn='\e[1;32m' # Green
bldylw='\e[1;33m' # Yellow
bldblu='\e[1;34m' # Blue
bldpur='\e[1;35m' # Purple
bldcyn='\e[1;36m' # Cyan
bldwht='\e[1;37m' # White
unkblk='\e[4;30m' # Black - Underline
undred='\e[4;31m' # Red
undgrn='\e[4;32m' # Green
undylw='\e[4;33m' # Yellow
undblu='\e[4;34m' # Blue
undpur='\e[4;35m' # Purple
undcyn='\e[4;36m' # Cyan
undwht='\e[4;37m' # White
bakblk='\e[40m' # Black - Background
bakred='\e[41m' # Red
badgrn='\e[42m' # Green
bakylw='\e[43m' # Yellow
bakblu='\e[44m' # Blue
bakpur='\e[45m' # Purple
bakcyn='\e[46m' # Cyan
bakwht='\e[47m' # White
txtrst='\e[0m' # Text Reset
#History control
if [ "$BASH" ]; then
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ \1/'
}
prompt(){
printf "[$txtgrn%s$txtrst][$txtred%s$txtrst][$txtblu%s$txtrst]➢" $(whoami) "$PWD" $(parse_git_branch)
}
PS1=
PROMPT_COMMAND=prompt
export PROMPT_COMMAND="${PROMPT_COMMAND:+$PROMPT_COMMAND ; }"'echo "`date +'%y.%m.%d-%H:%M:%S:'`" $USER "$(pwd)" "$(history 1 | cut -c8-)" >> ~/.bash_eternal_history'
#PROMPT_COMMAND='PS1="\[\033[0;33m\][\!]\`if [[ \$? = "0" ]]; then echo "\\[\\033[32m\\]"; else echo "\\[\\033[31m\\]"; fi\`[\u.\h: \`if [[ `pwd|wc -c|tr -d " "` > 18 ]]; then echo "\\W"; else echo "\\w"; fi\`]\$\[\033[0m\] "; echo -ne "\033]0;`hostname -s`:`pwd`\007"'
export HISTFILESIZE=
export HISTSIZE=
export HISTTIMEFORMAT="%Y-%m-%d_%H:%M:%S "
export HISTFILE=~/.bash_eternal_history
alias ehistory='cat ~/.bash_eternal_history|grep $@'
readonly HOME
readonly HISTIGNORE
#readonly PROMPT_COMMAND
#readonly HISTSIZE
#readonly HISTFILE
#readonly HISTCONTROL
fi

4
vimrc
View File

@ -5,6 +5,8 @@ endif
nnoremap <Leader>autoformat! :%s/, /,<CR>:%s/ \/ /\/<CR>:%s/ {/{<CR>:%s/} /}<CR>:%s/ = /=
command! W %!sudo tee > /dev/null %
autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o
autocmd FileType * :hi IndentGuidesOdd guibg=red ctermbg=239
autocmd FileType * :hi IndentGuidesEven guibg=white ctermbg=239
au VimResized * exe "normal! \<c-w>="
au BufRead,BufNewFile *.twig set filetype=htmljinja
"match Error /\s\+$/
@ -113,7 +115,7 @@ nnoremap <Left> :bp<CR>
nnoremap <Right> :bn<CR>
nnoremap <C-w>z <C-w>_<C-w>|
nnoremap <Leader>bn G?Bundle<CR>yyp$hdi'"+gP0Wl3d/\/<CR>x:nohlsearch<CR>:up<CR>:BundleInstall
nnoremap <C-o> :CtrlPFunky<CR>
nnoremap <Leader><C-p> :CtrlPFunky<CR>
nmap <C-Up> [e
nmap <C-Down> ]e
vmap <C-Up> [egv