In my .vimrc file, I have F7 bound to run the current document like an executable script. This is very very handy.
Current code:
Code:
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.
Future Code?:
Code:
let b:ARGS=""
nmap <silent> <F7> :!./% $ARGS <CR>
So while using vim I could do something like...
Code:
: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?