• Stars
    star
    429
  • Rank 100,572 (Top 2 %)
  • Language
    Vim Script
  • Created almost 12 years ago
  • Updated about 8 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

lean & mean vim distribution

bling.vim

A highly tuned vim distribution that will blow your socks off!

introduction

this is my personal vim distribution that i have tweaked over time and evolved from a simple vanilla vimrc configuration to a full-blown distribution that it is today.

while it is very easy to install this and get up and running on a brand new machine (a use case i have), i recommend that you do not install this unless you fully understand everything that's going on inside. scan it for tips and tricks, or fork and customize it for your needs.

installation

  1. clone this repository into your ~/.vim directory
  2. git submodule init && git submodule update
  3. mv ~/.vimrc ~/.vimrc.backup
  4. create the following shim and save it as ~/.vimrc:
let g:dotvim_settings = {}
let g:dotvim_settings.version = 2
source ~/.vim/vimrc
  1. startup vim and dein will detect and ask you install any missing plugins. you can also manually initiate this with :call dein#install()
  2. done!

versioning

the g:dotvim_settings.version is a simple version number which is manually edited. it is used to detect whether significant breaking changes have been introduced so that users of the distribution can be notified accordingly.

customization

  • since the distribution is just one file, customization is straightforward. any customizations can be added to the g:dotvim_settings variable, which will be used whilst sourcing the distribution's vimrc file. here is an example:
" this is the bare minimum
let g:dotvim_settings = {}
let g:dotvim_settings.version = 1

" here are some basic customizations, please refer to the top of the vimrc file for all possible options
let g:dotvim_settings.default_indent = 3
let g:dotvim_settings.max_column = 80
let g:dotvim_settings.colorscheme = 'my_awesome_colorscheme'

" change the default directory where all miscellaneous persistent files go
let g:dotvim_settings.cache_dir = "/some/place/else"

" by default, language specific plugins are not loaded.  this can be changed with the following:
let g:dotvim_settings.plugin_groups_exclude = ['ruby','python']

" if there are groups you want always loaded, you can use this:
let g:dotvim_settings.plugin_groups_include = ['go']

" alternatively, you can set this variable to load exactly what you want
let g:dotvim_settings.plugin_groups = ['core','web']

" if there is a particular plugin you don't like, you can define this variable to disable them entirely
let g:dotvim_settings.disabled_plugins=['vim-foo','vim-bar']

" finally, load the distribution
source ~/.vim/vimrc

" anything defined here are simply overrides
set wildignore+=\*/node_modules/\*
set guifont=Wingdings:h10

autocomplete

this distribution will pick one of three combinations, in the following priority:

  1. neocomplete + neosnippet if you have lua enabled.
  2. youcompleteme + ultisnips if you have compiled YCM.
  3. neocomplcache + neosnippet if you only have vimscript available

this can be overridden with g:dotvim_settings.autocomplete_method

standard modifications

  • if you have either ack or ag installed, they will be used for grepprg
  • all temporary files are stored in ~/.vim/.cache, such as backup files and persistent undo

mappings

insert mode

  • <C-h> move the cursor left
  • <C-l> move the cursor right
  • jk, kj remapped for "smash escape"

normal mode

  • <leader>fef format entire file
  • <leader>f$ strip current line of trailing white space
  • window shortcuts
  • <leader>v vertical split
  • <leader>s horizontal split
  • <leader>vsa vertically split all buffers
  • <C-h> <C-j> <C-k> <C-l> move to window in the direction of hkjl
  • window killer
  • Q remapped to close windows and delete the buffer (if it is the last buffer window)
  • searching
    • <leader>fw find the word under cursor into the quickfix list
    • <leader>ff find the last search into the quickfix list
    • / replaced with /\v for sane regex searching
    • <cr> toggles hlsearch
  • <Down> <Up> maps to :bprev and :bnext respectively
  • <Left> <Right> maps to :tabprev and :tabnext respectively
  • gp remapped to visually reselect the last paste
  • gb for quick going to buffer
  • <leader>l toggles list and nolist
  • profiling shortcuts
    • <leader>DD starts profiling all functions and files into a file profile.log
    • <leader>DP pauses profiling
    • <leader>DC continues profiling
    • <leader>DQ finishes profiling and exits vim

visual mode

  • <leader>s sort selection
  • > and < automatically reselects the visual selection

plugins

unite.vim

  • this is an extremely powerful plugin that lets you build up lists from arbitrary sources
  • mappings
  • <space><space> go to anything (files, buffers, MRU, bookmarks)
  • <space>y select from previous yanks
  • <space>l select line from current buffer
  • <space>b select from current buffers
  • <space>o select from outline of current file
  • <space>s quick switch buffer
  • <space>/ recursively search all files for matching text (uses ag or ack if found)

bufkill.vim

  • <leader>bd or :BD will kill a buffer without changing the window layout

sneak.vim

  • motion on steriods

easygrep

  • makes search/replacing in your project a lot easier without relying on find and sed
  • the loading time of this plugin is relatively heavy, so it is not loaded at startup. to load it on-demand, use <leader>vo, which opens the options window.
  • <leader>vv find word under the cursor
  • <leader>vV find whole word under the cursor
  • <leader>vr perform global search replace of word under cursor, with confirmation
  • <leader>vR same as vr, but matches whole word

