Begin port to neovim exclusive config

This commit is contained in:
Kevin MacMartin 2024-03-01 16:28:35 -05:00
parent dd31bbfd5c
commit 690b882d55
19 changed files with 233 additions and 416 deletions

2
.gitignore vendored
View file

@ -1,2 +1,2 @@
vim/bundle.user/* vim/bundle.user/*
vim/vimrc.user vim/user.vim

15
.gitmodules vendored
View file

@ -16,15 +16,6 @@
[submodule "vim/bundle/vim-togglelist"] [submodule "vim/bundle/vim-togglelist"]
path = vim/bundle/vim-togglelist path = vim/bundle/vim-togglelist
url = https://github.com/milkypostman/vim-togglelist.git url = https://github.com/milkypostman/vim-togglelist.git
[submodule "vim/bundle/unite.vim"]
path = vim/bundle/unite.vim
url = https://github.com/Shougo/unite.vim.git
[submodule "vim/bundle/vimfiler.vim"]
path = vim/bundle/vimfiler.vim
url = https://github.com/Shougo/vimfiler.vim.git
[submodule "vim/bundle/tcomment_vim"]
path = vim/bundle/tcomment_vim
url = https://github.com/tomtom/tcomment_vim.git
[submodule "vim/bundle/vim-fugitive"] [submodule "vim/bundle/vim-fugitive"]
path = vim/bundle/vim-fugitive path = vim/bundle/vim-fugitive
url = https://github.com/tpope/vim-fugitive.git url = https://github.com/tpope/vim-fugitive.git
@ -76,12 +67,6 @@
[submodule "vim/bundle/deoplete.nvim"] [submodule "vim/bundle/deoplete.nvim"]
path = vim/bundle/deoplete.nvim path = vim/bundle/deoplete.nvim
url = https://github.com/Shougo/deoplete.nvim url = https://github.com/Shougo/deoplete.nvim
[submodule "vim/bundle/nvim-yarp"]
path = vim/bundle/nvim-yarp
url = https://github.com/roxma/nvim-yarp
[submodule "vim/bundle/vim-hug-neovim-rpc"]
path = vim/bundle/vim-hug-neovim-rpc
url = https://github.com/roxma/vim-hug-neovim-rpc
[submodule "vim/bundle/neco-syntax"] [submodule "vim/bundle/neco-syntax"]
path = vim/bundle/neco-syntax path = vim/bundle/neco-syntax
url = https://github.com/Shougo/neco-syntax.git url = https://github.com/Shougo/neco-syntax.git

89
init.vim Normal file
View file

@ -0,0 +1,89 @@
"============================================================="
" "
" Darkcloud Neovim Config: vimrc "
" "
" By: Kevin MacMartin (prurigro@gmail.com) "
" Website: https://github.com/prurigro/darkcloud-nvimconfig "
" "
" License: MIT "
" "
"============================================================="
"darkcloud neovim config folder path: {{{
"the location of darkcloud-nvimconfig (default is /etc/darkcloud-nvimconfig)
let g:darkcloudpath = get(g:, "darkcloudpath", "/etc/darkcloud-nvimconfig")
"}}}
"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 Colours
if &term != "linux"
runtime colors/palette.vim
"Load Colour Scheme:
colorscheme darkcloud
endif
"Load Settings:
runtime config/settings.vim
"Initialize Plugins:
let g:pathogen_disabled = get(g:, "pathogen_disabled", [])
if has('python3')
"check for python-neovim
redir => python_neovim_check
silent python3 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
"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
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
call add(g:pathogen_disabled, 'MatchTagAlways')
let g:python_neovim = 0
let g:python_msgpack = 0
endif
"don't load vim-gutentags if ctags can't be found
if !executable('ctags')
call add(g:pathogen_disabled, 'vim-gutentags')
endif
if !g:python_neovim || !g:python_msgpack
"don't load deoplete if either of its python dependencies are missing
call add(g:pathogen_disabled, 'deoplete.nvim')
call add(g:pathogen_disabled, 'neco-syntax')
endif
"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 user.vim
"Load Plugin Configuration:
runtime config/plugins.vim
"Load After Config:
runtime config/after.vim
"}}}

View file

@ -1,6 +1,6 @@
# darkcloud-vimconfig # darkcloud-nvimconfig
A theme, config and collection of plugins for Vim. A theme, config and collection of plugins for Neovim
## Requirements ## Requirements
@ -26,47 +26,34 @@ A theme, config and collection of plugins for Vim.
* **Plugins**: A set of plugins have been included and configured to provide support for most normally-unsupported filetypes, and a set of features useful when using Vim as an editor. * **Plugins**: A set of plugins have been included and configured to provide support for most normally-unsupported filetypes, and a set of features useful when using Vim as an editor.
* **Custom Configuration**: A second vimrc and bundle folder are included that aren't maintained as part of the repo, making custom plugins and configuration easy to add. * **Custom Configuration**: A second vimrc and bundle folder are included that aren't maintained as part of the repo, making custom plugins and configuration easy to add.
![Darkcloud Vim Distribution Theme](https://i.imgur.com/oIqgie0.png)
![Darkcloud Vimconfig Update Tool](https://i.imgur.com/AOXSL7S.png)
## Installation ## Installation
1. Clone the darkcloud-vimconfig repo and use the _update_ script to install the plugins: 1. Clone the darkcloud-nvimconfig repo and run the `update` script.
* `git clone https://github.com/prurigro/darkcloud-vimconfig.git` 2. By default the config expects darkcloud-nvimconfig to be installed @ `/etc/darkcloud-nvimconfig`, if you're installing it elsewhere you should add `let g:darkcloudpath = "/path/to/darkcloud-nvimconfig"` to your neovim init.
* `./darkcloud-vimconfig/update` (if you don't want colour output, run: `./darkcloud-vimconfig/update --no-colour` instead) 3. Add `source /path/to/darkcloud-nvimconfig/init.vim` to the neovim init that you want to use the config with
* **Note**: The _update_ script requires bash, but if it's not available you can enter the _darkcloud-vimconfig/_ folder and run: `git submodule update --init` to install the plugins manually, then create _vim/vimrc.user_ and remember to run: `:Helptags` once everything else is running.
2. If you don't know where vim expects to find your vimrc, start vim and run: `:version` to find the values "user vimrc file" (for a single-user install) and "system vimrc file" (for a system-wide install). T
3. Copy or symlink the vimrc file from `darkcloud-vimconfig/vimrc` to one of the locations vim expects to find it, based on whether you want a local or system-wide install, then choose one of the following:
* Edit the _g:darkcloudpath_ variable in the vimrc file itself, pointing it to the location you're keeping the _darkcloud-vimconfig_ repo folder.
* Create a file @ _~/.vim/darkcloud-path.vim_ and in it put the following: `let g:darkcloudpath="/etc/darkcloud-vimconfig"`, but replacing _"/etc/darkcloud-vimconfig"_ with the path to the _darkcloud-vimconfig_ repo folder.
* Place _darkcloud-vimconfig_ in the default location @ _/etc/darkcloud-vimconfig_.
* Create your own vimrc and have that set the _g:darkcloudpath_ variable before sourcing the included vimrc.
### Vimpager ### Vimpager
You can configure your PAGER to use darkcloud-vimconfig using vimpager by adding the following to your bashrc (assuming the default path @ _"/etc/darkcloud-vimconfig"_): You can configure your PAGER to use darkcloud-nvimconfig using vimpager by adding the following to your bashrc (assuming the default path @ _"/etc/darkcloud-nvimconfig"_):
``` ```
export PAGER=/etc/darkcloud-vimconfig/vim/bundle/vimpager/vimpager export PAGER=/etc/darkcloud-nvimconfig/vim/bundle/vimpager/vimpager
alias less="$PAGER" alias less="$PAGER"
alias zless="$PAGER" alias zless="$PAGER"
``` ```
## Configuration ## Configuration
* **Configure Variables**: The following variables can be added to _vim/vimrc.user_ and have their values set to the values you require: * **Configure Variables**: The following variables can be added to `vim/user.vim` and have their values set to the values you require:
* `g:autostartchecker`: **1** = Check syntax once an appropriate file is loaded | **0** = Check syntax only after syntax checking is toggled on (_default_: **0**) * `g:autostartchecker`: **1** = Check syntax once an appropriate file is loaded | **0** = Check syntax only after syntax checking is toggled on (_default_: **0**)
* `g:autostarttagbar`: **1** = Have the tagbar load automatically when a compatible format is run | **0** = The tagbar will stay hidden until triggered on demand with its toggle (_default_: **0**) * `g:autostarttagbar`: **1** = Have the tagbar load automatically when a compatible format is run | **0** = The tagbar will stay hidden until triggered on demand with its toggle (_default_: **0**)
* `g:disablecompletion`: **1** = Disable _deoplete_ autocompletion | **0** = Enable _deoplete _autocompletion_ if the requirements are met (_default_: **0**) * `g:disablecompletion`: **1** = Disable _deoplete_ autocompletion | **0** = Enable _deoplete _autocompletion_ if the requirements are met (_default_: **0**)
* `g:disableautotags`: **1** = Prevent tags from being automatically generated and highlighted | **0** = Automatically generate and highlight tags (_default_: **0**) * `g:disableautotags`: **1** = Prevent tags from being automatically generated and highlighted | **0** = Automatically generate and highlight tags (_default_: **0**)
* `g:disablelinebreaks`: **1** = Override filetype plugins so linebreaks never occur | **0** = Linebreaks are disabled by default, but filetype plugins can override this setting (_default_: **0**) * `g:disablelinebreaks`: **1** = Override filetype plugins so linebreaks never occur | **0** = Linebreaks are disabled by default, but filetype plugins can override this setting (_default_: **0**)
* `g:powerlinefonts`: **1** = Render the statusline using characters available with powerline-patched fonts | **0** = Render the statusbar with less attractive but more compatible characters available in all fonts (_default_: **0**) * `g:powerlinefonts`: **1** = Render the statusline using characters available with powerline-patched fonts | **0** = Render the statusbar with less attractive but more compatible characters available in all fonts (_default_: **0**)
* **Custom Settings**: Settings with priority over those set by darkcloud-vimconfig can be added to a file named _vimrc.user_, located in _darkcloud-vimconfig/vim/_ or any of the folders in the runtimepath. * **Custom Settings**: Settings with priority over those set by darkcloud-nvimconfig can be added to `vim/user.vim` or any of the folders in the runtimepath.
* **Custom Plugins**: Pathogen compatible plugins can be cloned or extracted to "darkcloud-vimconfig/vim/bundle.user/", or a folder named "bundle" or "bundle.user" in any of the folders in the runtimepath. * **Custom Plugins**: Pathogen compatible plugins can be cloned or extracted to `darkcloud-nvimconfig/vim/bundle.user/`, or a folder named `bundle` in any of the folders in the runtimepath.
* **File Associations**: To use the file manager in vim to run files with external programs, create "~/.vim/filetypes.vim" and on each line, write an association between a file extension and the program to launch files of that type that looks like: `call vimfiler#set_execute_file('mp4','xdg-open')`. * **Update Script**: (requires: bash+git) Use the `update` script to update the project and submodules, as well as handle any required maintenance, generate docs from the pathogen plugins and create missing config scripts with preset values.
* **Update Script**: (requires: bash+git) Use this to update the project and submodules, as well as handle any required maintenance, generate docs from the pathogen plugins and create missing config scripts with preset values.
* **Generate System Tags**: (requires: bash+ctags) Generate a list of ctags for your system libraries in _/usr/include_ and _/usr/local/include_ as well as any folders passed as arguments by running the _gentags_ script.
## Mappings ## Mappings
@ -94,12 +81,11 @@ alias zless="$PAGER"
#### Sidebars #### Sidebars
| Binding | Mode | Action | | Binding | Mode | Action |
|------------|----------|-----------------------------------------------| |-----------------|------|-----------------------------------------------|
| F9 or \+} | ALL or N | Toggle git history for the current file | | F11 or Leader+[ | N | Toggle git history for the current file |
| F10 or \+{ | ALL or N | Toggle the **tagbar** source code tag sidebar | | F12 or Leader+] | N | Toggle the **tagbar** source code tag sidebar |
| F11 or \+\ | ALL or N | Toggle the location list for **ale** issues | | Leader+Leader | N | Toggle the location list for **ale** issues |
| F12 or \+[ | ALL or N | Toggle **vimfiler** file manager sidebar |
#### Toggles #### Toggles
@ -113,7 +99,7 @@ alias zless="$PAGER"
| F4 | ALL | Toggle source code syntax checking | | F4 | ALL | Toggle source code syntax checking |
| | | | | | | |
| \` | N | Toggle gutter (left bar with line numbers etc.) | | \` | N | Toggle gutter (left bar with line numbers etc.) |
| Backslash+? | N | Toggle the **vim** reference manual | | Leader+? | N | Toggle the **vim** reference manual |
#### Spell Check #### Spell Check
@ -136,25 +122,15 @@ alias zless="$PAGER"
| Leader+T | N | Convert all spaces into tabs and continue session with tabs | | Leader+T | N | Convert all spaces into tabs and continue session with tabs |
| Leader+w | N | Remove all trailing whitespace | | Leader+w | N | Remove all trailing whitespace |
#### GVim
| Binding | Mode | Action |
|--------------|------|-----------------------|
| Backslash+F1 | ALL | Toggle the menubar |
| Backslash+F2 | ALL | Toggle the toolbar |
| Backslash+F3 | ALL | Toggle the scrollbars |
### Complete Reference ### Complete Reference
For a complete list of mappings specific to **darkcloud-vimconfig**, check the list in the comments at the top of [vim/config/keyboard.vim](https://github.com/prurigro/darkcloud-vimconfig/blob/master/vim/config/keyboard.vim). For a complete list of mappings specific to **darkcloud-nvimconfig**, check the list in the comments at the top of [vim/config/keyboard.vim](https://github.com/prurigro/darkcloud-nvimconfig/blob/master/vim/config/keyboard.vim).
## Plugins ## Plugins
* [ale](https://github.com/w0rp/ale): Asynchronous Lint Engine * [ale](https://github.com/w0rp/ale): Asynchronous Lint Engine
* [deoplete.nvim](https://github.com/Shougo/deoplete.nvim): Dark powered asynchronous completion framework for neovim/Vim8 * [deoplete.nvim](https://github.com/Shougo/deoplete.nvim): Dark powered asynchronous completion framework for neovim/Vim8
* [neco-syntax](https://github.com/Shougo/neco-syntax): Syntax source for neocomplete/deoplete/ncm * [neco-syntax](https://github.com/Shougo/neco-syntax): Syntax source for neocomplete/deoplete/ncm
* [nvim-yarp](https://github.com/roxma/nvim-yarp): Yet Another Remote Plugin Framework for Neovim
* [vim-hug-neovim-rpc](https://github.com/roxma/vim-hug-neovim-rpc): A compatibility layer for neovim rpc client working on vim8
* [editorconfig-vim](https://github.com/editorconfig/editorconfig-vim): EditorConfig plugin for Vim that auto-configures certain settings when a .editorconfig file is present * [editorconfig-vim](https://github.com/editorconfig/editorconfig-vim): EditorConfig plugin for Vim that auto-configures certain settings when a .editorconfig file is present
* [incsearch.vim](https://github.com/haya14busa/incsearch.vim): Improved incremental searching for Vim. * [incsearch.vim](https://github.com/haya14busa/incsearch.vim): Improved incremental searching for Vim.
* [lightline.vim](https://github.com/itchyny/lightline.vim): A light and configurable statusline/tabline for Vim. * [lightline.vim](https://github.com/itchyny/lightline.vim): A light and configurable statusline/tabline for Vim.
@ -166,26 +142,23 @@ For a complete list of mappings specific to **darkcloud-vimconfig**, check the l
* [tagbar](https://github.com/majutsushi/tagbar): Uses ctags to generate a sidebar of the tags for the current file. * [tagbar](https://github.com/majutsushi/tagbar): Uses ctags to generate a sidebar of the tags for the current file.
* [tcommand_vim](https://github.com/tomtom/tcommand_vim): Select commands, menu items etc. from a list. * [tcommand_vim](https://github.com/tomtom/tcommand_vim): Select commands, menu items etc. from a list.
* [tlib_vim](https://github.com/tomtom/tlib_vim): Some utility functions for VIM. * [tlib_vim](https://github.com/tomtom/tlib_vim): Some utility functions for VIM.
* [tcomment_vim](https://github.com/tomtom/tcomment_vim): File-type sensible comments that can be easily toggled on and off for blocks of text.
* [unite.vim](https://github.com/Shougo/unite.vim): A library used by Vim Filer to help build its user interface.
* [vim-fugitive](https://github.com/tpope/vim-fugitive): A wrapper integrating git into vim in such a way as to provide features neither of them could offer on their own. * [vim-fugitive](https://github.com/tpope/vim-fugitive): A wrapper integrating git into vim in such a way as to provide features neither of them could offer on their own.
* [vim-gutentags](https://github.com/xolox/vim-easytags): A plugin that takes care of the much needed management of tags files in Vim. * [vim-gutentags](https://github.com/xolox/vim-easytags): A plugin that takes care of the much needed management of tags files in Vim.
* [vim-move](https://github.com/matze/vim-move): Provides a few convenient ways to move selected text. * [vim-move](https://github.com/matze/vim-move): Provides a few convenient ways to move selected text.
* [vim-pathogen](https://github.com/tpope/vim-pathogen): A plugin to load other plugins while keeping them isolated in their own directory structure rather than all dumped together. * [vim-pathogen](https://github.com/tpope/vim-pathogen): A plugin to load other plugins while keeping them isolated in their own directory structure rather than all dumped together.
* [vim-polyglot-darkcloud](https://github.com/prurigro/vim-polyglot-darkcloud): The darkcloud-vimconfig fork of a meta-package that attempts to provide the best syntax plugins for each file type. * [vim-polyglot-darkcloud](https://github.com/prurigro/vim-polyglot-darkcloud): The darkcloud-nvimconfig fork of a meta-package that attempts to provide the best syntax plugins for each file type.
* [vim-signify](https://github.com/mhinz/vim-signify): When a version controlled file is changed, this displays a column showing where and how, and allows for navigation to and between differences. * [vim-signify](https://github.com/mhinz/vim-signify): When a version controlled file is changed, this displays a column showing where and how, and allows for navigation to and between differences.
* [vim-surround](https://github.com/tpope/vim-surround): Provides functionality to exchange surrounding delimiters and xml-style tags with another, or simply remove them. * [vim-surround](https://github.com/tpope/vim-surround): Provides functionality to exchange surrounding delimiters and xml-style tags with another, or simply remove them.
* [vim-repeat](https://github.com/tpope/vim-repeat): A library used by vim-surround to allow its delimiter-switching functions to be repeated with the `.` command. * [vim-repeat](https://github.com/tpope/vim-repeat): A library used by vim-surround to allow its delimiter-switching functions to be repeated with the `.` command.
* [vim-togglelist](https://github.com/milkypostman/vim-togglelist): A simple plugin for vim that allows you to bind a key to toggle the Location List and the Quickfix List. * [vim-togglelist](https://github.com/milkypostman/vim-togglelist): A simple plugin for vim that allows you to bind a key to toggle the Location List and the Quickfix List.
* [vim-trailing-whitespace](https://github.com/bronson/vim-trailing-whitespace): Highlights and allows for the easy removal of trailing whitespace in documents. * [vim-trailing-whitespace](https://github.com/bronson/vim-trailing-whitespace): Highlights and allows for the easy removal of trailing whitespace in documents.
* [vim-unimpaired](https://github.com/tpope/vim-unimpaired): Pairs of handy bracket mappings. * [vim-unimpaired](https://github.com/tpope/vim-unimpaired): Pairs of handy bracket mappings.
* [vimfiler.vim](https://github.com/Shougo/vimfiler.vim): A curses-style file manager for vim that runs on it's own or in a sidebar and can associate handlers for file types.
* [vimpager](https://github.com/rkitover/vimpager): Pager using vim and less.vim * [vimpager](https://github.com/rkitover/vimpager): Pager using vim and less.vim
## Credits ## Credits
* By Kevin MacMartin: [GitHub Projects](https://github.com/prurigro?tab=repositories) | [Arch Linux AUR Packages](https://aur.archlinux.org/packages/?SeB=m&K=prurigro) * By Kevin MacMartin: [GitHub Projects](https://github.com/prurigro?tab=repositories) | [Arch Linux AUR Packages](https://aur.archlinux.org/packages/?SeB=m&K=prurigro)
* The [vim-markdown](https://github.com/plasticboy/vim-markdown) plugin **TableFormat** command, used to format tables in markdown files, was pulled into [plugins.vim](https://github.com/prurigro/darkcloud-vimconfig/blob/master/vim/config/plugins.vim) from [ftplugin/mkd](https://github.com/plasticboy/vim-markdown/blob/master/ftplugin/mkd.vim). * The [vim-markdown](https://github.com/plasticboy/vim-markdown) plugin **TableFormat** command, used to format tables in markdown files, was pulled into [plugins.vim](https://github.com/prurigro/darkcloud-nvimconfig/blob/master/vim/config/plugins.vim) from [ftplugin/mkd](https://github.com/plasticboy/vim-markdown/blob/master/ftplugin/mkd.vim).
## License ## License

27
update
View file

@ -1,8 +1,8 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# #
# Darkcloud Vim Config Update Tool # Darkcloud Neovim Config Update Tool
# https://github.com/prurigro/darkcloud-vimconfig # https://github.com/prurigro/darkcloud-nvimconfig
# #
# Written by Kevin MacMartin (prurigro@gmail.com) # Written by Kevin MacMartin (prurigro@gmail.com)
# Released under the MIT license # Released under the MIT license
@ -47,7 +47,7 @@ function error {
# show_version: displays version information # show_version: displays version information
function show_version { function show_version {
printf '%s\n' "$script_name: darkcloud-vimconfig update tool (version: $repo_version)" printf '%s\n' "$script_name: darkcloud-nvimconfig update tool (version: $repo_version)"
} }
# show_help: this function displays help output # show_help: this function displays help output
@ -57,7 +57,7 @@ function show_help {
printf '%s\n' 'OPTIONS' printf '%s\n' 'OPTIONS'
printf ' %s\t%s\n' '-v, --version' '| output version information and exit' printf ' %s\t%s\n' '-v, --version' '| output version information and exit'
printf ' %s\t%s\n\n' '-h, --help' '| display this help and exit' printf ' %s\t%s\n\n' '-h, --help' '| display this help and exit'
printf '%s\n' 'Run with no arguments to update darkcloud-vimconfig' printf '%s\n' 'Run with no arguments to update darkcloud-nvimconfig'
} }
### SETUP ### SETUP
@ -96,7 +96,7 @@ cd "$script_home" || exit
} }
# display script title # display script title
printf '\n%s\n' "$cbg_black ~~~ DarkCloud Vimconfig Update Tool ~~~ $c_reset" printf '\n%s\n' "$cbg_black ~~~ DarkCloud Neovim Config Update Tool ~~~ $c_reset"
# create vim/bundle.user if it doesn't exist # create vim/bundle.user if it doesn't exist
[[ -d 'vim/bundle.user' ]] || { [[ -d 'vim/bundle.user' ]] || {
@ -111,10 +111,10 @@ printf '\n%s\n' "$cbg_black ~~~ DarkCloud Vimconfig Update Tool ~~~ $c_reset"
fi fi
} }
# create vim/vimrc.user if it doesn't exist # create vim/user.vim if it doesn't exist
[[ -e 'vim/vimrc.user' ]] || { [[ -e 'vim/user.vim' ]] || {
printf '\n%s' "$cbg_blue >> Creating user config file:$c_reset" printf '\n%s' "$cbg_blue >> Creating user config file:$c_reset"
process_status="$(touch 'vim/vimrc.user' 2>&1)" process_status="$(touch 'vim/user.vim' 2>&1)"
if (( ! $? )); then if (( ! $? )); then
{ {
@ -123,23 +123,22 @@ printf '\n%s\n' "$cbg_black ~~~ DarkCloud Vimconfig Update Tool ~~~ $c_reset"
printf '%s\n%s\n\n' '"Disable Completion: (1:disable completion | *0:enable completion if requirements are met)' '"let g:disablecompletion = 0' printf '%s\n%s\n\n' '"Disable Completion: (1:disable completion | *0:enable completion if requirements are met)' '"let g:disablecompletion = 0'
printf '%s\n%s\n\n' '"Disable automatic tag generation and highlighting: (1:force disabled tag generation and highlighting | *0:enable automatic tag generation and highlighting)' '"let g:disableautotags = 0' printf '%s\n%s\n\n' '"Disable automatic tag generation and highlighting: (1:force disabled tag generation and highlighting | *0:enable automatic tag generation and highlighting)' '"let g:disableautotags = 0'
printf '%s\n%s\n\n' '"Disable automatic linebreaking: (1:force disabled globally | *0:let the filetype decide)' '"let g:disablelinebreaks = 0' printf '%s\n%s\n\n' '"Disable automatic linebreaking: (1:force disabled globally | *0:let the filetype decide)' '"let g:disablelinebreaks = 0'
printf '%s\n%s\n\n' '"Enable Powerline fonts: (1:expect powerline font | *0:expect regular font)' '"let g:powerlinefonts = 0 "(set powerline font for gvim and terminal when enabled)' printf '%s\n%s' '"Enable Powerline fonts: (1:expect powerline font | *0:expect regular font)' '"let g:powerlinefonts = 0 "(use powerline font glyphs when enabled)'
printf '%s\n%s\n' '"GVim font selection: (Escaping spaces and use powerline if appropriate)' '"set guifont=Monospace\ 12' } >> vim/user.vim
} >> vim/vimrc.user
if [[ -e 'vim/vimrc.user' ]]; then if [[ -e 'vim/user.vim' ]]; then
printf '%s\n' "$cfg_green_bold SUCCESS! $c_reset" printf '%s\n' "$cfg_green_bold SUCCESS! $c_reset"
else else
printf '%s\n' "$cfg_red_bold FAIL! $c_reset" printf '%s\n' "$cfg_red_bold FAIL! $c_reset"
fi fi
else else
printf '%s\n' "$cfg_red_bold FAIL! $c_reset" printf '%s\n' "$cfg_red_bold FAIL! $c_reset"
error "touch vim/vimrc.user" "User config couldn't be created" "$process_status" error "touch vim/user.vim" "User config couldn't be created" "$process_status"
fi fi
} }
### REPO UPDATE ### REPO UPDATE
printf '\n%s' "$cbg_blue >> Updating darkcloud-vimconfig:$c_reset" printf '\n%s' "$cbg_blue >> Updating darkcloud-nvimconfig:$c_reset"
process_status="$(git pull origin master 2>&1)" process_status="$(git pull origin master 2>&1)"
if (( ! $? )); then if (( ! $? )); then

View file

@ -1,6 +1,6 @@
# Darkcloud Vim Theme, Custom Plugins Folder # Custom Plugins Folder
## Instructions ## Instructions
1. Clone the repositories of pathogen-compatible plugins here to have them loaded when vim runs. 1. Clone the repositories of pathogen-compatible plugins here to have them loaded when vim runs.
2. Configure these plugins using the vimrc.user file located in the directory below this after running the `update` script. 2. Configure these plugins using the `user.vim` file located in the directory below this after running the `update` script.

@ -1 +0,0 @@
Subproject commit bb5f5e038bfe119d3b777845a76b0b919b35ebc8

@ -1 +0,0 @@
Subproject commit 90eaf759099bcd47aa0471f974109d7fd78e4eea

@ -1 +0,0 @@
Subproject commit 0ccb3f7988d61a9a86525374be97360bd20db6bc

@ -1 +0,0 @@
Subproject commit 93ae38792bc197c3bdffa2716ae493c67a5e7957

@ -1 +0,0 @@
Subproject commit 1c1d2b4f9e70c0b48bcf11bf51c482b8a2d776a8

View file

@ -1,13 +1,13 @@
"============================================================" "============================================================="
" " " "
" Darkcloud Vim Config: theme " " Darkcloud Neovim Config: theme "
" " " "
" By: Kevin MacMartin (prurigro@gmail.com) " " By: Kevin MacMartin (prurigro@gmail.com) "
" Website: https://github.com/prurigro/darkcloud-vimconfig " " Website: https://github.com/prurigro/darkcloud-nvimconfig "
" " " "
" License: MIT " " License: MIT "
" " " "
"============================================================" "============================================================="
"remove all the colours before writing our own "remove all the colours before writing our own
hi clear hi clear

View file

@ -1,13 +1,13 @@
"============================================================" "============================================================="
" " " "
" Darkcloud Vim Config: settings to load after " " Darkcloud Neovim Config: settings to load after "
" " " "
" By: Kevin MacMartin (prurigro@gmail.com) " " By: Kevin MacMartin (prurigro@gmail.com) "
" Website: https://github.com/prurigro/darkcloud-vimconfig " " Website: https://github.com/prurigro/darkcloud-nvimconfig "
" " " "
" License: MIT " " License: MIT "
" " " "
"============================================================" "============================================================="
"load the system version of matchit if another hasn't already been "load the system version of matchit if another hasn't already been
if !exists('g:loaded_matchit') && findfile('plugin/matchit.vim', &rtp) ==# '' if !exists('g:loaded_matchit') && findfile('plugin/matchit.vim', &rtp) ==# ''
@ -67,8 +67,8 @@ autocmd FileChangedRO * nested set noreadonly
autocmd VimEnter,FilterWritePre * if &diff|setlocal nofoldenable|endif autocmd VimEnter,FilterWritePre * if &diff|setlocal nofoldenable|endif
autocmd VimEnter * if &diff|wincmd H|endif autocmd VimEnter * if &diff|wincmd H|endif
"disable the whitespace plugin for vimfiler "disable the whitespace plugin for mail
autocmd BufEnter,FileType vimfiler,mail hi ExtraWhitespace ctermbg=NONE guibg=NONE autocmd BufEnter,FileType mail hi ExtraWhitespace ctermbg=NONE guibg=NONE
"vimpager settings "vimpager settings
if exists('g:vimpager.enabled') if exists('g:vimpager.enabled')

View file

@ -1,13 +1,13 @@
"============================================================" "============================================================="
" " " "
" Darkcloud Vim Config: keyboard settings " " Darkcloud Neovim Config: keyboard settings "
" " " "
" By: Kevin MacMartin (prurigro@gmail.com) " " By: Kevin MacMartin (prurigro@gmail.com) "
" Website: https://github.com/prurigro/darkcloud-vimconfig " " Website: https://github.com/prurigro/darkcloud-nvimconfig "
" " " "
" License: MIT " " License: MIT "
" " " "
"============================================================" "============================================================="
" "
"Aliases: "Aliases:
" :GitLog & :gitlog | (C) -> show a navigatable log of commit history " :GitLog & :gitlog | (C) -> show a navigatable log of commit history
@ -54,8 +54,6 @@
" <Alt-n> | (N) -> go to the next open tab " <Alt-n> | (N) -> go to the next open tab
" <Alt-p> | (N) -> go to the previous open tab " <Alt-p> | (N) -> go to the previous open tab
" <Alt-t> | (N) -> open a new tab " <Alt-t> | (N) -> open a new tab
" <Alt-c> | (N) -> create a new tab with vimfiler
" <Alt-d> | (N) -> create a new tab with a double pane vimfiler
" "
" (split) " (split)
" <Ctrl-w>{ | (N) -> rotate counter-clockwise " <Ctrl-w>{ | (N) -> rotate counter-clockwise
@ -91,19 +89,11 @@
" <F3> | (A) -> toggle external-paste mode " <F3> | (A) -> toggle external-paste mode
" <F4> | (A) -> toggle syntax checking " <F4> | (A) -> toggle syntax checking
" "
" <F9> | (A) -> toggle git commit history " <F11> | (N) -> toggle git commit history
" <Leader>} | (N) -> toggle git commit history " <Leader>[ | (N) -> toggle git commit history
" <F10> | (A) -> toggle the tagbar sidebar " <F12> | (N) -> toggle the tagbar sidebar
" <Leader>{ | (N) -> toggle the tagbar sidebar " <Leader>] | (N) -> toggle the tagbar sidebar
" <F11> | (A) -> toggle the location list
" <Leader><Leader> | (N) -> toggle the location list " <Leader><Leader> | (N) -> toggle the location list
" <F12> | (A) -> toggle vimfiler sidebar
" <Leader>[ | (N) -> toggle vimfiler sidebar
"
" (gvim toggles)
" <Leader><F1> | (A) -> toggle the menubar
" <Leader><F2> | (A) -> toggle the toolbar
" <Leader><F3> | (A) -> toggle the scrollbars
" "
" (spellcheck) " (spellcheck)
" ?+ | (N) -> add the selected word to the local dictionary " ?+ | (N) -> add the selected word to the local dictionary
@ -117,16 +107,16 @@
" p | (V) -> preserve the buffer pasting over selected text " p | (V) -> preserve the buffer pasting over selected text
" Y | (N) -> copy to the end of the line " Y | (N) -> copy to the end of the line
" "
" (delete/cut operations that don't replace the paste buffer) " (delete/cut operations that don't replace the paste buffer)
" <Leader>x | (N) -> delete the char(s) under and the cursor " <Leader>x | (N) -> delete the char(s) under and the cursor
" <Leader>x | (V) -> delete the currently selected text " <Leader>x | (V) -> delete the currently selected text
" <Leader>X | (N) -> delete the char(s) before the cursor " <Leader>X | (N) -> delete the char(s) before the cursor
" <Leader>X | (V) -> delete the currently selected lines " <Leader>X | (V) -> delete the currently selected lines
" <Leader>D | (N) -> delete from the cursor to EOL " <Leader>D | (N) -> delete from the cursor to EOL
" <Leader>D | (V) -> delete the currently selected lines " <Leader>D | (V) -> delete the currently selected lines
" <Leader>dw | (N) -> delete from the cursor to end of the word " <Leader>dw | (N) -> delete from the cursor to end of the word
" <Leader>dd | (N) -> delete current line " <Leader>dd | (N) -> delete current line
" <Leader>d | (V) -> delete selected text " <Leader>d | (V) -> delete selected text
" "
" (fixing-and-formatting) " (fixing-and-formatting)
" <Leader>J | (N) -> split document into lines of tw or 80 " <Leader>J | (N) -> split document into lines of tw or 80
@ -219,16 +209,6 @@
" <Leader>. | (N) -> replace diff in other pane with current pane " <Leader>. | (N) -> replace diff in other pane with current pane
" <Leader<< | (N) -> replace diff in current pane with other pane " <Leader<< | (N) -> replace diff in current pane with other pane
" <Leader<, | (N) -> replace diff in current pane with other pane " <Leader<, | (N) -> replace diff in current pane with other pane
"
" (vimfiler)
" <LClick> | (A) -> left click + left justify the cursor
" <MClick> | (A) -> same as the left click
" <RClick> | (A) -> same as the left click
" <LClick><LClick> | (A) -> edit selected file
" <Right> | (A) -> map to l, which opens a directory
" <Left> | (A) -> map to h, which goes up one directory
" ' | (A) -> edit the selected file
" n | (A) -> start editing a new file
"DISABLED DEFAULT MAPPING: UNSET SHORTCUTS {{{ "DISABLED DEFAULT MAPPING: UNSET SHORTCUTS {{{
"-unmapping tabbing from < and > for use with diff "-unmapping tabbing from < and > for use with diff
@ -393,8 +373,6 @@
nnoremap <silent><expr> <A-n> ':tabnext<CR>' nnoremap <silent><expr> <A-n> ':tabnext<CR>'
nnoremap <silent><expr> <A-p> ':tabprev<CR>' nnoremap <silent><expr> <A-p> ':tabprev<CR>'
nnoremap <silent><expr> <A-t> ':tabnew<CR>' nnoremap <silent><expr> <A-t> ':tabnew<CR>'
nnoremap <silent><expr> <A-c> ':VimFiler -tab -project<CR>'
nnoremap <silent><expr> <A-d> ':VimFiler -tab -project -double<CR>'
"} "}
"SPLIT:{ "SPLIT:{
@ -466,45 +444,15 @@
inoremap <silent><expr> <F4> '<C-O>:call ToggleAle()<CR>' inoremap <silent><expr> <F4> '<C-O>:call ToggleAle()<CR>'
"view commit history and diffs "view commit history and diffs
nnoremap <expr><silent> <F9> ':vs<CR>:0Gclog<CR>:wincmd b<CR>' nnoremap <expr><silent> <F11> ':vs<CR>:0Gclog<CR>:wincmd b<CR>'
xnoremap <expr><silent> <F9> '<Esc>:vs<CR>:0Gclog<CR>:wincmd b<CR>' nnoremap <silent><expr> <Leader>[ ':vs<CR>:0Gclog<CR>:wincmd b<CR>'
inoremap <expr><silent> <F9> '<Esc>:vs<CR>:0Gclog<CR>:wincmd b<CR>'
nnoremap <silent><expr> <Leader>} ':vs<CR>:0Gclog<CR>:wincmd b<CR>'
"bindings to trigger the tagbar list of tags "bindings to trigger the tagbar list of tags
nnoremap <silent><expr> <F10> ':TagbarToggle<CR>:echo "tagbar toggled"<CR>' nnoremap <silent><expr> <F12> ':TagbarToggle<CR>:echo "tagbar toggled"<CR>'
xnoremap <silent><expr> <F10> '<Esc>:TagbarToggle<CR>gv' nnoremap <silent><expr> <Leader>] ':TagbarToggle<CR>:echo "tagbar toggled"<CR>'
inoremap <silent><expr> <F10> '<C-O>:TagbarToggle<CR>'
nnoremap <silent><expr> <Leader>{ ':TagbarToggle<CR>:echo "tagbar toggled"<CR>'
"toggle the location list "toggle the location list
nnoremap <silent><expr> <F11> ':call ToggleLocationList()<CR>'
xnoremap <silent><expr> <F11> '<Esc>:call ToggleLocationList()<CR>'
inoremap <silent><expr> <F11> '<C-O>:call ToggleLocationList()<CR>'
nnoremap <silent><expr> <Leader><Leader> ':call ToggleLocationList()<CR>' nnoremap <silent><expr> <Leader><Leader> ':call ToggleLocationList()<CR>'
"trigger vimfiler
nnoremap <silent><expr> <F12> ':VimFiler -split -simple -toggle -no-quit -direction=topleft -winwidth=45<CR>'
xnoremap <silent><expr> <F12> '<Esc>:VimFiler -split -simple -toggle -no-quit -direction=topleft -winwidth=45<CR>'
inoremap <silent><expr> <F12> '<Esc>:VimFiler -split -simple -toggle -no-quit -direction=topleft -winwidth=45<CR>'
nnoremap <silent><expr> <Leader>[ ':VimFiler -split -simple -toggle -no-quit -direction=topleft -winwidth=45<CR>'
"}
"GVIM TOGGLES:{
"toggle the menu
nnoremap <silent><expr> <Leader><F1> ":if &go=~#'m'<Bar>set go-=m<Bar>else<Bar>set go+=m<Bar>endif<CR>:echo 'Menu bar toggled'<CR>"
vnoremap <silent><expr> <Leader><F1> "<Esc>:if &go=~#'m'<Bar>set go-=m<Bar>else<Bar>set go+=m<Bar>endif<CR>gv"
inoremap <silent><expr> <Leader><F1> "<C-O>:if &go=~#'m'<Bar>set go-=m<Bar>else<Bar>set go+=m<Bar>endif<CR>"
"toggle the toolbar
nnoremap <silent><expr> <Leader><F2> ":if &go=~#'T'<Bar>set go-=T<Bar>else<Bar>set go+=T<Bar>endif<CR>:echo 'Toolbar toggled'<CR>"
vnoremap <silent><expr> <Leader><F2> "<Esc>:if &go=~#'T'<Bar>set go-=T<Bar>else<Bar>set go+=T<Bar>endif<CR>gv"
inoremap <silent><expr> <Leader><F2> "<C-O>:if &go=~#'T'<Bar>set go-=T<Bar>else<Bar>set go+=T<Bar>endif<CR>"
"toggle the scrollbars
nnoremap <silent><expr> <Leader><F3> ":if &go=~#'l'<Bar>set go-=lRb<Bar>else<Bar>set go+=lRb<Bar>endif<CR>:echo 'Scrollbars toggled'<CR>"
vnoremap <silent><expr> <Leader><F3> "<Esc>:if &go=~#'l'<Bar>set go-=lRb<Bar>else<Bar>set go+=lRb<Bar>endif<CR>gv"
inoremap <silent><expr> <Leader><F3> "<C-O>:if &go=~#'l'<Bar>set go-=lRb<Bar>else<Bar>set go+=lRb<Bar>endif<CR>"
"} "}
"SPELLCHECK:{ "SPELLCHECK:{
@ -685,60 +633,51 @@
autocmd FilterWritePre * if &diff|nmap <buffer> <Leader>< do|endif autocmd FilterWritePre * if &diff|nmap <buffer> <Leader>< do|endif
autocmd FilterWritePre * if &diff|nmap <buffer> <Leader>, do|endif autocmd FilterWritePre * if &diff|nmap <buffer> <Leader>, do|endif
autocmd FilterWritePre * if &diff|cabbrev q! qall!|endif autocmd FilterWritePre * if &diff|cabbrev q! qall!|endif
"vimfiler
autocmd FileType vimfiler map <buffer> <LeftMouse> <LeftMouse>0
autocmd FileType vimfiler map <buffer> <MiddleMouse> <LeftMouse>
autocmd FileType vimfiler map <buffer> <RightMouse> <LeftMouse>
autocmd FileType vimfiler map <buffer> <2-LeftMouse> <Plug>(vimfiler_edit_file)
autocmd FileType vimfiler map <buffer> <Right> l
autocmd FileType vimfiler map <buffer> <Left> h
autocmd FileType vimfiler map <buffer> ' e
"}}} "}}}
"MAPPINGS DISABLED FOR GIVEN FILETYPES: {{{ "MAPPINGS DISABLED FOR GIVEN FILETYPES: {{{
"remove incompatible toggles from specific file types "remove incompatible toggles from specific file types
autocmd Filetype help,tagbar,qf,vimfiler noremap <buffer> ` <Nop> autocmd Filetype help,tagbar,qf noremap <buffer> ` <Nop>
autocmd Filetype help,tagbar,qf,vimfiler,diff noremap <buffer> <F9> <Nop> autocmd Filetype help,tagbar,qf,diff noremap <buffer> <F9> <Nop>
autocmd Filetype help,tagbar,qf,vimfiler,diff noremap <buffer> <C-F9> <Nop> autocmd Filetype help,tagbar,qf,diff noremap <buffer> <C-F9> <Nop>
autocmd Filetype help,tagbar,qf,vimfiler,diff noremap <buffer> <A-F9> <Nop> autocmd Filetype help,tagbar,qf,diff noremap <buffer> <A-F9> <Nop>
autocmd Filetype help,tagbar,qf,vimfiler,diff noremap <buffer> <Leader>} <Nop> autocmd Filetype help,tagbar,qf,diff noremap <buffer> <Leader>} <Nop>
autocmd Filetype help,qf,vimfiler noremap <buffer> <F10> <Nop> autocmd Filetype help,qf noremap <buffer> <F10> <Nop>
autocmd Filetype help,qf,vimfiler noremap <buffer> <C-F10> <Nop> autocmd Filetype help,qf noremap <buffer> <C-F10> <Nop>
autocmd Filetype help,qf,vimfiler noremap <buffer> <A-F10> <Nop> autocmd Filetype help,qf noremap <buffer> <A-F10> <Nop>
autocmd Filetype help,qf,vimfiler noremap <buffer> <Leader>{ <Nop> autocmd Filetype help,qf noremap <buffer> <Leader>{ <Nop>
autocmd Filetype help,tagbar,qf,vimfiler noremap <buffer> <F11> <Nop> autocmd Filetype help,tagbar,qf noremap <buffer> <F11> <Nop>
autocmd Filetype help,tagbar,qf,vimfiler noremap <buffer> <C-F11> <Nop> autocmd Filetype help,tagbar,qf noremap <buffer> <C-F11> <Nop>
autocmd Filetype help,tagbar,qf,vimfiler noremap <buffer> <A-F11>] <Nop> autocmd Filetype help,tagbar,qf noremap <buffer> <A-F11>] <Nop>
autocmd Filetype help,tagbar,qf,vimfiler noremap <buffer> <Leader> <Nop> autocmd Filetype help,tagbar,qf noremap <buffer> <Leader> <Nop>
autocmd Filetype help,tagbar,qf noremap <buffer> <F12> <Nop> autocmd Filetype help,tagbar,qf noremap <buffer> <F12> <Nop>
autocmd Filetype help,tagbar,qf noremap <buffer> <C-F12> <Nop> autocmd Filetype help,tagbar,qf noremap <buffer> <C-F12> <Nop>
autocmd Filetype help,tagbar,qf noremap <buffer> <A-F12> <Nop> autocmd Filetype help,tagbar,qf noremap <buffer> <A-F12> <Nop>
autocmd Filetype help,tagbar,qf noremap <buffer> <Leader>[ <Nop> autocmd Filetype help,tagbar,qf noremap <buffer> <Leader>[ <Nop>
"disable modifier keys with directions that would interfere with logic "disable modifier keys with directions that would interfere with logic
autocmd Filetype qf,vimfiler noremap <buffer> <C-Up> <Nop> autocmd Filetype qf noremap <buffer> <C-Up> <Nop>
autocmd Filetype qf,vimfiler noremap <buffer> <C-k> <Nop> autocmd Filetype qf noremap <buffer> <C-k> <Nop>
autocmd Filetype qf,vimfiler noremap <buffer> <C-Down> <Nop> autocmd Filetype qf noremap <buffer> <C-Down> <Nop>
autocmd Filetype qf,vimfiler noremap <buffer> <C-j> <Nop> autocmd Filetype qf noremap <buffer> <C-j> <Nop>
autocmd Filetype qf,vimfiler noremap <buffer> <C-Right> <Nop> autocmd Filetype qf noremap <buffer> <C-Right> <Nop>
autocmd Filetype qf,vimfiler noremap <buffer> <C-l> <Nop> autocmd Filetype qf noremap <buffer> <C-l> <Nop>
autocmd Filetype qf,vimfiler noremap <buffer> <C-Left> <Nop> autocmd Filetype qf noremap <buffer> <C-Left> <Nop>
autocmd Filetype qf,vimfiler noremap <buffer> <C-h> <Nop> autocmd Filetype qf noremap <buffer> <C-h> <Nop>
autocmd Filetype qf,vimfiler noremap <buffer> <A-Up> <Nop> autocmd Filetype qf noremap <buffer> <A-Up> <Nop>
autocmd Filetype qf,vimfiler noremap <buffer> <A-k> <Nop> autocmd Filetype qf noremap <buffer> <A-k> <Nop>
autocmd Filetype qf,vimfiler noremap <buffer> <A-Down> <Nop> autocmd Filetype qf noremap <buffer> <A-Down> <Nop>
autocmd Filetype qf,vimfiler noremap <buffer> <A-j> <Nop> autocmd Filetype qf noremap <buffer> <A-j> <Nop>
autocmd Filetype qf,vimfiler noremap <buffer> <A-Right> <Nop> autocmd Filetype qf noremap <buffer> <A-Right> <Nop>
autocmd Filetype qf,vimfiler noremap <buffer> <A-l> <Nop> autocmd Filetype qf noremap <buffer> <A-l> <Nop>
autocmd Filetype qf,vimfiler noremap <buffer> <A-Left> <Nop> autocmd Filetype qf noremap <buffer> <A-Left> <Nop>
autocmd Filetype qf,vimfiler noremap <buffer> <A-h> <Nop> autocmd Filetype qf noremap <buffer> <A-h> <Nop>
autocmd Filetype qf,vimfiler noremap <buffer> <S-Up> <Nop> autocmd Filetype qf noremap <buffer> <S-Up> <Nop>
autocmd Filetype qf,vimfiler noremap <buffer> <S-k> <Nop> autocmd Filetype qf noremap <buffer> <S-k> <Nop>
autocmd Filetype qf,vimfiler noremap <buffer> <S-Down> <Nop> autocmd Filetype qf noremap <buffer> <S-Down> <Nop>
autocmd Filetype qf,vimfiler noremap <buffer> <S-j> <Nop> autocmd Filetype qf noremap <buffer> <S-j> <Nop>
autocmd Filetype qf,vimfiler noremap <buffer> <S-Right> <Nop> autocmd Filetype qf noremap <buffer> <S-Right> <Nop>
autocmd Filetype qf,vimfiler noremap <buffer> <S-l> <Nop> autocmd Filetype qf noremap <buffer> <S-l> <Nop>
autocmd Filetype qf,vimfiler noremap <buffer> <S-Left> <Nop> autocmd Filetype qf noremap <buffer> <S-Left> <Nop>
autocmd Filetype qf,vimfiler noremap <buffer> <S-h> <Nop> autocmd Filetype qf noremap <buffer> <S-h> <Nop>
"}}} "}}}

View file

@ -1,13 +1,13 @@
"============================================================" "============================================================="
" " " "
" Darkcloud Vim Config: plugin settings " " Darkcloud Neovim Config: plugin settings "
" " " "
" By: Kevin MacMartin (prurigro@gmail.com) " " By: Kevin MacMartin (prurigro@gmail.com) "
" Website: https://github.com/prurigro/darkcloud-vimconfig " " Website: https://github.com/prurigro/darkcloud-nvimconfig "
" " " "
" License: MIT " " License: MIT "
" " " "
"============================================================" "============================================================="
"use utf-8 encoding to load the script as it contains utf-8 characters "use utf-8 encoding to load the script as it contains utf-8 characters
scriptencoding utf-8 scriptencoding utf-8
@ -18,10 +18,6 @@ scriptencoding utf-8
call mkdir(glob("~/.vim/gutentags"),'p') call mkdir(glob("~/.vim/gutentags"),'p')
endif endif
if !filereadable(glob("~/.vim/filetypes.vim"))
new|silent e ~/.vim/filetypes.vim|silent w|q
endif
"load plugins in vim/bundle/ and vim/bundle.user/ "load plugins in vim/bundle/ and vim/bundle.user/
execute pathogen#infect('bundle/{}', 'bundle.user/{}') execute pathogen#infect('bundle/{}', 'bundle.user/{}')
"}}} "}}}

View file

@ -1,6 +1,3 @@
let g:unite_force_overwrite_statusline = 0
let g:vimfiler_force_overwrite_statusline = 0
function! LLModified() function! LLModified()
return &ft =~ 'help' ? '' : &modified ? '*' : &modifiable ? '' : '-' return &ft =~ 'help' ? '' : &modified ? '*' : &modifiable ? '' : '-'
endfunction endfunction
@ -14,8 +11,6 @@ function! LLFilename()
return return
\ fname == '__Tagbar__.1' ? g:lightline.fname : \ fname == '__Tagbar__.1' ? g:lightline.fname :
\ &ft == 'vimfiler' ? vimfiler#get_status_string() :
\ &ft == 'unite' ? unite#get_status_string() :
\ &ft == 'qf' ? '[Error/Location List]' : \ &ft == 'qf' ? '[Error/Location List]' :
\ ('' != LLReadonly() ? LLReadonly() . ' ' : '') . \ ('' != LLReadonly() ? LLReadonly() . ' ' : '') .
\ ('' != fname ? fname : '[NEW]') . \ ('' != fname ? fname : '[NEW]') .
@ -23,7 +18,7 @@ function! LLFilename()
endfunction endfunction
function! LLFugitive() function! LLFugitive()
if expand('%:t') !~? 'Tagbar' && &ft !~? 'vimfiler' && exists('*FugitiveHead') if expand('%:t') !~? 'Tagbar' && exists('*FugitiveHead')
let mark = '' "edit here for cool mark let mark = '' "edit here for cool mark
let _ = FugitiveHead() let _ = FugitiveHead()
return strlen(_) ? mark._ : '' return strlen(_) ? mark._ : ''
@ -48,8 +43,6 @@ function! LLMode()
let fname = expand('%:t') let fname = expand('%:t')
return fname == '__Tagbar__' ? 'Tagbar' : return fname == '__Tagbar__' ? 'Tagbar' :
\ &ft == 'unite' ? 'Unite' :
\ &ft == 'vimfiler' ? 'VimFiler' :
\ winwidth(0) > 60 ? lightline#mode() : '' \ winwidth(0) > 60 ? lightline#mode() : ''
endfunction endfunction

View file

@ -1,18 +0,0 @@
let g:vimfiler_as_default_explorer = 1
let g:vimfiler_safe_mode_by_default = 0
let g:vimfiler_enable_auto_cd = 1
let g:vimfiler_tree_indentation = 2
let g:vimfiler_explorer_columns = 'type:time'
let g:vimfiler_tree_closed_icon = '▸' "['▶', '▼'], ['▸', '▾'], ['▷', '◢']
let g:vimfiler_tree_opened_icon = '▾'
let g:vimfiler_file_icon = '-'
let g:vimfiler_marked_file_icon = '+'
"edit files by double clicking them, and justify the cursor on the left
autocmd FileType vimfiler setlocal nonumber nocursorcolumn
"load the list of file extensions and handlers if it exists
if filereadable(glob("~/.vim/filetypes.vim"))
source ~/.vim/filetypes.vim
endif

View file

@ -1,23 +1,13 @@
"============================================================" "============================================================="
" " " "
" Darkcloud Vim Config: main settings " " Darkcloud Neovim Config: main settings "
" " " "
" By: Kevin MacMartin (prurigro@gmail.com) " " By: Kevin MacMartin (prurigro@gmail.com) "
" Website: https://github.com/prurigro/darkcloud-vimconfig " " Website: https://github.com/prurigro/darkcloud-nvimconfig "
" " " "
" License: MIT " " License: MIT "
" " " "
"============================================================" "============================================================="
"GVIM SETTINGS: {{{
set guicursor+=a:blinkon0 "disable the blinking cursor
set guioptions=e "use the gui to render the list of open tabs
set guioptions+=g "make inactive menu items grey
set guioptions+=i "have the gui use the vim icon
set guioptions+=p "enable pointer callbacks for X11 (required by some WMs)
set guioptions+=h "prevent the cursor jumping to the longest line while scrolling
set winaltkeys=no "don't select the menu when pressing the alt-keys
"}}}
"COMPATIBILITY SETTINGS: {{{ "COMPATIBILITY SETTINGS: {{{
set nocompatible "disable vi-compatibility settings set nocompatible "disable vi-compatibility settings

124
vimrc
View file

@ -1,124 +0,0 @@
"============================================================"
" "
" Darkcloud Vim Config: vimrc "
" "
" By: Kevin MacMartin (prurigro@gmail.com) "
" Website: https://github.com/prurigro/darkcloud-vimconfig "
" "
" License: MIT "
" "
"============================================================"
"darkcloud vim config folder path: {{{
"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:
"
"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 Colours
if &term != "linux"
runtime colors/palette.vim
"Load Colour Scheme:
colorscheme default "hack to fix vimrc colorschemes in some versions of vim
colorscheme darkcloud
endif
"Load Settings:
runtime config/settings.vim
"Initialize Plugins:
let g:pathogen_disabled = get(g:, "pathogen_disabled", [])
if has('python3')
"configure pythonx and check for the python-neovim and python-msgpack libraries if python3 is found
if !has('nvim')
set pyxversion=3
endif
"check for python-neovim
redir => python_neovim_check
silent python3 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
"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
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
call add(g:pathogen_disabled, 'MatchTagAlways')
let g:python_neovim = 0
let g:python_msgpack = 0
endif
"don't load vim-gutentags if ctags can't be found
if !executable('ctags')
call add(g:pathogen_disabled, 'vim-gutentags')
endif
if !g:python_neovim || !g:python_msgpack
"don't load deoplete if either of its python dependencies are missing
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')
elseif has('nvim')
"don't load the neovim compatibility plugins required by deoplete if actually running neovim
call add(g:pathogen_disabled, 'nvim-yarp')
call add(g:pathogen_disabled, 'vim-hug-neovim-rpc')
endif
"disable autocompletion logic when running in vimpager mode
if exists('g:vimpager.enabled')
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')
endif
"if neovim is being used we should disable plugins that aren't compatible or necessary
if has('nvim')
call add(g:pathogen_disabled, 'vim-fixkey')
endif
"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
"Load After Config:
runtime config/after.vim
"}}}