From 33bcf0df5252259aad735ce3e718d54b9fd1e5f0 Mon Sep 17 00:00:00 2001 From: Gabe Venberg Date: Mon, 15 Oct 2018 12:02:44 -0500 Subject: [PATCH] fixed off by one error in my vim foldtext, and restructured zsh config to use the .config directory. --- neovim/.config/nvim/init.vim | 2 +- vifm/.config/vifm/vifmrc | 7 ------- zsh/{.zsh => .config}/dircolors | 0 zsh/{.zsh => .config}/functions.zsh | 0 zsh/{.zsh => .config}/prompt.zsh | 0 zsh/.zshrc | 22 +++------------------- 6 files changed, 4 insertions(+), 27 deletions(-) rename zsh/{.zsh => .config}/dircolors (100%) rename zsh/{.zsh => .config}/functions.zsh (100%) rename zsh/{.zsh => .config}/prompt.zsh (100%) diff --git a/neovim/.config/nvim/init.vim b/neovim/.config/nvim/init.vim index 690164b..4a8e176 100644 --- a/neovim/.config/nvim/init.vim +++ b/neovim/.config/nvim/init.vim @@ -121,7 +121,7 @@ filetype plugin on set fillchars="fold:-" "set the fold text for this method, in most cases, the line just above our fold is what we want, so we wont put any text into it. just level and linecount. function! Minimal_foldtext() - let lines_count = v:foldend - v:foldstart + let lines_count = v:foldend - v:foldstart + 1 let lines_count_text = '+' . v:folddashes . '| ' . printf("%10S" , lines_count) . ' lines |' let line_level_text = '| ' . printf("%8S" , 'level ' . v:foldlevel) . ' |' let fold_text_end = line_level_text . repeat('-',8) diff --git a/vifm/.config/vifm/vifmrc b/vifm/.config/vifm/vifmrc index f3e56e5..a51d08e 100644 --- a/vifm/.config/vifm/vifmrc +++ b/vifm/.config/vifm/vifmrc @@ -214,13 +214,6 @@ set vicmd=nvim \ ffprobe -pretty %c 2>&1 " Web - filextype *.html,*.htm - \ {Open with dwb} - \ dwb %f %i &, - \ {Open with firefox} - \ firefox %f &, - \ {Open with uzbl} - \ uzbl-browser %f %i &, filetype *.html,*.htm links, lynx " Object diff --git a/zsh/.zsh/dircolors b/zsh/.config/dircolors similarity index 100% rename from zsh/.zsh/dircolors rename to zsh/.config/dircolors diff --git a/zsh/.zsh/functions.zsh b/zsh/.config/functions.zsh similarity index 100% rename from zsh/.zsh/functions.zsh rename to zsh/.config/functions.zsh diff --git a/zsh/.zsh/prompt.zsh b/zsh/.config/prompt.zsh similarity index 100% rename from zsh/.zsh/prompt.zsh rename to zsh/.config/prompt.zsh diff --git a/zsh/.zshrc b/zsh/.zshrc index 44b136f..b31d9f2 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -14,9 +14,9 @@ #You should have received a copy of the GNU General Public License #along with this program. If not, see . # -local ZSH_CONF=$HOME/.zsh # Define the place I store all my zsh config stuff +local ZSH_CONF=$HOME/.config/zsh # Define the place I store all my zsh config stuff local ZSH_CACHE=$ZSH_CONF/cache # for storing files like history and zcompdump -local LOCAL_ZSHRC=$HOME/.zshlocal/.zshrc # Allow the local machine to have its own overriding zshrc if it wants it +local LOCAL_ZSHRC=$HOME/.config/zshlocal # Allow the local machine to have its own overriding zshrc if it wants it # Load external config files and tools @@ -57,7 +57,6 @@ local LOCAL_ZSHRC=$HOME/.zshlocal/.zshrc # Allow the local machine to have setopt LONG_LIST_JOBS # ZSH History - alias history='fc -fl 1' HISTFILE=$ZSH_CACHE/history # Keep our home directory neat by keeping the histfile somewhere else SAVEHIST=10000 # Big history HISTSIZE=10000 # Big history @@ -65,7 +64,6 @@ local LOCAL_ZSHRC=$HOME/.zshlocal/.zshrc # Allow the local machine to have setopt APPEND_HISTORY # Allow multiple terminal sessions to all append to one zsh command history setopt HIST_FIND_NO_DUPS # When searching history dont display results already cycled through twice setopt HIST_EXPIRE_DUPS_FIRST # When duplicates are entered, get rid of the duplicates first when we hit $HISTSIZE - setopt HIST_IGNORE_SPACE # Dont enter commands into history if they start with a space setopt HIST_VERIFY # makes history substitution commands a bit nicer. I dont fully understand setopt SHARE_HISTORY # Shares history across multiple zsh sessions, in real time setopt HIST_IGNORE_DUPS # Do not write events to history that are duplicates of the immediately previous event @@ -73,17 +71,9 @@ local LOCAL_ZSHRC=$HOME/.zshlocal/.zshrc # Allow the local machine to have setopt HIST_REDUCE_BLANKS # Remove extra blanks from each command line being added to history # ZSH Auto Completion - # Figure out the short hostname - if [[ "$OSTYPE" = darwin* ]]; then - # OS X's $HOST changes with dhcp, etc., so use ComputerName if possible. - SHORT_HOST=$(scutil --get ComputerName 2>/dev/null) || SHORT_HOST=${HOST/.*/} - else SHORT_HOST=${HOST/.*/} - fi - #the auto complete dump is a cache file where ZSH stores its auto complete data, for faster load times local ZSH_COMPDUMP="$ZSH_CACHE/acdump-${SHORT_HOST}-${ZSH_VERSION}" #where to store autocomplete data - autoload -Uz compinit compinit -i -d "${ZSH_COMPDUMP}" # Init auto completion; tell where to store autocomplete dump zstyle ':completion:*' menu select # Have the menu highlight as we cycle through options @@ -102,6 +92,7 @@ local LOCAL_ZSHRC=$HOME/.zshlocal/.zshrc # Allow the local machine to have # Aliases alias vim="nvim" + alias vimdiff="nvim -d" alias mutt="neomutt" #alias -g ...='../..' @@ -168,10 +159,3 @@ local LOCAL_ZSHRC=$HOME/.zshlocal/.zshrc # Allow the local machine to have if [[ -r $LOCAL_ZSHRC ]]; then source $LOCAL_ZSHRC fi - -##launch a tmux session for interactive shells (attaching to an existing tmux session if possible. -#seems to be buggy for now, sometimes doesnt work. -#if which tmux > /dev/null 2>&1; then #checks if tmux is installed. if it is not, do nothing. -# #try to attach to an exsisting tmux session, or, if that doesnt exist, make a new one. -# test -z ${TMUX} && (tmux attach || tmux new-session) -#fi