1" Invoked with the name "vim.pot" and a list of Vim script names. 2" Converts them to a .js file, stripping comments, so that xgettext works. 3" Javascript is used because, like Vim, it accepts both single and double 4" quoted strings. 5 6set shortmess+=A 7 8for name in argv()[1:] 9 exe 'edit ' .. fnameescape(name) 10 11 " Strip comments 12 g/^\s*"/s/.*// 13 14 " Write as .js file, xgettext recognizes them 15 exe 'w! ' .. fnamemodify(name, ":t:r") .. ".js" 16endfor 17 18quit 19