From f2f3e2f7816b0c9e4f54a8bd3bc268d564705f26 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Tue, 20 Oct 2020 23:53:04 -0300 Subject: Feat: mkvim command --- profile.dot.link | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/profile.dot.link b/profile.dot.link index 22c577d..b989743 100644 --- a/profile.dot.link +++ b/profile.dot.link @@ -131,6 +131,15 @@ export WORKPATH="$HOME/file:$HOME/data:$HOME/code:$HOME/apps:$HOME/apps/dotfiles # See http://www.caliban.org/bash/#bashtips export CDPATH=".:$HOME:$WORKPATH" +# Default editor +#if [ ! -z "$DISPLAY" ]; then +# # Avoid "Avoiding protocol specified" error +# export EDITOR="vim -X" +#else +# export EDITOR="vim" +#fi +export EDITOR="vim" + # Expand workpath #for folder in `echo $WORKPATH | sed -e "s|:| |g" -e "s|~|$HOME|g"`; do # PROJECTS="$PROJECTS`ls -d $folder/*`" @@ -216,14 +225,10 @@ mktouch() { touch "$*" } -# Default editor -#if [ ! -z "$DISPLAY" ]; then -# # Avoid "Avoiding protocol specified" error -# export EDITOR="vim -X" -#else -# export EDITOR="vim" -#fi -export EDITOR="vim" +mkvim() { + mktouch "$*" + $EDITOR "$*" +} # Basic git configuration # See http://stackoverflow.com/questions/4192014/git-ps1-extremely-slow-in-kernel-tree -- cgit v1.2.3