sml.vim (1151B)
1 " Vim filetype plugin file 2 " Language: SML 3 " Filenames: *.sml *.sig 4 " Maintainer: tocariimaa <tocariimaa@firemail.cc> 5 " Last Change: 2025 Nov 04 6 " 2026 Jan 19 by Vim Project: add 'include' setting 7 8 if exists('b:did_ftplugin') 9 finish 10 endif 11 let b:did_ftplugin = 1 12 13 let s:cpo_save = &cpo 14 set cpo&vim 15 16 let b:undo_ftplugin = 'setl com< cms< fo< inc<' 17 18 setlocal formatoptions+=croql formatoptions-=t 19 setlocal commentstring=(*\ %s\ *) 20 setlocal comments=sr:(*,mb:*,ex:*) 21 setlocal include=^\\s*use\\> 22 23 if exists('loaded_matchit') 24 let b:match_ignorecase = 0 25 let b:match_words = '\<\%(abstype\|let\|local\|sig\|struct\)\>:\<\%(in\|with\)\>:\<end\>' 26 let b:undo_ftplugin ..= ' | unlet! b:match_ignorecase b:match_words' 27 endif 28 29 if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter") 30 let b:browsefilter = "SML Source Files (*.sml)\t*.sml\n" .. 31 \ "SML Signature Files (*.sig)\t*.sig\n" 32 if has("win32") 33 let b:browsefilter ..= "All Files (*.*)\t*\n" 34 else 35 let b:browsefilter ..= "All Files (*)\t*\n" 36 endif 37 let b:undo_ftplugin ..= " | unlet! b:browsefilter" 38 endif 39 40 let &cpo = s:cpo_save 41 unlet s:cpo_save