From ac03198f70b7838880b8e3ea1bf4871dc5b44638 Mon Sep 17 00:00:00 2001 From: Michael Housh Date: Fri, 14 Jan 2022 14:35:07 -0500 Subject: [PATCH] Added scripts and updates to vimrc and zshrc --- scripts/scripts/duck | 2 +- scripts/scripts/hcpn | 12 ++++++++++++ vim/vimrc | 5 +++-- zsh/config/.zshrc | 14 ++++++++++++-- 4 files changed, 28 insertions(+), 5 deletions(-) diff --git a/scripts/scripts/duck b/scripts/scripts/duck index 1c9073e..ddb6be9 100755 --- a/scripts/scripts/duck +++ b/scripts/scripts/duck @@ -2,4 +2,4 @@ url="https://lite.duckduckgo.com/lite?kd=1&kp=1&q=$(urlencode "$*")" -exec lynx "$url" +exec lynx -vikeys "$url" diff --git a/scripts/scripts/hcpn b/scripts/scripts/hcpn index 9257e88..6b05b32 100755 --- a/scripts/scripts/hcpn +++ b/scripts/scripts/hcpn @@ -1,7 +1,19 @@ #!/bin/sh +set -e + # Creates a new `zet` inside the House Call Pro `Zettlekasten` directory. +_create() { + # Complete + echo "Create..." +} + +_commit() { + + echo "Commit..." +} + dirname="$(isosec)" mkdir "${HCP_NOTES}/${dirname}" dir="$HCP_NOTES/$dirname" diff --git a/vim/vimrc b/vim/vimrc index 3579265..db9dac8 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -5,7 +5,7 @@ set autowrite " automatically write files when changing set background=dark set backspace=indent,eol,start set belloff=all -set colorcolumn=120 +set colorcolumn=80 set expandtab " replace tabs with spaces automatically set exrc set foldmethod=manual @@ -18,7 +18,7 @@ set nocompatible set nofixendofline set nohlsearch set noswapfile -set nowrap +"set nowrap set number set relativenumber set ruler " turns on col and row in lower right @@ -39,6 +39,7 @@ set undodir=~/.vim/undodir set undofile set viminfo='20,<1000,s1000 " prevents truncated yanks, deletes, etc. set wildmenu +set wrap syntax enable filetype plugin on " sense the filesystem diff --git a/zsh/config/.zshrc b/zsh/config/.zshrc index 78cecd3..e1141c1 100644 --- a/zsh/config/.zshrc +++ b/zsh/config/.zshrc @@ -136,9 +136,12 @@ setopt glob_star_short setopt clobber setopt interactive_comments 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 +bindkey -v # Enable vi mode +export KEYTIMEOUT=1 # Switch between vim mode quicker. # Load Useful Functions _source_if "${ZDOTDIR}/zsh-functions" @@ -172,6 +175,7 @@ alias bk='cd "${OLDPWD}"' alias cdots='cd "${DOTFILES}"' alias cl='printf "\e[H\e[2J"' alias clear='printf "\e[H\e[2J"' +alias dv='dirs -v' alias g='git' alias ga='git add' alias gcb='git checkout -b' @@ -186,6 +190,12 @@ alias temp='cd $(mktemp -d)' alias vi='vim' alias nvim='unset VIMINIT && unset MYVIMRC && nvim' +#------------------------------ functions ------------------------------ +mkcd() { + local dir="$1" + mkdir -p "$dir" && cd "$dir" +} && export mkcd + #------------------------------ local configs ------------------------------ _source_if "$ZDOTDIR/.zshrc-local"