blob: 4482b90d0b5667e31d080f590b11e0d4403d736e [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)
Riley Bruins0a083062024-06-03 20:40:45 +02007" 2024 May 23 by Riley Bruins <ribru17@gmail.com> ('commentstring')
Bram Moolenaaracc22402020-06-07 21:07:18 +02008
9if exists("b:did_ftplugin") | finish | endif
dkearnsf937ab32023-08-29 05:32:27 +100010let b:did_ftplugin = 1
Bram Moolenaaracc22402020-06-07 21:07:18 +020011
Wu, Zhenyudbca7d82024-04-10 22:57:31 +020012setl include=^\\s*%\\s*include
Bram Moolenaaracc22402020-06-07 21:07:18 +020013setl comments=:;,s1:/*,mb:*,ex:*/,://
Riley Bruins0a083062024-06-03 20:40:45 +020014setl commentstring=;\ %s
Bram Moolenaaracc22402020-06-07 21:07:18 +020015
Wu, Zhenyudbca7d82024-04-10 22:57:31 +020016let b:undo_ftplugin = "setl commentstring< comments< include<"
17
18" Matchit support
19if !exists('b:match_words')
20 let b:match_skip = 's:comment\|string\|character\|special'
21 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\>'
22 let b:match_ignorecase = 1
23 let b:undo_ftplugin ..= " | unlet! b:match_ignorecase b:match_words b:match_skip"
24endif