commit 8e4765ebb00ffa5c58fa44783a6eb10cc778d711
parent 49ff3a170d6580d9801364b117a866083278899d
Author: Oscar Benedito <oscar@oscarbenedito.com>
Date:   Thu, 13 Aug 2020 00:10:49 +0200

Drop script to create files and dirs shortcuts

The vim shortcuts aren't used, so they are only used on the terminal. As
a result, there is no need for the script.

Diffstat:
D.config/directories | 7-------
D.config/files | 10----------
M.config/nvim/init.vim | 1-
M.config/zsh/.zshrc | 1-
M.config/zsh/aliases | 14++++++++++++++
D.local/bin/update-shortcuts | 22----------------------
6 files changed, 14 insertions(+), 41 deletions(-)

diff --git a/.config/directories b/.config/directories @@ -1,7 +0,0 @@ -# shortcuts for directories -db $HOME/.local/bin -dc $HOME/Documents -dg $HOME/Git -ds $HOME/.local/src -dvw $HOME/Documents/wiki -dw $HOME/Downloads diff --git a/.config/files b/.config/files @@ -1,10 +0,0 @@ -# shortcuts for files -cfa $XDG_CONFIG_HOME/zsh/aliases -cfal $XDG_CONFIG_HOME/alacritty/alacritty.yml -cfd $XDG_CONFIG_HOME/directories -cfg $XDG_CONFIG_HOME/git/config -cfe $XDG_CONFIG_HOME/zsh/.zshenv -cff $XDG_CONFIG_HOME/files -cfv $XDG_CONFIG_HOME/nvim/init.vim -cfx $XDG_CONFIG_HOME/Xresources -cfz $XDG_CONFIG_HOME/zsh/.zshrc diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim @@ -179,6 +179,5 @@ nnoremap <Leader>latexm :-1read $XDG_CONFIG_HOME/nvim/templates/tex.Makefile<CR> " other {{{ let $NVIM_TUI_ENABLE_CURSOR_SHAPE = 1 -runtime shortcuts.vim " /other }}} diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc @@ -38,7 +38,6 @@ bindkey -M menuselect 'j' vi-down-line-or-history # Process the alias file [ -f "$XDG_CONFIG_HOME/zsh/aliases" ] && source "$XDG_CONFIG_HOME/zsh/aliases" -[ -f "$XDG_CONFIG_HOME/zsh/aliases-auto" ] && source "$XDG_CONFIG_HOME/zsh/aliases-auto" # Process fzf key bindings [ -f "$XDG_CONFIG_HOME/zsh/key-bindings.zsh" ] && source "$XDG_CONFIG_HOME/zsh/key-bindings.zsh" diff --git a/.config/zsh/aliases b/.config/zsh/aliases @@ -29,6 +29,20 @@ alias bvw="firefox $HOME/Documents/wiki/build/html/index.html" alias c="git --git-dir=$HOME/.local/share/dotfiles --work-tree=$HOME" alias cv="GIT_DIR=$HOME/.local/share/dotfiles GIT_WORK_TREE=$HOME nvim -c Git -c only" +# frequent files and directories +alias cfa="$EDITOR $XDG_CONFIG_HOME/zsh/aliases" +alias cfg="$EDITOR $XDG_CONFIG_HOME/git/config" +alias cfp="$EDITOR $HOME/.profile" +alias cfv="$EDITOR $XDG_CONFIG_HOME/nvim/init.vim" +alias cfx="$EDITOR $XDG_CONFIG_HOME/Xresources" +alias cfz="$EDITOR $XDG_CONFIG_HOME/zsh/.zshrc" +alias db="cd $HOME/.local/bin && ls" +alias dc="cd $HOME/Documents && ls" +alias dg="cd $HOME/Git && ls" +alias ds="cd $HOME/.local/src && ls" +alias dvw="cd $HOME/Documents/wiki && ls" +alias dw="cd $HOME/Downloads && ls" + c-clean() { rm README.md COPYING c update-index --skip-worktree README.md COPYING diff --git a/.local/bin/update-shortcuts b/.local/bin/update-shortcuts @@ -1,22 +0,0 @@ -#!/usr/bin/env bash - -# Source paths -FILES="$XDG_CONFIG_HOME/files" -DIRS="$XDG_CONFIG_HOME/directories" - -# Shortcut files paths -ZSH_SC="$XDG_CONFIG_HOME/zsh/aliases-auto" -VIM_SC="$XDG_CONFIG_HOME/nvim/shortcuts.vim" - -# Document files -echo "# vim: filetype=zsh" > "$ZSH_SC" -echo "# This file has been created automatically." >> "$ZSH_SC" -echo "\" vim: filetype=vim" > "$VIM_SC" -echo "\" This file has been created automatically." >> "$VIM_SC" - -[ -f "$FILES" ] && sed "s/\s*#.*$//;/^\s*$/d" "$FILES" | tee \ - >(awk '{print "alias " $1 "=\"$EDITOR " $2 "\""}' >> "$ZSH_SC") \ - |(awk '{print "nmap " $1 " :e " $2 "<CR>" }' >> "$VIM_SC") - -[ -f "$DIRS" ] && sed "s/\s*#.*$//;/^\s*$/d" "$DIRS" | \ - awk '{print "alias " $1 "=\"cd " $2 " && ls\""}' >> "$ZSH_SC"