From 8f6a05d7eb584d6d40ba0bfd4cd28f36477e1d61 Mon Sep 17 00:00:00 2001 From: Michael Campagnaro Date: Sun, 10 Apr 2016 20:59:36 -0400 Subject: [PATCH] Choose vim shell based on running platform --- vimrc | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/vimrc b/vimrc index 87c1ab7..d0990ad 100644 --- a/vimrc +++ b/vimrc @@ -1,11 +1,22 @@ scriptencoding utf-8 set encoding=utf-8 + +" Store the current system name so that we can conditionally set configs for +" different platforms +let s:uname = system("echo -n \"$(uname)\"") + +function! IsWindows() + if s:uname =~ "mingw" + return 1 + endif + return 0 +endfunction + let mapleader="," set nocompatible filetype off - """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " PLUGINS """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" @@ -67,7 +78,14 @@ set switchbuf=useopen set numberwidth=5 set showtabline=2 set winwidth=79 -set shell=zsh + +if IsWindows() + " Just assume we don't have a zsh shell + set shell=bash +else + set shell=zsh +endif + " Prevent Vim from clobbering the scrollback buffer. See " http://www.shallowsky.com/linux/noaltscreen.html set t_ti= t_te=