質問させてください。やりたいことは以下です。

windowsのvimで、テキストファイルをデフォルトの白黒の色を反転さ
せてhtmlファイルにを出力することです。

雰囲気は下のような感じだと思っているのですが、まったくvimの
スクリプト言語の知識がないのでご教授できないでしょうか?
特に白黒反転させる置換の処理がどうすれば効率が良いのか
わかりません。よろしくお願いします。


function WhiteHtmlFunc(kind, filepath) abort
execute 'vimTOhtml' filepath

execute 'vimgrep1' #ffffff #aaaaaa
execute 'vimgrep1' #aaaaaa #000000
execute 'vimgrep1' #000000 #ffffff
execute 'write' filepath.html
endfunction

command -nargs=+ -complete=file WhiteHtml call WhiteHtmlFunc(<f-args>)