Added scripts and updates to vimrc and zshrc

This commit is contained in:
2022-01-14 14:35:07 -05:00
parent 500c648c5b
commit ac03198f70
4 changed files with 28 additions and 5 deletions

View File

@@ -2,4 +2,4 @@
url="https://lite.duckduckgo.com/lite?kd=1&kp=1&q=$(urlencode "$*")" url="https://lite.duckduckgo.com/lite?kd=1&kp=1&q=$(urlencode "$*")"
exec lynx "$url" exec lynx -vikeys "$url"

View File

@@ -1,7 +1,19 @@
#!/bin/sh #!/bin/sh
set -e
# Creates a new `zet` inside the House Call Pro `Zettlekasten` directory. # Creates a new `zet` inside the House Call Pro `Zettlekasten` directory.
_create() {
# Complete
echo "Create..."
}
_commit() {
echo "Commit..."
}
dirname="$(isosec)" dirname="$(isosec)"
mkdir "${HCP_NOTES}/${dirname}" mkdir "${HCP_NOTES}/${dirname}"
dir="$HCP_NOTES/$dirname" dir="$HCP_NOTES/$dirname"

View File

@@ -5,7 +5,7 @@ set autowrite " automatically write files when changing
set background=dark set background=dark
set backspace=indent,eol,start set backspace=indent,eol,start
set belloff=all set belloff=all
set colorcolumn=120 set colorcolumn=80
set expandtab " replace tabs with spaces automatically set expandtab " replace tabs with spaces automatically
set exrc set exrc
set foldmethod=manual set foldmethod=manual
@@ -18,7 +18,7 @@ set nocompatible
set nofixendofline set nofixendofline
set nohlsearch set nohlsearch
set noswapfile set noswapfile
set nowrap "set nowrap
set number set number
set relativenumber set relativenumber
set ruler " turns on col and row in lower right set ruler " turns on col and row in lower right
@@ -39,6 +39,7 @@ set undodir=~/.vim/undodir
set undofile set undofile
set viminfo='20,<1000,s1000 " prevents truncated yanks, deletes, etc. set viminfo='20,<1000,s1000 " prevents truncated yanks, deletes, etc.
set wildmenu set wildmenu
set wrap
syntax enable syntax enable
filetype plugin on " sense the filesystem filetype plugin on " sense the filesystem

View File

@@ -136,9 +136,12 @@ setopt glob_star_short
setopt clobber setopt clobber
setopt interactive_comments setopt interactive_comments
setopt aliases setopt aliases
setopt auto_pushd # Push the current directory on the stack.
setopt pushd_ignore_dups # Ignore duplicates in stack
setopt pushd_silent # Do not print stack after pushd or popd.
# Enable vi mode bindkey -v # Enable vi mode
bindkey -v export KEYTIMEOUT=1 # Switch between vim mode quicker.
# Load Useful Functions # Load Useful Functions
_source_if "${ZDOTDIR}/zsh-functions" _source_if "${ZDOTDIR}/zsh-functions"
@@ -172,6 +175,7 @@ alias bk='cd "${OLDPWD}"'
alias cdots='cd "${DOTFILES}"' alias cdots='cd "${DOTFILES}"'
alias cl='printf "\e[H\e[2J"' alias cl='printf "\e[H\e[2J"'
alias clear='printf "\e[H\e[2J"' alias clear='printf "\e[H\e[2J"'
alias dv='dirs -v'
alias g='git' alias g='git'
alias ga='git add' alias ga='git add'
alias gcb='git checkout -b' alias gcb='git checkout -b'
@@ -186,6 +190,12 @@ alias temp='cd $(mktemp -d)'
alias vi='vim' alias vi='vim'
alias nvim='unset VIMINIT && unset MYVIMRC && nvim' alias nvim='unset VIMINIT && unset MYVIMRC && nvim'
#------------------------------ functions ------------------------------
mkcd() {
local dir="$1"
mkdir -p "$dir" && cd "$dir"
} && export mkcd
#------------------------------ local configs ------------------------------ #------------------------------ local configs ------------------------------
_source_if "$ZDOTDIR/.zshrc-local" _source_if "$ZDOTDIR/.zshrc-local"