From 0097a1e3a835583ca5435326811fe6519d5fd102 Mon Sep 17 00:00:00 2001 From: Mark Szymanski Date: Mon, 1 Nov 2010 20:04:28 -0500 Subject: [PATCH] Added check to see if user is using vim with newentry alias. --- aliases/jekyll.aliases.bash | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/aliases/jekyll.aliases.bash b/aliases/jekyll.aliases.bash index a3e3fc0..a9fed04 100644 --- a/aliases/jekyll.aliases.bash +++ b/aliases/jekyll.aliases.bash @@ -1,6 +1,10 @@ -# Open the root of your site in your favorite editor +# Open the root of your site in your vim or cd to it -alias newentry="cd $JEKYLL_LOCAL_ROOT && $EDITOR ." +if [ $EDITOR = "vim"] +then + alias newentry="cd $JEKYLL_LOCAL_ROOT && $EDITOR ." +else + alias newentry="cd $JEKYLL_LOCAL_ROOT" # Open the _posts/ directory for making a new blog post (seperate from above alias because not everyone uses jekyll for a blog) -- 2.17.1