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