diff --git a/runtime/autoload/dist/ft.vim b/runtime/autoload/dist/ft.vim index f6ef9be891..f513a2ac8f 100644 --- a/runtime/autoload/dist/ft.vim +++ b/runtime/autoload/dist/ft.vim @@ -1,7 +1,7 @@ " Vim functions for file type detection " " Maintainer: Bram Moolenaar -" Last Change: 2022 Jan 28 +" Last Change: 2022 Jan 31 " These functions are moved here from runtime/filetype.vim to make startup " faster. @@ -67,7 +67,7 @@ func dist#ft#FTasmsyntax() endif endfunc -func dist#ft#FTbas() +func dist#ft#FTbas(alt = '') if exists("g:filetype_bas") exe "setf " . g:filetype_bas return @@ -88,6 +88,8 @@ func dist#ft#FTbas() setf qb64 elseif match(lines, '\cVB_Name\|Begin VB\.\(Form\|MDIForm\|UserControl\)') > -1 setf vb + elseif a:alt != '' + exe 'setf ' .. a:alt else setf basic endif diff --git a/runtime/doc/indent.txt b/runtime/doc/indent.txt index a76f8636f8..d0d4ddad32 100644 --- a/runtime/doc/indent.txt +++ b/runtime/doc/indent.txt @@ -771,6 +771,15 @@ You can set the indent for the first line after +
+text +
% END_INDENT diff --git a/runtime/indent/testdir/html.ok b/runtime/indent/testdir/html.ok index c0dfc9dc72..938e965d8c 100644 --- a/runtime/indent/testdir/html.ok +++ b/runtime/indent/testdir/html.ok @@ -1,4 +1,4 @@ -" vim: set ft=html sw=4 : +" vim: set ft=html sw=4 ts=8 : " START_INDENT @@ -41,6 +41,11 @@ div#d2 { color: green; } dt text +
+ text +
@@ -50,6 +55,7 @@ div#d2 { color: green; } % START_INDENT % INDENT_EXE let g:html_indent_style1 = "inc" % INDENT_EXE let g:html_indent_script1 = "zero" +% INDENT_EXE let g:html_indent_attribute = 1 % INDENT_EXE call HtmlIndent_CheckUserSettings() @@ -61,6 +67,11 @@ div#d2 { color: green; } var v1 = "v1"; var v2 = "v2"; +
+ text +
% END_INDENT diff --git a/runtime/lua/vim/filetype.lua b/runtime/lua/vim/filetype.lua index adc838578d..ff44f48195 100644 --- a/runtime/lua/vim/filetype.lua +++ b/runtime/lua/vim/filetype.lua @@ -789,7 +789,7 @@ local extension = { ex = function() vim.fn["dist#ft#ExCheck"]() end, exu = function() vim.fn["dist#ft#EuphoriaCheck"]() end, exw = function() vim.fn["dist#ft#EuphoriaCheck"]() end, - frm = function() vim.fn["dist#ft#FTVB"]("form") end, + frm = function() vim.fn["dist#ft#FTbas"]("form") end, fs = function() vim.fn["dist#ft#FTfs"]() end, h = function() vim.fn["dist#ft#FTheader"]() end, htm = function() vim.fn["dist#ft#FThtml"]() end,