blob: 0ae16103948292e33a27beb8c92d539b32cf4f6c [file] [log] [blame]
Bram Moolenaaracc22402020-06-07 21:07:18 +02001" Vim filetype plugin file
2" Language: asm
3" Maintainer: Colin Caine <cmcaine at the common googlemail domain>
Wu, Zhenyudbca7d82024-04-10 22:57:31 +02004" Last Change: 2020 May 23
dkearnsf937ab32023-08-29 05:32:27 +10005" 2023 Aug 28 by Vim Project (undo_ftplugin)
Wu, Zhenyudbca7d82024-04-10 22:57:31 +02006" 2024 Apr 09 by Vim Project (add Matchit support)
Bram Moolenaaracc22402020-06-07 21:07:18 +02007
8if exists("b:did_ftplugin") | finish | endif
dkearnsf937ab32023-08-29 05:32:27 +10009let b:did_ftplugin = 1
Bram Moolenaaracc22402020-06-07 21:07:18 +020010
Wu, Zhenyudbca7d82024-04-10 22:57:31 +020011setl include=^\\s*%\\s*include
Bram Moolenaaracc22402020-06-07 21:07:18 +020012setl comments=:;,s1:/*,mb:*,ex:*/,://
13setl commentstring=;%s
14
Wu, Zhenyudbca7d82024-04-10 22:57:31 +020015let b:undo_ftplugin = "setl commentstring< comments< include<"
16
17" Matchit support
18if !exists('b:match_words')
19 let b:match_skip = 's:comment\|string\|character\|special'
20 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\>'
21 let b:match_ignorecase = 1
22 let b:undo_ftplugin ..= " | unlet! b:match_ignorecase b:match_words b:match_skip"
23endif