Skip to content

Instantly share code, notes, and snippets.

" Toggle settings:
command! -nargs=+ MapToggle call s:MapToggle(<f-args>)
function! s:MapToggle(key, opt)
let cmd = ':set '.a:opt.'! \| set '.a:opt."?\<CR>"
exec 'nnoremap '.a:key.' '.cmd
endfunction
" To toggle search highlighting on and off with <F9>, just do:
"
" MapToggle <F9> hlsearch
@jeffkreeftmeijer
jeffkreeftmeijer / README.textile
Created November 14, 2010 23:25
A stupid RSpec formatter that prints FFFUUU instead of FFFFF. Heh.

FffuuuFormatter

A stupid RSpec formatter that prints FFFUUU instead of FFFFF. Heh.

Installation

Throw it in a file and run your specs like this:

$ rspec -r path/to/fffuuu_formatter.rb -f FffuuuFormatter spec/