actions.vim 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. " Vim plugin
  2. " Purpose: Intelligently create content for PISI's action.py files
  3. " Author: A. Murat Eren
  4. " Copyright: Copyright (c) 2005 A. Murat Eren & S. Çağlar Onur
  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! MakeNewActionsPY()
  10. set nopaste
  11. 0 put = '# -*- coding: utf-8 -*-'
  12. put = '#'
  13. put = '# Copyright 2011 TUBITAK/BILGEM'
  14. put = '# Licensed under the GNU General Public License, version 2.'
  15. put = '# See the file http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt'
  16. put = ''
  17. put = 'from pisi.actionsapi import autotools'
  18. put = 'from pisi.actionsapi import pisitools'
  19. put = 'from pisi.actionsapi import get'
  20. put = ''
  21. put = 'def setup():'
  22. put = ' pass'
  23. put = ''
  24. put = 'def build():'
  25. put = ' pass'
  26. put = ''
  27. put = 'def install():'
  28. put = ' pass'
  29. 14
  30. endfun
  31. com! -nargs=0 NewActionsPY call MakeNewActionsPY()
  32. augroup NewActionsPY
  33. au!
  34. autocmd BufNewFile actions.py call MakeNewActionsPY()
  35. augroup END
  36. " vim: set et foldmethod=marker : "