odin.vim 653 B

12345678910111213141516171819202122232425262728
  1. " Vim filetype plugin file
  2. " Language: Odin
  3. " Maintainer: Maxim Kim <habamax@gmail.com>
  4. " Website: https://github.com/habamax/vim-odin
  5. " Last Change: 2024 Jan 15
  6. " 2024-May 23 by Riley Bruins <ribru17@gmail.com> ('commentstring')
  7. "
  8. " This file has been manually translated from Vim9 script.
  9. if exists("b:did_ftplugin")
  10. finish
  11. endif
  12. let b:did_ftplugin = 1
  13. let s:cpo_save = &cpo
  14. set cpo&vim
  15. let b:undo_ftplugin = 'setlocal commentstring<'
  16. \ .. '| setlocal comments<'
  17. \ .. '| setlocal suffixesadd<'
  18. setlocal suffixesadd=.odin
  19. setlocal commentstring=//\ %s
  20. setlocal comments=s1:/*,mb:*,ex:*/,://
  21. let &cpo = s:cpo_save
  22. unlet s:cpo_save