A theme, config and collection of plugins for Neovim
Find a file
2015-01-22 23:24:50 -05:00
vim Update submodules including upstream polyglot langpack update 2015-01-22 23:24:50 -05:00
.gitignore Add add/delete submodule scripts and remove them from gitignore 2014-10-26 08:38:22 -04:00
.gitmodules Update to fork and await vimscripts pulling the request 2014-10-29 06:57:03 -04:00
add-submodule Add add/delete submodule scripts and remove them from gitignore 2014-10-26 08:38:22 -04:00
delete-submodule Remove reference to $2 in the delete submodule script 2014-11-02 02:13:21 -05:00
gentags Vastly improved the gentags script-- now uses either $PWD or input paths 2014-08-25 01:17:56 -04:00
LICENSE Added the MIT license to the project in case it's helpful to be there 2014-04-09 14:32:06 -04:00
README.md add leader+bracket toggles for sidebars and play with placement/touchup 2014-12-01 08:46:34 -05:00
update More cleanup and improvements to the update script 2015-01-21 02:17:09 -05:00
vimpagerrc Fixed some mapping bugs, pulled vimpager settings into its own config 2014-07-28 06:08:10 -04:00
vimrc Load the colorscheme before the config files 2014-07-25 23:50:05 -04:00

darkcloud-vimconfig

A theme, config and collection of plugins for Vim.

