Mercurial > vim
view src/po/tojavascript.vim @ 31825:0d27ddce621d v9.0.1245
patch 9.0.1245: code is indented more than necessary
Commit: https://github.com/vim/vim/commit/032713f8299abd92fcfb1e490d1ae5c1ecadde41
Author: Yegappan Lakshmanan <yegappan@yahoo.com>
Date: Wed Jan 25 21:05:38 2023 +0000
patch 9.0.1245: code is indented more than necessary
Problem: Code is indented more than necessary.
Solution: Use an early return where it makes sense. (Yegappan Lakshmanan,
closes #11879)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 25 Jan 2023 22:15:03 +0100 |
parents | 52e970719f4b |
children | 7296f4ef3ead |
line wrap: on
line source
" 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 g/^\s*"/s/.*// " Write as .js file, xgettext recognizes them exe 'w! ' .. fnamemodify(name, ":t:r") .. ".js" endfor quit