better compat for windows

This commit is contained in:
2016-02-23 16:43:44 -08:00
parent be01ceb18c
commit 4cb7e78c35

60
vimrc
View File

@@ -1,4 +1,4 @@
"set shell=/bin/sh
" set shell=/bin/sh
scriptencoding utf-8
set encoding=utf-8
set shortmess=I "turn off splash screen
@@ -9,11 +9,11 @@ let have_plug=filereadable(plug_path)
if(!have_plug && executable('curl'))
echo "Installing Plug"
echo '!curl -fLo ' . plug_path . ' --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
echo '!curl -fLo "' . plug_path . '" --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
endif
if(have_plug)
call plug#begin('~/.vim/plugged')
call plug#begin(vim_files . '/plugged')
Plug 'w0ng/vim-hybrid' " Hybrid colorscheme
Plug 'vim-airline/vim-airline' " Status bar
Plug 'vim-airline/vim-airline-themes' " Status bar themes
@@ -28,7 +28,6 @@ if(have_plug)
Plug 'rking/ag.vim' " Silver Searcher Support
Plug 'junegunn/rainbow_parentheses.vim' " Color matched parenthesis
Plug 'tpope/vim-commentary' " Commenting
Plug 'unblevable/quick-scope' " f/t navigation helper
" Language
Plug 'dag/vim-fish' " Fish Shell Support
@@ -47,7 +46,7 @@ if(have_plug)
" Plug 'tmux-plugins/vim-tmux' " tmux.conf
call plug#end()
if empty(glob("~/.vim/plugged"))
if empty(glob(vim_files . '/plugged'))
PlugInstall
endif
endif
@@ -66,8 +65,6 @@ set visualbell
set wildmenu "show autocomplete menu
set wildmode=full
silent! colorscheme hybrid
"Set <leader> before any key remapping
let mapleader = '\'
@@ -204,52 +201,35 @@ nmap <leader>] :bn<cr>
nmap <leader>[ :bp<cr>
nmap <leader>d :bd<cr>
if($ConEmuANSI == 'ON' && !has("gui_running"))
set term=xterm
set t_Co=256
let &t_AB="\e[48;5;%dm"
let &t_AF="\e[38;5;%dm"
inoremap <Esc>[62~ <C-X><C-E>
inoremap <Esc>[63~ <C-X><C-Y>
nnoremap <Esc>[62~ <C-E>
nnoremap <Esc>[63~ <C-Y>
endif
if has("gui_running")
"set guifont=Consolas:h10:cRUSSIAN,Lucida\ Console:h10:cRUSSIAN
set go-=mTr " disable toolbar, menubar and scrollbar
if has("win32")
set guifont=Menlo_for_Powerline:h10:cANSI
set guifont=Source_Code_Pro:h12:cANSI
endif
else
"Powerline fonts for Airline
let g:airline_powerline_fonts = 1
set mouse=a
endif
colorscheme hybrid
let g:airline_powerline_fonts = 1
let g:airline#extensions#tabline#enabled = 1
if exists("g:loaded_syntastic_checker")
nmap <leader>c :SyntasticCheck<cr>
nmap <leader>e :Errors<cr>
endif
" if exists("g:loaded_quick_scope")
" Insert into your .vimrc after quick-scope is loaded.
" Obviously depends on <https://github.com/unblevable/quick-scope> being installed.
" Thanks to @VanLaser for cleaning the code up and expanding capabilities to include e.g. `df`
let g:qs_enable = 0
let g:qs_enable_char_list = [ 'f', 'F', 't', 'T' ]
function! Quick_scope_selective(movement)
let needs_disabling = 0
if !g:qs_enable
QuickScopeToggle
redraw
let needs_disabling = 1
endif
let letter = nr2char(getchar())
if needs_disabling
QuickScopeToggle
endif
return a:movement . letter
endfunction
" quick_scope maps, operator-pending mode included (can do 'df' with hint)
for i in g:qs_enable_char_list
execute 'noremap <expr> <silent>' . i . " Quick_scope_selective('". i . "')"
endfor
" endif
set wildignore+=*/Deploy/*,*/node_modules/*,*/build/*,*/lib/*,*/jspm_packages/*
set completeopt=longest,menu,menuone