view src/po/tojavascript.vim @ 23505:bb29b09902d5 v8.2.2295

patch 8.2.2295: incsearch does not detect empty pattern properly Commit: https://github.com/vim/vim/commit/d93a7fc1a98a58f8101ee780d4735079ad99ae35 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Jan 4 12:42:13 2021 +0100 patch 8.2.2295: incsearch does not detect empty pattern properly Problem: Incsearch does not detect empty pattern properly. Solution: Return magic state when skipping over a pattern. (Christian Brabandt, closes #7612, closes #6420)
author Bram Moolenaar <Bram@vim.org>
date Mon, 04 Jan 2021 12:45:05 +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