fugitive

  • git wrapper
  • <leader>gs status
  • <leader>gd diff
  • <leader>gc commit
  • <leader>gb blame
  • <leader>gl log
  • <leader>gp push
  • <leader>gw stage
  • <leader>gr rm
  • in addition to all the standard bindings when in the git status window, you can also use U to perform a git checkout -- on the current file

gitv

  • nice log history viewer for git
  • <leader>gv

unimpaired

  • many additional bracket [] maps
  • <C-up> to move lines up
  • <C-down> to move lines down

nerdtree

  • file browser
  • <F2> toggle browser
  • <F3> open tree to path of the current file

tcomment

  • very versatile commenting plugin that can do motions
  • gcc to toggle or gc{motion}

ctrlp

  • fuzzy file searching
  • <C-p> to bring up the search
  • \t search the current buffer tags
  • \T search global tags
  • \l search all lines of all buffers
  • \b search open buffers
  • \o parses the current file for functions with funky

nrrwrgn

  • <leader>nr puts the current visual selection into a new scratch buffer, allowing you to perform global commands and merge changes to the original file automatically

tabular

  • easily aligns code
  • <leader>a&, <leader>a=, <leader>a:, <leader>a,, <leader>a|

gist

  • automatically get or push changes for gists with :Gist

emmet

  • makes for writing html/css extremely fast
  • for supported most filetypes, <tab> will be mapped to automatically expand the line (you can use <C-v><Tab> to insert a tab character if needed)
  • for other features, default plugin mappings are available, which means <C-y> is the prefix, followed by a variety of options (see :help zencoding)

undotree

  • visualize the undo tree
  • <F5> to toggle

youcompleteme/ultisnips

  • amazingly fast fuzzy autocomplete engine combined with an excellent snippets library
  • use <C-n> and <C-p> to go back/forward between selections, and <tab> to expand snippets

neocomplcache/neosnippet

  • autocomplete/snippet support as a fallback choice when YCM and/or python is unavailable
  • <Tab> to select the next match, or expand if the keyword is a snippet
  • if you have lua installed, it will use neocomplete instead

vimshell

  • <leader>c splits a new window with an embedded shell

vim-multiple-cursors

  • mapped to <C-N>, this will select all matching words and lets you concurrently change all matches at the same time

and some more plugins

  • surround makes for quick work of surrounds
  • repeat repeat plugin commands
  • speeddating Ctrl+A and Ctrl+X for dates
  • gist awesome plugin for your gist needs
  • signature shows marks beside line numbers
  • matchit makes your % more awesome
  • syntastic awesome syntax checking for a variety of languages
  • bufferline simple plugin which prints all your open buffers in the command bar
  • indent-guides vertical lines
  • signify adds + and - to the signs column when changes are detected to source control files (supports git/hg/svn)
  • delimitmate automagically adds closing quotes and braces
  • startify gives you a better start screen

and even more plugins...

  • i think i've listed about half of the plugins contained in this distribution, so please have a look at the vimrc directly to see all plugins in use

credits

i wanted to give special thanks to all of the people who worked on the following projects, or people simply posted their vim distributions, because i learned a lot and took many ideas and incorporated them into my configuration.

license

WTFPL

changelog

  • v2
  • NeoBundle replaced with dein
  • v1
  • requires g:dotvim_settings.version to be defined
  • disable all langauge-specific plugins by default
  • add support for g:dotvim_settings.plugin_groups_include

More Repositories

1

vim-bufferline

super simple vim plugin to show the list of buffers in the command bar
Vim Script
490
star
2

fzf.el

A front-end for fzf
Emacs Lisp
328
star
3

dotemacs

emacs configuration for vim users
Emacs Lisp
260
star
4

minivimrc

a tiny vimrc to be used primarily for troubleshooting plugins
Vim Script
147
star
5

evil-visualstar

Start a * or # search from the visual selection
Emacs Lisp
74
star
6

evil-jumper

jump like vimmers do!
Emacs Lisp
55
star
7

emacs-evil-bootstrap

the quickest way to trying out vim in emacs
Emacs Lisp
52
star
8

pt.el

An emacs front-end for Pt, the Platinum Searcher
Emacs Lisp
40
star
9

dotfiles

here be dragons
Shell
10
star
10

dependencypropertyweaver

An MSBuild task that leverages Mono.Cecil to use post-build IL weaving to automatically convert auto-properties to dependency properties.
C#
7
star
11

Ping.Pong

A fast and lean Twitter client written Silverlight, For Developers, By Developers
C#
5
star
12

AdvancedIocTechniques

The code/slides that I used for my presentation about advanced IoC techniques at Code Camp NYC 2012.
C#
3
star
13

MessageQueuePerfTest

Simple test project for measuring roundtrip performance for sending durable messages with miscellaneous message queuing systems.
C#
3
star
14

pingpong.js

JavaScript
3
star
15

AspectCastle

A lightweight AOP framework built on top of Castle DynamicProxy.
C#
3
star
16

FontSampler

2
star
17

XmlCommentShrink

Shrink those XML comment headers on class, methods, properties, etc.
C#
2
star
18

msbuild-demo

2
star
19

reduxify

JavaScript
2
star
20

AOPDemo

C#
2
star
21

moneynode

JavaScript
2
star
22

.spacemacs.d

Emacs Lisp
2
star
23

ResharperStaticResource

A sample test project where Resharper's code analysis incorrectly flags XAML resources as missing when they are defined using a derived ResourceDictionary.
C#
2
star
24

bling.github.io

HTML
1
star
25

colorknit

JavaScript
1
star
26

moolah

Ruby
1
star