asm.vim 933 B

12345678910111213141516171819202122232425
  1. " Vim filetype plugin file
  2. " Language: asm
  3. " Maintainer: Colin Caine <cmcaine at the common googlemail domain>
  4. " Last Change: 2020 May 23
  5. " 2023 Aug 28 by Vim Project (undo_ftplugin)
  6. " 2024 Apr 09 by Vim Project (add Matchit support)
  7. " 2024 May 23 by Riley Bruins <ribru17@gmail.com> ('commentstring')
  8. if exists("b:did_ftplugin") | finish | endif
  9. let b:did_ftplugin = 1
  10. setl include=^\\s*%\\s*include
  11. setl comments=:;,s1:/*,mb:*,ex:*/,://
  12. setl commentstring=;\ %s
  13. let b:undo_ftplugin = "setl commentstring< comments< include<"
  14. " Matchit support
  15. if !exists('b:match_words')
  16. let b:match_skip = 's:comment\|string\|character\|special'
  17. let b:match_words = '^\s*%\s*if\%(\|num\|idn\|nidn\)\>:^\s*%\s*elif\>:^\s*%\s*else\>:^\s*%\s*endif\>,^\s*%\s*macro\>:^\s*%\s*endmacro\>,^\s*%\s*rep\>:^\s*%\s*endrep\>'
  18. let b:match_ignorecase = 1
  19. let b:undo_ftplugin ..= " | unlet! b:match_ignorecase b:match_words b:match_skip"
  20. endif