Skip to content

Instantly share code, notes, and snippets.

@osyo-manga
osyo-manga / gist:5731547
Last active December 18, 2015 05:19 — forked from deris/gist:5730298
function! s:fix_number(pattern, ...)
if a:0 > 2
return
endif
let s:start = get(a:, 1, get(g:, 'fix_number_default_start', 0))
let s:step = get(a:, 2, get(g:, 'fix_number_default_step', 1))
let pattern = empty(a:pattern) ? get(g, 'fix_number_default_pattern', '\(\d\+\)') : a:pattern