2017-12-21 12:18:17 -06:00
|
|
|
" vim compatibility
|
2017-02-28 10:56:23 -06:00
|
|
|
let $vimdir = $HOME.'/.vim'
|
|
|
|
if has('nvim')
|
|
|
|
let $vimdir = $HOME.'/.config/nvim'
|
|
|
|
endif
|
|
|
|
|
2018-07-13 12:08:08 -05:00
|
|
|
" utf8 encoding
|
|
|
|
if has('vim_starting')
|
|
|
|
set encoding=utf8
|
|
|
|
endif
|
|
|
|
|
|
|
|
" os detection functions
|
2017-02-28 10:56:23 -06:00
|
|
|
silent function! OSX()
|
|
|
|
return has('macunix')
|
|
|
|
endfunction
|
|
|
|
silent function! LINUX()
|
|
|
|
return has('unix') && !has('macunix') && !has('win32unix')
|
|
|
|
endfunction
|
|
|
|
silent function! WINDOWS()
|
|
|
|
return (has('win32') || has('win64'))
|
|
|
|
endfunction
|
|
|
|
|
|
|
|
" load a per-environment file if one exists
|
2018-07-13 12:08:08 -05:00
|
|
|
if filereadable(expand('$HOME/.env_init.vim'))
|
2017-02-28 10:56:23 -06:00
|
|
|
source "$HOME/.env_init.vim"
|
|
|
|
endif
|
|
|
|
|
2018-11-01 22:44:07 -05:00
|
|
|
" initialize plugin manager
|
|
|
|
if has('nvim')
|
|
|
|
call plug#begin('~/.config/nvim/bundle')
|
|
|
|
else
|
|
|
|
call plug#begin('~/.vim/bundle')
|
|
|
|
endif
|
|
|
|
|
2018-07-13 12:08:08 -05:00
|
|
|
let pluginsfile=$vimdir.'/plugins.vim'
|
|
|
|
exec 'source ' . pluginsfile
|
2017-02-08 11:54:30 -06:00
|
|
|
|
2018-11-01 22:44:07 -05:00
|
|
|
call plug#end()
|
|
|
|
|
2017-02-08 11:54:30 -06:00
|
|
|
filetype on
|
|
|
|
filetype indent on
|
|
|
|
filetype plugin on
|
|
|
|
|
2017-12-21 12:18:17 -06:00
|
|
|
let settingsfile=$vimdir.'/settings.vim'
|
|
|
|
exec 'source ' . settingsfile
|
2017-07-12 02:20:50 -05:00
|
|
|
|
2018-07-13 12:08:08 -05:00
|
|
|
let commandsfile=$vimdir.'/commands.vim'
|
|
|
|
exec 'source ' . commandsfile
|
2017-02-08 11:54:30 -06:00
|
|
|
|
2017-12-21 12:18:17 -06:00
|
|
|
let bindingsfile=$vimdir.'/bindings.vim'
|
|
|
|
exec 'source ' . bindingsfile
|
2018-11-08 07:32:36 -06:00
|
|
|
|
|
|
|
" load a per-environment file if one exists
|
|
|
|
if filereadable(expand('$HOME/.env_init_after.vim'))
|
|
|
|
source "$HOME/.env_init_after.vim"
|
|
|
|
endif
|
|
|
|
|