darkcloud-vimconfig/vimrc

93 lines
3.1 KiB
VimL
Raw Normal View History

"============================================================"
" "
" Darkcloud Vim Config: vimrc "
" "
" By: Kevin MacMartin (prurigro@gmail.com) "
" Website: https://github.com/prurigro/darkcloud-vimconfig "
" "
" License: MIT "
" "
"============================================================"
"darkcloud vim config folder path: {{{
2018-03-14 11:38:51 -04:00
"if you want to use darkcloud-vimconfig as a package without symlinking
"the vim folder or placing it @ /etc/darkcloud-vimconfig, create a file
"@ ~/.vim/darkcloud-path.vim and in it place the following, except with
"the path pointing to the cloned repo:
"
2018-03-14 11:38:51 -04:00
"let g:darkcloudpath = "/etc/darkcloud-vimconfig"
if filereadable(glob("~/.vim/darkcloud-path.vim"))
source ~/.vim/darkcloud-path.vim
else
let g:darkcloudpath = "/etc/darkcloud-vimconfig"
endif
"}}}
"LOAD DARKCLOUD CONFIG AND THEME FILES: {{{
"Add Config Directory: (distro-agnostic system-wide)
let &runtimepath = printf('%s,%s/vim,%s/vim/after',&runtimepath,g:darkcloudpath,g:darkcloudpath)
"Load Colour Scheme:
2018-03-14 11:38:51 -04:00
colorscheme default "hack to fix vimrc colorschemes in some versions of vim
colorscheme darkcloud
"Load Settings:
runtime config/settings.vim
2018-03-13 15:38:03 -04:00
"Initialize Plugins:
let pathogen_disabled = []
2018-03-14 11:38:51 -04:00
"configure pythonx and the python_neovim variable to determine whether deoplete should be loaded
2018-03-13 15:38:03 -04:00
if has('python3')
set pyxversion=3
redir => python_neovim_check
silent pythonx exec("import pkgutil\nneovim = pkgutil.find_loader('neovim')\nfound = neovim is not None\nprint(found)")
redir END
if substitute(python_neovim_check, '^\n*\([^\n]*\)\n*$', '\1', '') == 'True'
let g:python_neovim = 1
else
let g:python_neovim = 0
endif
else
let g:python_neovim = 0
endif
2018-03-14 11:38:51 -04:00
"disable incompatible/unnecessary plugins
2018-03-12 10:56:36 -04:00
if has('nvim')
call add(pathogen_disabled, 'vim-fixkey')
endif
if !has('python')
call add(pathogen_disabled, 'gundo.vim')
call add(pathogen_disabled, 'MatchTagAlways')
endif
2018-03-13 15:38:03 -04:00
if !g:python_neovim
call add(pathogen_disabled, 'deoplete.nvim')
call add(pathogen_disabled, 'neco-syntax')
call add(pathogen_disabled, 'nvim-yarp')
call add(pathogen_disabled, 'vim-hug-neovim-rpc')
elseif has('nvim')
call add(pathogen_disabled, 'nvim-yarp')
call add(pathogen_disabled, 'vim-hug-neovim-rpc')
endif
2018-03-14 11:38:51 -04:00
"use pathogen to load plugins that haven't been disabled
runtime bundle/vim-pathogen/autoload/pathogen.vim
"Load Keymappings:
runtime config/keyboard.vim
"Load User Config:
runtime vimrc.user
"Load Plugin Configuration:
runtime config/plugins.vim
2014-07-16 07:34:35 -04:00
"Load After Config:
runtime config/after.vim
"}}}