dotfiles

Cross platform dotfiles for linux, mac and windows
git clone git@getsh.org:dotfiles.git
Log | Files | Refs

commit c708094d2b4a3c1236db78d293da99578d4e3e1d
parent 7ee1204516da85b0282fa39d893e77c9e80c5448
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:
M.config/sh/aliases | 4++++
M.config/sh/plugin/git | 2++
M.profile | 9++++++---
3 files changed, 12 insertions(+), 3 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,9 +36,7 @@ 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 chance() { @@ -51,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"