Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: tclem/dotfiles
base: 5be7010d3d
...
head fork: tclem/dotfiles
compare: 8f61cb29f5
Checking mergeability… Don't worry, you can still create the pull request.
  • 4 commits
  • 3 files changed
  • 0 commit comments
  • 1 contributor
Showing with 78 additions and 8 deletions.
  1. +72 −0 bin/mvim
  2. +0 −6 zsh/plugins/git/aliases.zsh
  3. +6 −2 zsh/zshrc.symlink
View
72 bin/mvim
@@ -0,0 +1,72 @@
+#!/bin/sh
+#
+# This shell script passes all its arguments to the binary inside the
+# MacVim.app application bundle. If you make links to this script as view,
+# gvim, etc., then it will peek at the name used to call it and set options
+# appropriately.
+#
+# Based on a script by Wout Mertens and suggestions from Laurent Bihanic. This
+# version is the fault of Benji Fisher, 16 May 2005 (with modifications by Nico
+# Weber and Bjorn Winckler, Aug 13 2007).
+# First, check "All the Usual Suspects" for the location of the Vim.app bundle.
+# You can short-circuit this by setting the VIM_APP_DIR environment variable
+# or by un-commenting and editing the following line:
+# VIM_APP_DIR=/Applications
+
+if [ -z "$VIM_APP_DIR" ]
+then
+ myDir="`dirname "$0"`"
+ myAppDir="$myDir/../Applications"
+ for i in ~/Applications ~/Applications/vim $myDir $myDir/vim $myAppDir $myAppDir/vim /Applications /Applications/vim /Applications/Utilities /Applications/Utilities/vim; do
+ if [ -x "$i/MacVim.app" ]; then
+ VIM_APP_DIR="$i"
+ break
+ fi
+ done
+fi
+if [ -z "$VIM_APP_DIR" ]
+then
+ echo "Sorry, cannot find MacVim.app. Try setting the VIM_APP_DIR environment variable to the directory containing MacVim.app."
+ exit 1
+fi
+binary="$VIM_APP_DIR/MacVim.app/Contents/MacOS/Vim"
+
+# Next, peek at the name used to invoke this script, and set options
+# accordingly.
+
+name="`basename "$0"`"
+gui=
+opts=
+
+# GUI mode, implies forking
+case "$name" in m*|g*|rm*|rg*) gui=true ;; esac
+
+# Restricted mode
+case "$name" in r*) opts="$opts -Z";; esac
+
+# vimdiff, view, and ex mode
+case "$name" in
+ *vimdiff)
+ opts="$opts -dO"
+ ;;
+ *view)
+ opts="$opts -R"
+ ;;
+ *ex)
+ opts="$opts -e"
+ ;;
+esac
+
+# Last step: fire up vim.
+# The program should fork by default when started in GUI mode, but it does
+# not; we work around this when this script is invoked as "gvim" or "rgview"
+# etc., but not when it is invoked as "vim -g".
+if [ "$gui" ]; then
+ # Note: this isn't perfect, because any error output goes to the
+ # terminal instead of the console log.
+ # But if you use open instead, you will need to fully qualify the
+ # path names for any filenames you specify, which is hard.
+ exec "$binary" -g $opts ${1:+"$@"}
+else
+ exec "$binary" $opts ${1:+"$@"}
+fi
View
6 zsh/plugins/git/aliases.zsh
@@ -1,9 +1,3 @@
-# Use `hub` as our git wrapper:
-# http://defunkt.github.com/hub/
-git() {
- hub "$@"
-}
-
ga() {
git add .
git add -u
View
8 zsh/zshrc.symlink
@@ -2,7 +2,7 @@
export ZSH=$HOME/.dotfiles
# your project folder that we can `c [tab]` to
-export PROJECTS=/Volumes/GitHub
+export PROJECTS=~/github
# source every .zsh file in this rep
for config_file ($ZSH/**/*.zsh) source $config_file
@@ -23,6 +23,10 @@ setopt autolist
autoload -U edit-command-line
zle -N edit-command-line
bindkey '^Xe' edit-command-line
-# bindkey -M vicmd v edit-command-line
+
+# Load up The GitHub Setup's environment.
+if [ -f "/opt/github/env.sh" ]
+ then source "/opt/github/env.sh"
+fi
eval `direnv hook $0`

No commit comments for this range

Something went wrong with that request. Please try again.