translations.vim 866 B

123456789101112131415161718192021222324252627282930313233
  1. " Vim plugin
  2. " Purpose: Intelligently create content for PISI's translations.xml files
  3. " Author: İnanç Yıldırgan
  4. " Copyright: Copyright (c) 2008 İnanç Yıldırgan
  5. " Licence: You may redistribute this under the terms of the GNU GPL v2..
  6. if &compatible || v:version < 603
  7. finish
  8. endif
  9. fun! MakeNewTranslations()
  10. set nopaste
  11. 0 put = '<?xml version=\"1.0\" ?>'
  12. put = '<PISI>'
  13. put = ' <Source>'
  14. put = ' <Name></Name>'
  15. put = ' <Summary xml:lang=\"\"></Summary>'
  16. put = ' <Description xml:lang=\"\"></Description>'
  17. put = ' </Source>'
  18. put = '</PISI>'
  19. 14
  20. endfun
  21. com! -nargs=0 MakeNewTranslations call MakeNewTranslations()
  22. augroup MakeNewTranslations
  23. au!
  24. autocmd BufNewFile translations.xml call MakeNewTranslations()
  25. augroup END
  26. " vim: set et foldmethod=marker : "