Hello all, having a little trouble with defining a vim function and mapping a key sequence to it, any help would be greatly appreciated. The documentation is a little confusing to me.
Quote:
function Slackbuild()
:%s/ARCH:-i486/ARCH:-x86_64<CR>
:%s/OUTPUT:-\/tmp/OUTPUT:-\/usr\/local\/my_builds<CR>
endfunction
map _sb call Slackbuild()
|
So I'm trying to map the "_sb" key sequence to Slackbuild() and having some trouble. I'm guessing I'm not listing the correct commands within the function. Originally I was gonna use:
Quote:
map _sb :%s/ARCH:-i486/ARCH:-x86_64<CR>:%s/OUTPUT:-\/tmp/OUTPUT:-\/usr\/local\/my_builds<CR>
|
...but the problem I ran into was that if the first substitution command was not successfull, then the second was not carried out.