neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

fixfilenames.vim (329B)


      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 
      4 set shortmess+=A
      5 
      6 for name in argv()[1:]
      7  let jsname = fnamemodify(name, ":t:r") .. ".js"
      8  exe "%s+" .. jsname .. "+" .. substitute(name, '\\', '/', 'g') .. "+"
      9 endfor
     10 
     11 write
     12 last
     13 quit