Created
March 19, 2013 08:24
-
-
Save xaethos/5194477 to your computer and use it in GitHub Desktop.
Command for using Spin from Vim :Spin path/to/spec # spin push file
:Spin # spin push current file
:.Spin # spin push current line
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Spin(count, ...) | |
let cmd = '!spin push' | |
if a:0 > 0 | |
for f in a:000 | |
let cmd = cmd . ' ' . f | |
endfor | |
else | |
let cmd = cmd . ' %:' . a:count | |
endif | |
execute cmd | |
endfunction | |
command -nargs=* -complete=file -count=0 Spin call Spin(<count>, <f-args>) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment