masm.vim 1.0 KB

123456789101112131415161718192021222324252627282930313233
  1. " Vim filetype plugin file
  2. " Language: Microsoft Macro Assembler (80x86)
  3. " Maintainer: Wu Yongwei <wuyongwei@gmail.com>
  4. " Last Change: 2022-04-24 21:24:52 +0800
  5. if exists("b:did_ftplugin")
  6. finish
  7. endif
  8. let b:did_ftplugin = 1
  9. let s:cpo_save = &cpo
  10. set cpo&vim
  11. let b:undo_ftplugin = "setl iskeyword<"
  12. setlocal iskeyword=@,48-57,_,36,60,62,63,@-@
  13. " Matchit support
  14. if !exists('b:match_words')
  15. let b:match_words = '^\s*\.IF\>:^\s*\.ELSEIF\>:^\s*\.ELSE\>:^\s*\.ENDIF\>,'
  16. \ .. '^\s*\.REPEAT\>:^\s*\.UNTIL\(CXZ\)\?\>,'
  17. \ .. '^\s*\.WHILE\>:^\s*\.ENDW\>,'
  18. \ .. '^\s*IF\(1\|2\|E\|DEF\|NDEF\|B\|NB\|IDNI\?\|DIFI\?\)\?\>:^\s*ELSEIF\(1\|2\|E\|DEF\|NDEF\|B\|NB\|IDNI\?\|DIFI\?\)\?\>:^\s*ELSE\>:^\s*ENDIF\>,'
  19. \ .. '\(\<MACRO\>\|^\s*%\?\s*FORC\?\>\|^\s*REPEAT\>\|^\s*WHILE\):^\s*ENDM\>,'
  20. \ .. '\<PROC\>:\<ENDP\>,'
  21. \ .. '\<SEGMENT\>:\<ENDS\>'
  22. let b:match_ignorecase = 1
  23. let b:undo_ftplugin ..= " | unlet! b:match_ignorecase b:match_words"
  24. endif
  25. let &cpo = s:cpo_save
  26. unlet s:cpo_save