Skip to content

Latest commit

 

History

History
392 lines (268 loc) · 16.7 KB

Plugins.md

File metadata and controls

392 lines (268 loc) · 16.7 KB

Plug-ins

This lists, justifies and briefly documents each plug-in included in this distribution. Separating them in categories. You can find full documentation on the plug-in's github page or by accessing its help (usually at :h <plugin-name>). Most user configuration should be put in your user/after.vim unless otherwise stated on the docs for the plug-in or here.

Table of Contents

Color schemes

These merely add color schemes (a.k.a. themes) for us to chose from. We'll have a default configured on colorscheme.vim but users can easily swap them on their local configurations.

A great collection of schemes ported as 16 color palettes for great portability.

Atom's text editor color scheme ported to vim (currently the default scheme of the distribution).

UI - User interface additions

Plug-ins that add UI elements, these should require no to little interaction to activate and are ideally disable-able.

A better start page for vim. Customized to show the current version and most recently used files in the current directory. Our local configuration for it lives in include/startify.vim. This can be disabled with the following snippet:

let g:startify_disable_at_vimenter = 0

vim-startify

Show trailing whitespace in red. Can only be disabled by preventing loading of the plug-in. This needs to go on your user/before.vim:

let g:loaded_trailing_whitespace_plugin = 1

Shows marks on the gutter. Disable with:

let g:SignatureEnabledAtStartup = 0

vim-signature

Fast, simple and lightweight status line. Requires a powerline patched font to show properly. Our local configuration for it lives in include/lightline.vim. This can be disabled with the following snippet:

let g:lightline.enable = {
  \ 'statusline': 0,
  \ 'tabline': 0
  \ }
" You may also want to enable showmode again to see -- INSERT --/etc
set showmode

You can also change it's colorscheme, and enable tabline!

let g:lightline.colorscheme = 'wombat'
let g:lightline.enable = {
      \ 'statusline': 1,
      \ 'tabline': 1
      \ }

More advanced configuration is documented in :h lightline

lightline

Shows a guide to key mappings. This is meant to make our custom key mappings more discoverable. Will automatically show when hitting the leader key. Disable with:

unmap <leader>

vim-leader-guide

Editing - Text manipulation

Plug-ins providing commands or helpers that directly impact how you edit text passively or actively.

(Un-)comment code. Default binding is the operator gc, allowing you to do gc<motion>, see documentation for more details. We have a local binding at <c-_> (or Control-/) to toggle comments on the current line or visual selection.

Provides multiple cursor functionality like the one in Atom or Sublime. Activate with <c-n> in either normal or visual mode for current word or selection respectively. Then:

  • <c-n>: find next occurrence and create cursor
  • <c-p>: go back to previous cursor (removing current)
  • <c-x>: skip current occurrence. Like <c-n> but without creating a cursor for the current.

Or use :MultipleCursorsFind to create cursors from a search.

vim-multiple-cursors

Visual context when bulk editing buffers. Start with :Swoop for current buffer only or :Swoop! for all open buffers. First line in the newly opened window is a search pattern (that can also be passed as argument to the :Swoop[!] commands). Editing on the swoop buffer will propagate to the real files automatically.

vim-swoop

Select regions incrementally. Simply hit + to expand your selection or _ to reduce it.

vim-expand-region

Automatically add 'end' when opening a block.

Move parameters around (delimited by a separator such as ,). gs To enter "swap-mode" or g>/g< to move parameters around in normal mode.

vim-swap

Simplifies the transition between multi-line and single-line code. gS splits and gJ joins.

splitjoin.vim

:Join command. Allows you to join lines with a separator, for example :J ', ' will join lines with a , in between them.

Before command & description After
:J ', ' 3
Join with:
sep
count
:J '-' 3 r
Join with:
sep
count
reverse
:J '-' 3 k
Join with:
sep
count
keep
:J '-' 3 kr
Join with:
sep
count
keep
reverse
:J -3
Join with:
negative count
:J -3 r
Join with:
negative count
reverse
:J -3 kr
Join with:
negative count
reverse
keep
:2,5J "'\"\t" k
Join with:
range
special sep
keep
:2,5J "# " rk
Join with:
range
sep
keep
reverse
:5,7J 3
Join with:
range
count
:5,7J -3
Join with:
range
negative count

Quoting/parenthesizing made simple; e.g. ysiw) to wrap word in parens.

Enable repeating supported plug-in maps with .

Add emacs/bash/cocoa key bindings to vim, in insert and command-line modes.

Plugin to move lines and selections up and down. <a-k>/<a-j>.

vim-move

A Vim alignment plug-in. See readme for examples. ga gets you in "align mode".

vim-easy-align

Use CTRL-A/CTRL-X to increment dates, times, and more.

Easy text exchange operator for Vim. cx<motion> in normal mode or X in visual mode. Running again after making a selection (which will be visually highlighted) will swap the two regions.

General -- Helpful generic tools with no dependencies

Project configuration via 'projections'.

Automatically adjusts 'shiftwidth' and 'expandtab' heuristically based on the current file.

Easily search for, substitute, and abbreviate multiple variants of a word. :Subvert, :Abolish and coercion.

:Subert: case-aware search/replace

This will replace blog with post or Blog with Post:

:Subvert/blog{,s}/post{,s}/g

Coercion: change casing of text, from the docs:

Want to turn fooBar into foo_bar? Press crs (coerce to snake_case). MixedCase (crm), camelCase (crc), snake_case (crs), UPPER_CASE (cru), dash-case (cr-), dot.case (cr.), space case (cr<space>), and Title Case (crt) are all just 3 keystrokes away. These commands support repeat.vim.

Pairs of handy bracket mappings; e.g. [ and ] add newlines before and after the cursor line. See docs for more commands or :help unimpaired

Vim sugar for the UNIX shell commands that need it the most; e.g. :Find, :Wall

Make Vim persist editing state without fuss.

Make Vim handle line and column numbers in file names with a minimum of fuss.

vim-fetch

The ultimate undo history visualizer for VIM. Activate with :UndotreeToggle

undotree

Speed up Vim by updating folds only when called-for.

Sane buffer/window deletion. Kill a buffer with <M-q>.

Distraction-free writing in Vim. Activate with :Goyo.

goyo.vim

All the world's indeed a stage and we are merely players.

limelight.vim

Interact with tmux. Used by vim-test or usable on its own. See docs for details or :help vimux.

vimux

Asynchronous build and test dispatcher. Used by vim-test or usable on its own. See docs for details or :help dispatch.

Wrapper of some vim/neovim's :terminal functions.

neoterm

Tame the quickfix window. :Reject to filter out lines, :Keep to filter in and :Restore to revert to the original contents.

vim-qf