In my .vimrc file, I have F7 bound to run the current document like an executable script. This is very very handy.
nmap <silent> <F7> :!./% <CR>
But sometimes I would like to be able to set a variable, like say $ARGS, with some arguments to pass to the shell.
nmap <silent> <F7> :!./% $ARGS <CR>
So while using vim I could do something like...
:let ARGS="-t ext3 -o allow_others"
And then when I pressed F7, it would pass these arguments automatically to the shell. Anyone have an idea how to do this?