Skip to content

Instantly share code, notes, and snippets.

@KeithHanlan
KeithHanlan / vi-wrapper.sh
Last active August 29, 2015 14:11
GVim wrapper for git repo-specific servers
#!/bin/bash
# This wrapper is in response to Neils de Vos' blog post
# "Changing vim settings depending on the git repository containing the file"
# (http://blog.nixpanic.net/2013/01/changing-vim-settings-depending-on-git.html)
#
# Since different repos have different coding standards, I want to be able to use Neils' method
# of selectively setting editor options based on file location. This is made simpler if I don't
# need to worry about making these settings buffer local. So, for example, if I only want to trim
# trailing whitespace and expand tabs in some some repos, I can have the following in my ~/.vimrc
# fun! <SID>ExpandTabs()