Choose vim shell based on running platform

This commit is contained in:
Michael Campagnaro 2016-04-10 20:59:36 -04:00
parent 68443dda3c
commit 8f6a05d7eb

22
vimrc
View File

@ -1,11 +1,22 @@
scriptencoding utf-8 scriptencoding utf-8
set encoding=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="," let mapleader=","
set nocompatible set nocompatible
filetype off filetype off
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" PLUGINS " PLUGINS
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
@ -67,7 +78,14 @@ set switchbuf=useopen
set numberwidth=5 set numberwidth=5
set showtabline=2 set showtabline=2
set winwidth=79 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 " Prevent Vim from clobbering the scrollback buffer. See
" http://www.shallowsky.com/linux/noaltscreen.html " http://www.shallowsky.com/linux/noaltscreen.html
set t_ti= t_te= set t_ti= t_te=