From 25cddf650425d785e8b75869ef1dec6b438d150e Mon Sep 17 00:00:00 2001 From: gregstallings Date: Sat, 21 Sep 2013 16:26:53 +0200 Subject: .functions: Add `v` to open stuff in Vim Closes #251. --- .functions | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to '.functions') diff --git a/.functions b/.functions index 40ef656..7d2a83d 100644 --- a/.functions +++ b/.functions @@ -261,8 +261,9 @@ function m() { mate "$@" fi } -# `s` with no arguments opens the current directory in Sublime, otherwise opens -# the given location + +# `s` with no arguments opens the current directory in Sublime Text, otherwise +# opens the given location function s() { if [ $# -eq 0 ]; then subl . @@ -270,3 +271,13 @@ function s() { subl "$@" fi } + +# `v` with no arguments opens the current directory in Vim, otherwise opens the +# given location +function v() { + if [ $# -eq 0 ]; then + vim . + else + vim "$@" + fi +} -- cgit v1.2.3