commit bb8d823c99cd2f9490750d23ecdf60ac05b17377
parent 5dbe8a5776be9bd6f2464d8c82251c1938e99e80
Author: Bharatvaj <bharatvaj@yahoo.com>
Date: Fri, 5 Nov 2021 17:41:04 +0530
Use nvim as VISUAL if available
Add some shortcuts for git workflow
Add ls conditioning
Diffstat:
3 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/.config/sh/aliases b/.config/sh/aliases
@@ -1,3 +1,7 @@
mich startx && alias startx="startx \"$XDG_CONFIG_HOME/X11/xinitrc\" vt1"
mich wget && alias wget="wget --hsts-file=\"$XDG_CACHE_HOME/wget-hsts\""
+mich nvim && alias vim=nvim
+
+# ls conditioning
+mich sl && alias lls=sl && alias llls=sl && alias sls=sl
diff --git a/.config/sh/plugin/git b/.config/sh/plugin/git
@@ -7,6 +7,8 @@ alias gb='git branch'
alias gcm='git commit --message'
alias gco='git checkout'
alias gd='git diff'
+alias gds='git diff --staged'
+alias gst='git status'
alias glg='git log --graph --oneline --decorate --all'
alias gld='git log --pretty=format:"%h %ad %s" --date=short --all'
diff --git a/.profile b/.profile
@@ -36,10 +36,6 @@ export NB_PATH="$XDG_DATA_HOME/notebook"
# Make `history` print timestamp
HISTTIMEFORMAT="%F %T "
-# Setup editor
-export VISUAL=vi
-export EDITOR="$VISUAL"
-
# Local executables
export PATH=${PATH}:~/.local/bin
@@ -53,6 +49,11 @@ mich() {
which "$@" >/dev/null 2>/dev/null
}
+# Setup editor
+
+export VISUAL=$(mich nvim && echo nvim || echo vim )
+export EDITOR="$VISUAL"
+
chance "${XDG_CONFIG_HOME}/sh/aliases"
chance "${XDG_CONFIG_HOME}/sh/plugin/index"
chance "${XDG_CONFIG_HOME}/sh/unstaged"