No description, website, or topics provided.
Vim script Shell
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Dotfiles managed by stow.

Run ./ to symlink dotfiles from ~/dotfiles/ to ~/

Be aware - if you are going to use these dotfiles, make sure you change my personal settings.


gitconfig is set up for my name and email.


Annotated .vimrc (OUTDATED)

"" "" Vundle "" basic settings

filetype off
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()

let Vundle manage Vundle, required

Bundle 'gmarik/vundle'

status bar

Bundle 'Lokaltog/vim-powerline'


Bundle 'LustyJuggler'
Bundle 'BufOnly.vim'
Bundle 'YankRing.vim'


Bundle 'jimenezrick/vimerl'
Bundle 'kchmck/vim-coffee-script'


Bundle 'skwp/vim-rspec'

re-enable filetype plugins (disabled for vundle)

filetype plugin indent on

"" "" Basic editor settings "" colours

colorscheme gardener

vim mode

set nocompatible

use 2 spaces for tabs, turn on automatic indenting

set tabstop=4 softtabstop=2 shiftwidth=2 expandtab

make tabs behave smarter, i.e. bs will delete spaces inserted when the tab key is pressed

set smarttab

make backspace delete over more stuff

set backspace=indent,eol,start

make backspace and cursor keys wrap accordingly

set whichwrap+=<,>,h,l

indent automatically based upon that of the last line

set autoindent

smarter indenting for brackets, etc

set smartindent

always show this number of lines above / below the current line, scroll accordingly

set scrolloff=5

jump to the matching bracket quickly when inserting a matching one

set showmatch

disable folding

set nofoldenable

"" "" Visual editor cues "" syntax highlighting

syntax on

highlight tabs and trailing spaces

if has('mac')
  set listchars=tab:▸\ ,trail:·
elseif has('unix')
  set listchars=tab:>>,trail:.
set list

highlight search terms

set hlsearch

"" "" Search options "" make searches case insensitive

set ignorecase

find as you type searching

set incsearch

default to global replace (no g needed)

set gdefault

"" "" Status bar tweaks "" always show status bar

set laststatus=2

show position in file on status bar

set ruler

show line numbers

set number

show partially typed vim commands

set showcmd

"" "" File options "" disable backup file (stops .bak files being written)j

set nobackup

disable swap file (stops .swp files being written)

set noswapfile

read a externally changed file automatically rather than prompting

set autoread

"" "" Input options "" enable mouse usage in terminal vim (really useful for moving splits!)

set mouse=a

enable tab completion in command line, and show a list of options if more than one match is present

set wildmode=list:longest

show buffer name in terminal title

set title

faster terminal rendering

set ttyfast

"" "" Keyboard mappings "" remap : to ; (means you only need to press three keys to write a file)

noremap ; :

jump more naturally between wrapped lines

noremap j gj
noremap k gk

easy window navigation

noremap <C-h> <C-w>h
noremap <C-j> <C-w>j
noremap <C-k> <C-w>k
noremap <C-l> <C-w>l

jump to begin/end etc matches by pressing tab rather than shift-5

nnoremap <tab> %
vnoremap <tab> %

shift-tab inserts a tab (useful with expandtab where tab inserts spaces)

inoremap <silent> <S-tab> <ESC>:set noexpandtab<cr>a<tab><tab><ESC>:set expandtab<cr>a

set leader to comma

let mapleader=','

unhighlight search

map <CR> :nohlsearch<CR>

make editing .vimrc easier

map <leader>z :sp ~/.vimrc<CR>
map <leader>Z :source ~/.vimrc<CR>:filetype detect<CR>:exe ":echo 'vimrc reloaded'"<CR>

copy and paste to system clipboard

map <leader>v "*p<CR>:exe ":echo 'pasted from clipboard'"<CR>
map <leader>c "*y<CR>:exe ":echo 'copied to clipboard'"<CR>

spellcheck (requires aspell to be installed)

map <leader>s :w!<CR>:!aspell -c %<CR>:e!<CR>:echo "spellcheck complete"<CR>

"" "" Plugins "" "" LustyJuggler show lusty juggler

map <leader>b :LustyJuggler<cr>

delete all other buffers

map <leader>B :BufOnly<CR>

"" VimRspec disable default bindings, they don't work in terminal Vim

let g:RspecKeymap=0

run all specs with Shift-R

nmap <S-R> :RunSpec<cr>

run a line with Shift-L

nmap <S-L> :RunSpecLine<cr>

display results vertically

let g:RspecSplitHorizontal=0