Requirements

  • Vim: The latest vim should be installed to use this distribution (versions 7.3 and below aren't tested or guaranteed to work).
  • Bash: Required by the update and gentags scripts.
  • Git: Required by the update script and git-related plugins.
  • Python: Required by the gundo and MatchTagAlways plugins.

Optional Requirements

  • Artistic Style: Required by the autoformat plugin to format C, C++, C++/CLI, C#, and Java source (astyle website).
  • autopep8: Required by the autoformat plugin to format Python using the PEP 8 style guide (autopep8 repo).
  • Compilers and Runtimes: The syntastic plugin can use the compiler or runtime for most languages to provide real-time syntax checking.
  • CTags: Required by the tagbar and neocomplcache plugins as well as the gentags script (ctags website).
  • JS Beautifier: Required by the autoformat plugin to format Javascript source and HTML (js-beautify repo).
  • Powerline Fonts: Required to enable the fancier looking status line (powerline-fonts repo).
  • Tidy: Required by the autoformat plugin to format XHTML and XML (tidy website).

Distribution Features

  • Default Configuration: A complete set of defaults, focusing on the most modern settings that still provide a compatible experience.
  • Custom theme: An original colour scheme with explicit values set to optimize the look of individual filetypes.
  • Key Bindings/Aliases: A set of bindings and aliases defined to group similar features and provide numerous (and sometimes more familiar) ways to access options.
  • 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.

Darkcloud Vim Distribution Theme

Darkcloud Vimconfig Update Tool

Installation

  1. Clone the darkcloud-vimconfig repo and use the update script to install the plugins:
  • git clone https://github.com/prurigro/darkcloud-vimconfig.git
  • ./darkcloud-vimconfig/update (if you don't want colour output, run: ./darkcloud-vimconfig/update --no-colour instead)
  • 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.
  1. 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
  2. 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

Once darkcloud-vimconfig has been set up, you can configure vimpager to use it by running (assuming the default path @ "/etc/darkcloud-vimconfig"):

ln -s /etc/darkcloud-vimconfig/vimpagerrc /etc/vimpagerrc (for a system-wide configuration), or:

ln -s /etc/darkcloud-vimconfig/vimpagerrc ~/.vimpagerrc (for a given user).

As usual, to have your system use vimpager in place of less, you'll need to set the $PAGER environment variable to vimpager:

export PAGER=vimpager, and configure aliases for less in "/etc/bash.bashrc" or "~/.bashrc": alias less='vimpager'

Configuration

  • Configure Variables: The following variables can be added to vim/vimrc.user and have their values set to the values you require:
    • g:autostartfiler: 1 = Start the filer file manager when vim is run and the buffer is empty | 0 = Do nothing when vim is run and the buffer is empty (default: 1)
    • 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: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: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 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 Snippets: To add or override Emmet snippets, create ~/.vim/snippets.json and add your own definitions using json like shown in the Emmet Documentation.
  • 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 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

Mouse

Binding Mode Action
Ctrl+ScrollUp ALL Scroll right a few characters at a time
Ctrl+ScrollDown ALL Scroll left a few characters at a time
Alt+ScrollUp ALL Scroll right one character at a time
Alt+ScrollDown ALL Scroll left one character at a time
MiddleClick ALL Select between the cursor and the mouse
Ctrl+LeftClick ALL Select between the cursor and the mouse
Alt+LeftClick ALL Select the line at the mouse
Ctrl+Alt+LeftClick ALL Select the paragraph at the mouse
Ctrl+RightClick ALL Copy selection or character under the cursor
Ctrl+MiddleClick ALL Copy selection or character under the cursor
Alt+RightClick ALL Cut selection or character under the cursor
Alt+MiddleClick ALL Cut selection or character under the cursor
Ctrl+Alt+RightClick ALL Paste at the cursor
Ctrl+Alt+MiddleClick ALL Paste at the cursor
Shift+MiddleClick ALL Paste the contents of the xorg buffer

Keyboard

Sidebars

Binding Mode Action
Ctrl or Alt+F1 or Backslash+[ ALL Toggle vimfiler file manager sidebar
Ctrl or Alt+F2 or Backslash+] ALL Toggle the gundo undo history sidebar
Ctrl or Alt+F3 or Backslash+{ ALL Toggle the tagbar source code tag sidebar
Ctrl or Alt+F4 or Backslash+} ALL Toggle the extradite git history window
Ctrl or Alt+F12 ALL Toggle the goyo distraction-free mode

Toggles

Binding Mode Action
~ N Popup a command list dialog
F1 ALL Toggle line wrapping
F2 ALL Toggle highlighting of spelling mistakes
F3 ALL Toggle source code syntax checking
F4 ALL Toggle external-paste mode
` N Toggle gutter (left bar with line numbers etc.)
Backslash+F1 N Toggle the vim reference manual
Backslash+Space N Toggle the goyo distraction-free UI
?+Space N Toggle the spellcheck bottom bar of mistakes

Spell Check

Binding Mode Action
?+Space N Toggle spellcheck error list
?+ N Add the selected word to the local dictionary
?? N Show spelling suggestions for selected word
?N N Go to the next spelling mistake
?P N Go to the previous spelling mistake

Formatting

Binding Mode Action
Leader+J N+V Format line/selected lines to a max width of the textwidth
Leader+f N+V Format document/selection alignment using Vim syntax
Leader+F N Format based on file-type using Autoformat
Leader+F N+V (Markdown) Format table cursor is currently on
Leader+t N Convert all tabs into spaces and continue session with spaces
Leader+T N Convert all spaces into tabs and continue session with tabs
Leader+w N Remove all trailing whitespace
Leader+A N+V Align comments in document/selection
Leader+a N+V Align comments following non-comments in document/selection

GVim

Binding Mode Action
Backslash+F1 ALL Toggle the menubar
Backslash+F2 ALL Toggle the toolbar
Backslash+F3 ALL Toggle the scrollbars

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.

Plugins

  • auto-autoformat: Provides easy code formatting in Vim by integrating existing code formatters.
  • autoswap.vim: Switch to open editor window instead of asking what to do with swapfile.
  • emmet-vim: Support for expanding abbreviations.
    • webapi-vim: A web library used by emmet to provide support for custom snippets.
  • goyo.vim: Distraction-free writing in Vim.
  • gundo.vim: Sidebar to visualize your undo tree and browse the differences of each change.
  • incsearch.vim: Improved incremental searching for Vim.
  • lightline.vim: A light and configurable statusline/tabline for Vim.
  • MatchTagAlways: A Vim plugin that always highlights the enclosing html/xml tags.
  • neocomplcache.vim: The 'ultimate' auto-completion system for Vim.
  • patchreview-vim: A Vim plugin for doing single, multi-patch or diff code reviews.
  • rename.vim: Rename the current file in the vim buffer + retain relative path.
  • ReplaceWithRegister: Replace text with the contents of a register (for paste+replace without writing over the buffer).
  • SudoEdit.vim: Read and write files without the necessary permissions through the use of sudo.
  • syntastic: Uses system compilers and parsers to check syntax either on-the-fly or after saving a compatible document.
  • tabular: Vim script for text filtering and alignment.
  • tagbar: Uses ctags to generate a sidebar of the tags for the current file.
  • tcommand_vim: Select commands, menu items etc. from a list.
    • tlib_vim: Some utility functions for VIM.
  • tcomment_vim: File-type sensible comments that can be easily toggled on and off for blocks of text.
  • vim-bookmarks: Bookmark or annotate lines and quickly navigate between them.
  • vim-easytags: Automated tag file generation and syntax highlighting of tags in Vim.
    • vim-misc: Miscellaneous auto-load Vim scripts required by vim-easytags.
  • vim-extradite: A git commit browser extending vim-fugitive that displays differences and optionally loads old revisions.
  • 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.
    • unite.vim: A library used by Vim Filer to help build its user interface.
  • vim-fixkey: A set of keyboard mappings that override differences in different environments that might normally break consistency or compatibility.
  • 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-move: Provides a few convenient ways to move selected text.
  • vim-pathogen: A plugin to load other plugins while keeping them isolated in their own directory structure rather than all dumped together.
  • vim-polyglot: The darkcloud-vimconfig fork of a meta-package that attempts to provide the best syntax plugins for each file type.
  • 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: Provides functionality to exchange surrounding delimiters and xml-style tags with another, or simply remove them.
    • vim-repeat: A library used by vim-surround to allow its delimiter-switching functions to be repeated with the . command.
  • vim-togglelist: Supplies toggle functions for the location and error lists, which are used by a number of plugins and normally require separate open and close commands.
  • vim-trailing-whitespace: Highlights and allows for the easy removal of trailing whitespace in documents.
  • vim-unimpaired: Pairs of handy bracket mappings.

Credits

License

Licensed under the MIT license.