diff --git a/.vimrc b/.vimrc index e66e9c2..47c6cc5 100644 --- a/.vimrc +++ b/.vimrc @@ -7,7 +7,7 @@ """""""""""""""""""""" set nocp -so ~/.vim/user/* +so ~/.vim/user/files.vim colorscheme desert diff --git a/.zshrc b/.zshrc index 3ae0461..b196f5f 100644 --- a/.zshrc +++ b/.zshrc @@ -1,10 +1,5 @@ -# Lines configured by zsh-newuser-install -function 0 { screen -X at 0 stuff "$@ " } -function 1 { screen -X at 1 stuff "$@ " } -function 2 { screen -X at 2 stuff "$@ " } -function 3 { screen -X at 3 stuff "$@ " } -function 4 { screen -X at 4 stuff "$@ " } -function 5 { screen -X at 5 stuff "$@ " } +source ~/.zsh_local +source ~/.shell_aliases HISTFILE=~/.histfile HISTSIZE=10000 @@ -13,18 +8,20 @@ setopt appendhistory autocd notify setopt menu_complete unsetopt beep bindkey -v -# End of lines configured by zsh-newuser-install -# The following lines were added by compinstall -[ -z "$PS1" ] && return + +autoload -U up-line-or-beginning-search +autoload -U down-line-or-beginning-search +bindkey '^[[A' history-beginning-search-backward +bindkey '^[[B' history-beginning-search-forward + +export EDITOR="vim" zstyle ':completion:*' completer _expand _complete _ignored _correct _approximate zstyle ':completion:*' matcher-list '+' '+m:{[:lower:]}={[:upper:]}' '+m:{[:lower:][:upper:]}={[:upper:][:lower:]}' '+r:|[._-]=** r:|=** l:|=*' -zstyle :compinstall filename '/home/cprtools/.zshrc' +zstyle :compinstall filename '~/.zshrc' autoload -Uz compinit compinit -# End of lines added by compinstall -source ~/.shell_aliases autoload -Uz vcs_info precmd() { vcs_info } @@ -38,8 +35,6 @@ PROMPT='[%(!.%B%F{red}.%B%F{blue})%n%B%F{white}@%m%b%f] %b%F{green}%~%B%F{yellow if [ -x /usr/bin/dircolors ]; then test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" alias ls='ls --color=auto' - #alias dir='dir --color=auto' - #alias vdir='vdir --color=auto' alias grep='grep --color=auto' alias fgrep='fgrep --color=auto' @@ -48,8 +43,6 @@ fi export PATH=./:$PATH -alias df="df -h" - fignore=(o) function SetTtyColors() { @@ -76,8 +69,6 @@ if [ "$TERM" = "linux" ]; then SetTtyColors fi -[ -z "$STY" ] && screen -x -p + -A - function _open2(){ var=$(fc -ln -1); if [[ $var != *"grep"* ]]; then; @@ -109,61 +100,12 @@ function _open(){ } -bindkey "OA" history-search-backward -bindkey "OB" history-search-forward -function cd { - builtin cd "$@" && ls -F -} - -function note() { - builtin echo "$@" >> ~/.notes -} - -function wis() { - echo -en "\n\e[36m" - # Get a random comment - WISDOM="" - while [[ "$WISDOM" != \#* || "$WISDOM" == \#!* || "$WISDOM" == \#\ alia* ]] - do - ALIAS_COUNT=$(cat ~/.shell_aliases ~/.wisdom | wc -l) - RAN=$RANDOM - RAN=$(($RAN % $ALIAS_COUNT)) - WISDOM=$(tail -n+$RAN <(cat ~/.shell_aliases ~/.wisdom) | head -n1) - done - - # Search upward for the comment's start - RAN=$(($RAN - 1)) - ADDWIS=$(tail -n+$RAN ~/.shell_aliases ~/.wisdom | head -n1) - while [[ "$ADDWIS" == \#* && "$ADDWIS" != \#!* && "$ADDWIS" != \#\ alia* ]] - do - WISDOM=$ADDWIS - RAN=$(($RAN - 1)) - ADDWIS=$(tail -n+$RAN <(cat ~/.shell_aliases ~/.wisdom) | head -n1) - done - - # Add until comment's end - RAN=$(($RAN + 2)) - ADDWIS=$(tail -n+$RAN <(cat ~/.shell_aliases ~/.wisdom) | head -n1) - while [[ "$ADDWIS" == \#* && "$ADDWIS" != \#!* && "$ADDWIS" != \#\ alia* ]] - do - WISDOM+="\n" - WISDOM+=$ADDWIS - RAN=$(($RAN + 1)) - ADDWIS=$(tail -n+$RAN <(cat ~/.shell_aliases ~/.wisdom) | head -n1) - done - echo $WISDOM - echo -en "\n\e[0m" -} - function pushdot { cd ~/.dotfiles && if [ $# -eq 0 ]; then - git add .* && git commit && git push -u origin master + git commit -a && git push -u origin master else - git add .* && git commit -m "$1" && git push -u origin master + git commit -a -m "$1" && git push -u origin master fi cd - } - -cat ~/.notes -wis