2014-04-09 08:07:12 -04:00
|
|
|
"============================================================"
|
|
|
|
" "
|
|
|
|
" Darkcloud Vim Config: vimrc "
|
|
|
|
" "
|
2014-06-17 01:49:46 -04:00
|
|
|
" By: Kevin MacMartin (prurigro@gmail.com) "
|
2014-04-09 08:07:12 -04:00
|
|
|
" Website: https://github.com/prurigro/darkcloud-vimconfig "
|
|
|
|
" "
|
|
|
|
" License: MIT "
|
|
|
|
" "
|
|
|
|
"============================================================"
|
2014-02-20 23:24:20 -05:00
|
|
|
|
2014-07-25 23:50:05 -04:00
|
|
|
"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:
|
2014-04-08 03:39:10 -04:00
|
|
|
"
|
2018-03-14 11:38:51 -04:00
|
|
|
"let g:darkcloudpath = "/etc/darkcloud-vimconfig"
|
2014-04-08 03:39:10 -04:00
|
|
|
|
|
|
|
if filereadable(glob("~/.vim/darkcloud-path.vim"))
|
|
|
|
source ~/.vim/darkcloud-path.vim
|
|
|
|
else
|
2018-03-11 23:37:17 -04:00
|
|
|
let g:darkcloudpath = "/etc/darkcloud-vimconfig"
|
2014-04-08 03:39:10 -04:00
|
|
|
endif
|
|
|
|
"}}}
|
|
|
|
|
Tons of changes all in one commit because I'd broken a commit a while
back and opted to simply reverse them all- Lots of colour changes, the
update script now removes decommissioned bundles, gentags script can now
have additional paths added to it when generating a tags file, README is
much improved, fixed a few issues that required remapping some toggles,
fixed a bunch of issues with the colourscheme between the terminal and
gvim. You can now setup a custom config file to have loaded after the
darkcloud-vimconfig ones, and there's a custom location for pathogen
modules too, to make things tidier without necessarily needing to use
an additional runtimepath. You can also create a file in your home
directory to assign filetypes to programs, for use with the file
manager. A file can be placed in ~/.vim/ with file associations and
prorams to launch them with. The file manager will also open a file with
vim by hitting shift+enter, since e isn't all that comfortablly placed.
The vimrc can now also point to the darkcloud-vimconfig folder, rather
than relying on the vim folder being in a specific location, and the
after folder is now configured to work in the project too.
2014-04-04 19:49:02 -04:00
|
|
|
"LOAD DARKCLOUD CONFIG AND THEME FILES: {{{
|
|
|
|
"Add Config Directory: (distro-agnostic system-wide)
|
2018-03-11 23:37:17 -04:00
|
|
|
let &runtimepath = printf('%s,%s/vim,%s/vim/after',&runtimepath,g:darkcloudpath,g:darkcloudpath)
|
2014-04-03 06:17:16 -04:00
|
|
|
|
2023-05-30 00:41:59 -04:00
|
|
|
"Load Colours
|
2023-08-17 16:17:46 -04:00
|
|
|
if &term != "linux"
|
|
|
|
runtime colors/palette.vim
|
2023-05-30 00:41:59 -04:00
|
|
|
|
2023-08-17 16:17:46 -04:00
|
|
|
"Load Colour Scheme:
|
|
|
|
colorscheme default "hack to fix vimrc colorschemes in some versions of vim
|
|
|
|
colorscheme darkcloud
|
|
|
|
endif
|
2014-07-25 23:50:05 -04:00
|
|
|
|
Tons of changes all in one commit because I'd broken a commit a while
back and opted to simply reverse them all- Lots of colour changes, the
update script now removes decommissioned bundles, gentags script can now
have additional paths added to it when generating a tags file, README is
much improved, fixed a few issues that required remapping some toggles,
fixed a bunch of issues with the colourscheme between the terminal and
gvim. You can now setup a custom config file to have loaded after the
darkcloud-vimconfig ones, and there's a custom location for pathogen
modules too, to make things tidier without necessarily needing to use
an additional runtimepath. You can also create a file in your home
directory to assign filetypes to programs, for use with the file
manager. A file can be placed in ~/.vim/ with file associations and
prorams to launch them with. The file manager will also open a file with
vim by hitting shift+enter, since e isn't all that comfortablly placed.
The vimrc can now also point to the darkcloud-vimconfig folder, rather
than relying on the vim folder being in a specific location, and the
after folder is now configured to work in the project too.
2014-04-04 19:49:02 -04:00
|
|
|
"Load Settings:
|
|
|
|
runtime config/settings.vim
|
2014-02-20 23:24:20 -05:00
|
|
|
|
2018-03-13 15:38:03 -04:00
|
|
|
"Initialize Plugins:
|
2024-02-23 16:13:01 -05:00
|
|
|
let g:pathogen_disabled = get(g:, "pathogen_disabled", [])
|
2017-02-12 18:55:17 -05:00
|
|
|
|
2018-03-13 15:38:03 -04:00
|
|
|
if has('python3')
|
2020-02-28 00:16:49 -05:00
|
|
|
"configure pythonx and check for the python-neovim and python-msgpack libraries if python3 is found
|
2018-03-15 13:55:29 -04:00
|
|
|
if !has('nvim')
|
|
|
|
set pyxversion=3
|
|
|
|
endif
|
2018-03-13 15:38:03 -04:00
|
|
|
|
2020-02-28 00:16:49 -05:00
|
|
|
"check for python-neovim
|
2018-03-13 15:38:03 -04:00
|
|
|
redir => python_neovim_check
|
2018-03-15 13:55:29 -04:00
|
|
|
silent python3 exec("import pkgutil\nneovim = pkgutil.find_loader('neovim')\nfound = neovim is not None\nprint(found)")
|
2018-03-13 15:38:03 -04:00
|
|
|
redir END
|
|
|
|
|
|
|
|
if substitute(python_neovim_check, '^\n*\([^\n]*\)\n*$', '\1', '') == 'True'
|
|
|
|
let g:python_neovim = 1
|
|
|
|
else
|
|
|
|
let g:python_neovim = 0
|
|
|
|
endif
|
|
|
|
|
2020-02-28 00:16:49 -05:00
|
|
|
"check for python-msgpack
|
|
|
|
redir => python_msgpack_check
|
|
|
|
silent python3 exec("import pkgutil\nmsgpack = pkgutil.find_loader('msgpack')\nfound = msgpack is not None\nprint(found)")
|
|
|
|
redir END
|
2018-03-12 10:56:36 -04:00
|
|
|
|
2020-02-28 00:16:49 -05:00
|
|
|
if substitute(python_msgpack_check, '^\n*\([^\n]*\)\n*$', '\1', '') == 'True'
|
|
|
|
let g:python_msgpack = 1
|
|
|
|
else
|
|
|
|
let g:python_msgpack = 0
|
|
|
|
endif
|
|
|
|
else
|
|
|
|
"if python isn't available disable plugins that depend on it and set library variables to false
|
2024-02-23 16:13:01 -05:00
|
|
|
call add(g:pathogen_disabled, 'MatchTagAlways')
|
2020-02-28 00:16:49 -05:00
|
|
|
let g:python_neovim = 0
|
|
|
|
let g:python_msgpack = 0
|
2017-02-12 18:55:17 -05:00
|
|
|
endif
|
2017-02-12 19:08:28 -05:00
|
|
|
|
2022-04-23 23:44:37 -04:00
|
|
|
"don't load vim-gutentags if ctags can't be found
|
|
|
|
if !executable('ctags')
|
2024-02-23 16:13:01 -05:00
|
|
|
call add(g:pathogen_disabled, 'vim-gutentags')
|
2022-04-23 23:44:37 -04:00
|
|
|
endif
|
|
|
|
|
2020-02-28 00:16:49 -05:00
|
|
|
if !g:python_neovim || !g:python_msgpack
|
|
|
|
"don't load deoplete if either of its python dependencies are missing
|
2024-02-23 16:13:01 -05:00
|
|
|
call add(g:pathogen_disabled, 'deoplete.nvim')
|
|
|
|
call add(g:pathogen_disabled, 'neco-syntax')
|
|
|
|
call add(g:pathogen_disabled, 'nvim-yarp')
|
|
|
|
call add(g:pathogen_disabled, 'vim-hug-neovim-rpc')
|
2018-03-13 15:38:03 -04:00
|
|
|
elseif has('nvim')
|
2020-02-28 00:16:49 -05:00
|
|
|
"don't load the neovim compatibility plugins required by deoplete if actually running neovim
|
2024-02-23 16:13:01 -05:00
|
|
|
call add(g:pathogen_disabled, 'nvim-yarp')
|
|
|
|
call add(g:pathogen_disabled, 'vim-hug-neovim-rpc')
|
2018-03-13 11:49:47 -04:00
|
|
|
endif
|
|
|
|
|
2023-02-06 15:52:28 -05:00
|
|
|
"disable autocompletion logic when running in vimpager mode
|
|
|
|
if exists('g:vimpager.enabled')
|
2024-02-23 16:13:01 -05:00
|
|
|
call add(g:pathogen_disabled, 'deoplete.nvim')
|
|
|
|
call add(g:pathogen_disabled, 'neco-syntax')
|
|
|
|
call add(g:pathogen_disabled, 'nvim-yarp')
|
|
|
|
call add(g:pathogen_disabled, 'vim-hug-neovim-rpc')
|
2023-02-06 15:52:28 -05:00
|
|
|
endif
|
|
|
|
|
2018-03-14 11:38:51 -04:00
|
|
|
"use pathogen to load plugins that haven't been disabled
|
Tons of changes all in one commit because I'd broken a commit a while
back and opted to simply reverse them all- Lots of colour changes, the
update script now removes decommissioned bundles, gentags script can now
have additional paths added to it when generating a tags file, README is
much improved, fixed a few issues that required remapping some toggles,
fixed a bunch of issues with the colourscheme between the terminal and
gvim. You can now setup a custom config file to have loaded after the
darkcloud-vimconfig ones, and there's a custom location for pathogen
modules too, to make things tidier without necessarily needing to use
an additional runtimepath. You can also create a file in your home
directory to assign filetypes to programs, for use with the file
manager. A file can be placed in ~/.vim/ with file associations and
prorams to launch them with. The file manager will also open a file with
vim by hitting shift+enter, since e isn't all that comfortablly placed.
The vimrc can now also point to the darkcloud-vimconfig folder, rather
than relying on the vim folder being in a specific location, and the
after folder is now configured to work in the project too.
2014-04-04 19:49:02 -04:00
|
|
|
runtime bundle/vim-pathogen/autoload/pathogen.vim
|
2014-02-20 23:24:20 -05:00
|
|
|
|
Tons of changes all in one commit because I'd broken a commit a while
back and opted to simply reverse them all- Lots of colour changes, the
update script now removes decommissioned bundles, gentags script can now
have additional paths added to it when generating a tags file, README is
much improved, fixed a few issues that required remapping some toggles,
fixed a bunch of issues with the colourscheme between the terminal and
gvim. You can now setup a custom config file to have loaded after the
darkcloud-vimconfig ones, and there's a custom location for pathogen
modules too, to make things tidier without necessarily needing to use
an additional runtimepath. You can also create a file in your home
directory to assign filetypes to programs, for use with the file
manager. A file can be placed in ~/.vim/ with file associations and
prorams to launch them with. The file manager will also open a file with
vim by hitting shift+enter, since e isn't all that comfortablly placed.
The vimrc can now also point to the darkcloud-vimconfig folder, rather
than relying on the vim folder being in a specific location, and the
after folder is now configured to work in the project too.
2014-04-04 19:49:02 -04:00
|
|
|
"Load Keymappings:
|
|
|
|
runtime config/keyboard.vim
|
2014-02-20 23:24:20 -05:00
|
|
|
|
2014-04-09 08:07:12 -04:00
|
|
|
"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
|
Tons of changes all in one commit because I'd broken a commit a while
back and opted to simply reverse them all- Lots of colour changes, the
update script now removes decommissioned bundles, gentags script can now
have additional paths added to it when generating a tags file, README is
much improved, fixed a few issues that required remapping some toggles,
fixed a bunch of issues with the colourscheme between the terminal and
gvim. You can now setup a custom config file to have loaded after the
darkcloud-vimconfig ones, and there's a custom location for pathogen
modules too, to make things tidier without necessarily needing to use
an additional runtimepath. You can also create a file in your home
directory to assign filetypes to programs, for use with the file
manager. A file can be placed in ~/.vim/ with file associations and
prorams to launch them with. The file manager will also open a file with
vim by hitting shift+enter, since e isn't all that comfortablly placed.
The vimrc can now also point to the darkcloud-vimconfig folder, rather
than relying on the vim folder being in a specific location, and the
after folder is now configured to work in the project too.
2014-04-04 19:49:02 -04:00
|
|
|
"}}}
|