Condensed zshrc, corrected vimrc

This commit is contained in:
Sage Vaillancourt 2020-04-21 13:54:09 -04:00
parent 4b8957e9d4
commit e1d35471d3
2 changed files with 13 additions and 71 deletions

2
.vimrc
View File

@ -7,7 +7,7 @@
"""""""""""""""""""""" """"""""""""""""""""""
set nocp set nocp
so ~/.vim/user/* so ~/.vim/user/files.vim
colorscheme desert colorscheme desert

82
.zshrc
View File

@ -1,10 +1,5 @@
# Lines configured by zsh-newuser-install source ~/.zsh_local
function 0 { screen -X at 0 stuff "$@ " } source ~/.shell_aliases
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 "$@ " }
HISTFILE=~/.histfile HISTFILE=~/.histfile
HISTSIZE=10000 HISTSIZE=10000
@ -13,18 +8,20 @@ setopt appendhistory autocd notify
setopt menu_complete setopt menu_complete
unsetopt beep unsetopt beep
bindkey -v bindkey -v
# End of lines configured by zsh-newuser-install
# The following lines were added by compinstall autoload -U up-line-or-beginning-search
[ -z "$PS1" ] && return 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:*' completer _expand _complete _ignored _correct _approximate
zstyle ':completion:*' matcher-list '+' '+m:{[:lower:]}={[:upper:]}' '+m:{[:lower:][:upper:]}={[:upper:][:lower:]}' '+r:|[._-]=** r:|=** l:|=*' 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 autoload -Uz compinit
compinit compinit
# End of lines added by compinstall
source ~/.shell_aliases
autoload -Uz vcs_info autoload -Uz vcs_info
precmd() { 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 if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
alias ls='ls --color=auto' alias ls='ls --color=auto'
#alias dir='dir --color=auto'
#alias vdir='vdir --color=auto'
alias grep='grep --color=auto' alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto' alias fgrep='fgrep --color=auto'
@ -48,8 +43,6 @@ fi
export PATH=./:$PATH export PATH=./:$PATH
alias df="df -h"
fignore=(o) fignore=(o)
function SetTtyColors() { function SetTtyColors() {
@ -76,8 +69,6 @@ if [ "$TERM" = "linux" ]; then
SetTtyColors SetTtyColors
fi fi
[ -z "$STY" ] && screen -x -p + -A
function _open2(){ function _open2(){
var=$(fc -ln -1); var=$(fc -ln -1);
if [[ $var != *"grep"* ]]; then; 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 { function pushdot {
cd ~/.dotfiles && cd ~/.dotfiles &&
if [ $# -eq 0 ]; then if [ $# -eq 0 ]; then
git add .* && git commit && git push -u origin master git commit -a && git push -u origin master
else else
git add .* && git commit -m "$1" && git push -u origin master git commit -a -m "$1" && git push -u origin master
fi fi
cd - cd -
} }
cat ~/.notes
wis