Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit16c8152

Browse files
vim-patch:7dfdc7f: runtime(sml): add filetype plugin, move options from indent to ftplugin (#36460)
closes:vim/vim#18680vim/vim@7dfdc7fCo-authored-by: tocariimaa <tocariimaa@pissmail.com>
1 parent0472119 commit16c8152

File tree

2 files changed

+45
-11
lines changed

2 files changed

+45
-11
lines changed

‎runtime/ftplugin/sml.vim‎

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
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+
7+
ifexists('b:did_ftplugin')
8+
finish
9+
endif
10+
letb:did_ftplugin=1
11+
12+
lets:cpo_save= &cpo
13+
setcpo&vim
14+
15+
letb:undo_ftplugin='setl com< cms< fo<'
16+
17+
setlocalformatoptions+=croqlformatoptions-=t
18+
setlocalcommentstring=(*\%s\*)
19+
setlocalcomments=sr:(*,mb:*,ex:*)
20+
21+
ifexists('loaded_matchit')
22+
letb:match_ignorecase=0
23+
letb:match_words='\<\%(abstype\|let\|local\|sig\|struct\)\>:\<\%(in\|with\)\>:\<end\>'
24+
letb:undo_ftplugin ..=' | unlet! b:match_ignorecase b:match_words'
25+
endif
26+
27+
if (has("gui_win32")||has("gui_gtk"))&&!exists("b:browsefilter")
28+
letb:browsefilter="SML Source Files (*.sml)\t*.sml\n" ..
29+
\"SML Signature Files (*.sig)\t*.sig\n"
30+
ifhas("win32")
31+
letb:browsefilter ..="All Files (*.*)\t*\n"
32+
else
33+
letb:browsefilter ..="All Files (*)\t*\n"
34+
endif
35+
letb:undo_ftplugin ..=" | unlet! b:browsefilter"
36+
endif
37+
38+
let &cpo=s:cpo_save
39+
unlets:cpo_save

‎runtime/indent/sml.vim‎

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
" Vim indent file
22
" Language: SML
3-
" Maintainer:Saikat Guha <sg266@cornell.edu>
4-
"Hubert Chao <hc85@cornell.edu>
3+
" Maintainer:Saikat Guha <sg266@cornell.edu>
4+
"Hubert Chao <hc85@cornell.edu>
55
" Original OCaml Version:
6-
"Jean-Francois Yuen <jfyuen@ifrance.com>
6+
"Jean-Francois Yuen <jfyuen@ifrance.com>
77
" Mike Leary <leary@nwlink.com>
88
" Markus Mottl <markus@oefai.at>
99
" OCaml URL: http://www.oefai.at/~markus/vim/indent/ocaml.vim
1010
" Last Change: 2022 Apr 06
11-
"2002 Nov 06 - Some fixes (JY)
11+
"2002 Nov 06 - Some fixes (JY)
1212
" 2002 Oct 28 - Fixed bug with indentation of ']' (MM)
1313
" 2002 Oct 22 - Major rewrite (JY)
14-
"2022 April: b:undo_indent added by Doug Kearns
14+
" 2022 Apr 08 - b:undo_indent added by Doug Kearns
15+
" 2025 Nov 04 - Move comments and formatoptions to ftplugin
1516

1617
" Only load this indent file when no other was loaded.
1718
ifexists("b:did_indent")
@@ -29,12 +30,6 @@ setlocal shiftwidth=2
2930

3031
letb:undo_indent="setl et< inde< indk< lisp< si< sw< tw<"
3132

32-
" Comment formatting
33-
if (has("comments"))
34-
setcomments=sr:(*,mb:*,ex:*)
35-
setfo=cqort
36-
endif
37-
3833
" Only define the function once.
3934
"if exists("*GetSMLIndent")
4035
"finish

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp