pyrex.vim 931 B

123456789101112131415161718192021222324252627282930313233
  1. " Vim filetype plugin file
  2. " Language: Pyrex
  3. " Maintainer: Marco Barisione <marco.bari@people.it>
  4. " URL: http://marcobari.altervista.org/pyrex_vim.html
  5. " Last Change: 2012 May 18
  6. " 2024 Jan 14 by Vim Project (browsefilter)
  7. " Only do this when not done yet for this buffer
  8. if exists("b:did_ftplugin")
  9. finish
  10. endif
  11. let s:keepcpo= &cpo
  12. set cpo&vim
  13. " Behaves just like Python
  14. runtime! ftplugin/python.vim ftplugin/python_*.vim ftplugin/python/*.vim
  15. if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
  16. let b:browsefilter = "Pyrex files (*.pyx, *.pxd)\t*.pyx;*.pxd\n" .
  17. \ "Python Files (*.py)\t*.py\n" .
  18. \ "C Source Files (*.c)\t*.c\n" .
  19. \ "C Header Files (*.h)\t*.h\n" .
  20. \ "C++ Source Files (*.cpp, *.c++)\t*.cpp;*.c++\n"
  21. if has("win32")
  22. let b:browsefilter .= "All Files (*.*)\t*\n"
  23. else
  24. let b:browsefilter .= "All Files (*)\t*\n"
  25. endif
  26. endif
  27. let &cpo = s:keepcpo
  28. unlet s:keepcpo