Skip to content

nimboids/vim-config

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is a tweaked copy of the excellent Vi/Vim dev setup Kerryb

Installation

Backup

If necessary, backup and remove your /.vim directory and /.vimrc file:

mv $HOME/.vim{,.original-$(date +%Y.%m.%d-%H.%M.%S)}
mv $HOME/.vimrc{,.original-$(date +%Y.%m.%d-%H.%M.%S)}

Download

Clone this repository to ~/.vim:

git clone git://github.com/AdamWhittingham/vim-config.git ~/.vim

(If you're behind a firewall that blocks port 9418, replace git: with https: in the above URL.)

Alternatively, if for some bizarre reason you don't have git installed, you can download a zip or tar file using the link on GitHub.

Symlink

Finally, symlink .vimrc so the config is loaded when Vim starts:

ln -s ~/.vim/vimrc ~/.vimrc

Keeping up-to-date

cd ~/.vim
git pull

External Dependencies

There are a couple of things you might want to install to get the best out of this config:

  • ctags - enables tags support when workingn with code
  • Ack - enables grepping through the current directories

Local Customisation

Local changes (eg if you prefer a different font or colour scheme) can either be made in a branch, or in ~/.vimrc.local.

Included Plugins

See the plugins' web pages for more information. The keybindings listed are mostly just those defined or overridden locally, not the ones provided by default.

Plugins are installed in their own directories under bundle, thanks to Pathogen.

Ack (0.3.1)

This plugin is a front for the Perl module App::Ack. Ack can be used as a replacement for 99% of the uses of grep. (more)[http://www.vim.org/scripts/script.php?script_id=2572]

Requires ack (aka ack-grep) to be installed.

Align (35/41)

Help folks to align text, eqns, declarations, tables, etc (more)

Keybindings

,a=
Align on =
,a=>
Align on =>
,a,
Align on ,
,a{
Align on {
,a|
Align on |
,a
Align on spaces

Autotag (1.13)

Automatically update tags when saving files (more)

bufexplorer (7.2.8)

Buffer explorer/browser (more)

Keybindings

,.
Show buffer explorer

## Coffeescript (fd170cb - 13 June 2011)

Adds support for CoffeeScript. It handles syntax, indenting, and compiling (more)

color_highlight (e44f3d9 – 9 Oct 2013)

Highlight color names and codes in the same color that they represent ([more] (http://www.vim.org/scripts/script.php?script_id=3963))

Keybindings

,cC
Toggle colour highlighting
,cF
Toggle text or background colouring

CtrlP

Fast file navigation for VIM (more)

Keybindings

C-p
Open the CtrlP fuzzy search
,t
Refresh the cache and open the CtrlP fuzzy search

Gundo (2.2.2)

Gundo is a Vim plugin for visualizing your undo tree to make it usable (more)

Keybindings

,u
Toggle Gundo tree

HTML5

Adds support for HTML 5 keyword highlightings (more)

LustJuggler

Quickly switch between buffers using the home row or number keys (more)

,lj
Show buffer list

markdown

Syntax highlighting for Markdown (more)

machit

Allows % to be changed to match more than single characters; often more up-to-date than the version which ships with Vim. (more)

nerdcommenter (2.3.0)

A plugin that allows for easy commenting of code for many filetypes (more)

nerdtree (4.2.0)

A tree explorer plugin for navigating the filesystem (more)

Keybindings

,m
Show/hide NERDTree
,f
Show current file in tree
C
Set the current folder to be the root of the tree
p
Go to parent of selected item
?
Toggle the help list

projector mode (55e7a8d69a)

Toggle 'projector mode': larger font and high contrast colour scheme (more)

,p
Toggle 'projector mode' (large font, high contrast)

ragtag (2.0)

A set of mappings for HTML, XML, PHP, ASP, eRuby, JSP, and more (more)

If you have already typed 'foo', the following shortcuts apply (with the cursor position marked by ^):

<C-X>=
foo<%= ^ %>
<C-X>+
<%= foo^ %>
<C-X>-
foo<% ^ %>
<C-X>_
<% foo^ %>
<C-X>'
foo<%# ^ %>
<C-X>"
<%# foo^ %>
<C-X><Space>
<foo>^</foo>
<C-X><CR>
<foo>
^
</foo>
<C-X>/
Last HTML tag closed
<C-X>!
<!DOCTYPE...>/<?xml ...?> (menu)
<C-X>@
<link rel="stylesheet" ...>
<C-X>#
<meta http-equiv="Content-Type" ... /> ragtag-CTRL-X_#
<C-X>$
<script src="/javascripts/^.js"></script> ragtag-CTRL-X_$

rails (4.3)

Ruby on Rails: easy file navigation, enhanced syntax highlighting, and more (more)

Keybindings

,r
run rake

rake (1.2)

It's like rails.vim without the rails (more)

repeat (1.0)

Use the repeat command (.) with supported plugins (more)

SuperTab (1.6)

Do all your insert-mode completion with Tab (more)

surround (1.90)

Delete/change/add parentheses/quotes/XML-tags/much more with ease (more)

switch (93759a6b)

Switch between predefined code blocks (eg. Ruby 1.8 to 1.9 hash syntax) (more)

syntastic (7f0412e9)

Automatic syntax checking (more)

Tabular (b7b4d87 - 31 Mar 2011)

Configurable, flexible, intuitive text aligning (more)

Keybindings

,tt
(when text is selected) format tables made with pipes (|)

Tagbar (cc222f5d8c - 26 Feb 2013)

Sidebar for showing and navigating the tags in current file (more)

Keybindings

,]
toggle the sidebar

unimpaired (1.1)

Pairs of handy bracket maps (more)

vim-abolish (d64ce06650, 30 Apr 2013)

Better abbreviations, substitution and search with Bash like {a,b} style expansions

## vim-bundler (3f1e6e9f, 22 Aug 2011)

Lightweight bag Vim goodies for Bundler (more)

vim-colors-solarized

The well-known solarized colorscheme (more)

vim-gitgutter (ff031d022f - 27 May 2013)

Show the changes made since the last commit in the gutter (more)

,g
Skip to the next changed chunk
,G
Skip to the previous changed chunk
,gt
Toggle the git change gutter
,gh
Highlight all changed lines

vim-indent-guidelines (eec1b629dc4 - 18 Oct 2013)

Show indent guidelines - very useful when editing Haml! (more)

,ig
Toggle indentation guidelines

vim-haml (3327947 - 3 June 2013)

Add haml, sass and SCSS syntax support (more)

vim-less (8443f89 - 3 June 2013)

Less syntax highlighting (more)

vim-powerline (09c0cea859a2e0989eea740655b35976d951a84e - Nov 2012)

Colourful and neat status bar without the need for font patching

vim-rails (bdc32389e7 - 18 Oct 2013)

Quick navigation around rails projects (more)

:A
Alternate file- switch between specs and production code
:R
Related file- switch between modles, controllers and views
:Emodel
Switch to the model
:Eview
Switch to the view
:Econtroller
Switch to the controller

## vim-ruby (b10adca - 17 Aug 2012)

Ruby support (newer than the version released with vim). (more)

vim-ruby-refactoring (6447a4d - 28 Dec 2011)

Refactoring tool for Ruby in vim! (more)

See relish documentation for examples.

vim_search_objects (c9b5dc3 – 28 Nov 2011)

Allow previous search to act as a text object (a little more)

eg va/ to visually sepect previous match, or ca/ to change it.

## vroom (00f0d4d - 27 May 2013)

A plugin for running your Ruby tests, specs, and features. (more)

,r
Run current test/spec/feature, or previous if in another file
,R
Run nearest test/spec/feature

ZoomWin (23)

Zoom in/out of windows (toggle between one window and multi-window) (more)

Keybindings

,z
Zoom

Other Keybindings

alt-c
In visual modes, copy the selected to the system clipboard
alt-v
Paste from the system clipboard
ctrl-]
Jump to definition (needs exuberant ctags installed
ctrl-n
Toggle between absolute and relative numbering
,c
Show/hide hidden characters
,h
Hide search highlighting
,rr
Run ruby file
,rt
Run `ctags -R .`
,s
Show/hide spelling errors
,sw
Strip trailing whitespace
,tsp
Align on whitespace
,tlt
Align LaTEX tables (to avoid clashing with our existing ,tt mapping)
,w
Toggle word wrapping
RB
Open Ruby docs in browser for word under cursor
RR
Open Rails docs in browser for word under cursor

Commands

:Lorem
Generate 'lorem ipsum' text

Releases

No releases published

Packages

No packages published

Languages

  • Vim Script 93.6%
  • Ruby 4.4%
  • Python 1.7%
  • Perl 0.2%
  • Awk 0.1%
  • Erlang 0.0%