1
0
Fork 0
mirror of https://github.com/notwa/rc synced 2024-11-05 05:39:02 -08:00

~windows~

This commit is contained in:
Connor Olding 2015-03-08 15:59:44 -07:00
parent 4d1fb72141
commit 1f91a521cf

View file

@ -7,6 +7,37 @@ if has('multi_byte')
set encoding=utf-8 " and the default file is in it set encoding=utf-8 " and the default file is in it
endif endif
" awful things
if has("win32")
let msys='/MinGW/msys/1.0/bin'
let &shell=msys.'/bash.exe'
set shellcmdflag=-c
set shellxquote=\"
set shellslash
" assume directory structure:
" something/anything/.vimrc " this was passed to vim by the -u switch
" something/vim/
" something/vim/after
let $MYVIMRC=expand('<sfile>')
let rcvim=expand('<sfile>:p:h:h').'/vim'
let &backupdir=rcvim.'/backup'
if !exists('win32_once')
let win32_once=1
let $PATH.=';'.msys
let &runtimepath=rcvim.','.&runtimepath.','.rcvim.'/after'
endif
else
set backupdir=~/.vim/backup " put tilde files elsewhere
endif
try
call mkdir(&backupdir, "p")
catch E739
" it probably succeeded anyway
endtry
if (&term =~ "^xterm") " enable colors on any xterm if (&term =~ "^xterm") " enable colors on any xterm
let &t_Co=256 let &t_Co=256
let &t_AF="\e[38;5;%dm" let &t_AF="\e[38;5;%dm"
@ -19,20 +50,23 @@ if has('syntax')
endif endif
if has('gui_running') if has('gui_running')
set guioptions-=m " hide menu set guioptions-=M " skip loading $VIMRUNTIME/menu.vim
set guioptions-=m " hide menu which isn't loaded anyway
set guioptions-=T " hide toolbar set guioptions-=T " hide toolbar
set guioptions-=r " hide scrollbar
set guifont=Consolas:h9 set guifont=Consolas:h9
set columns=84 set columns=84
set lines=36 set lines=36
cd $HOME " might not be ideal... cd $HOME " might not be ideal...
colorscheme candycode
else
colorscheme Tomorrow-Night
set colorcolumn=79
endif endif
try
colorscheme Tomorrow-Night
catch E185
endtry
set colorcolumn=79
set history=512 " command lines to remember set history=512 " command lines to remember
set ruler " write out the cursor position set ruler " write out the cursor position
@ -48,9 +82,6 @@ set suffixes=.bak,~,.swp,.o,.log,.out
set noerrorbells visualbell t_vb= " disable bells set noerrorbells visualbell t_vb= " disable bells
" TODO: check if dir exists
set backupdir=~/.vim/backup " put tilde files elsewhere
set scrolloff=3 " row context during scrolling set scrolloff=3 " row context during scrolling
set sidescrolloff=2 " col context during scrolling set sidescrolloff=2 " col context during scrolling
@ -79,6 +110,8 @@ set diffopt+=iwhite " ignore whitespace in diff command
set nowrap set nowrap
set nolinebreak set nolinebreak
set ffs=unix,dos " ffs indeed
set tabstop=8 shiftwidth=8 smarttab " 8 space tabs set tabstop=8 shiftwidth=8 smarttab " 8 space tabs
fu! TabFour() fu! TabFour()
@ -98,6 +131,10 @@ if has('autocmd')
au FileType ruby call TabTwo() au FileType ruby call TabTwo()
augroup END augroup END
augroup fuckbells " good lord vim you are archaic
au GUIEnter * set vb t_vb=
augroup END
augroup reload " http://superuser.com/a/417997 augroup reload " http://superuser.com/a/417997
au! au!
au BufWritePost .vimrc,_vimrc,vimrc so $MYVIMRC au BufWritePost .vimrc,_vimrc,vimrc so $MYVIMRC
@ -198,5 +235,7 @@ else
endif endif
endif endif
" TODO: check if pathogen is installed try
execute pathogen#infect() execute pathogen#infect()
catch E117
endtry