From d4818329bf021e015ea92705b7bb417e78edbdef Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Mon, 9 May 2022 16:39:21 +1200 Subject: Commit first version --- doc/html_spelllang.txt | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 doc/html_spelllang.txt (limited to 'doc') diff --git a/doc/html_spelllang.txt b/doc/html_spelllang.txt new file mode 100644 index 0000000..1ea93c0 --- /dev/null +++ b/doc/html_spelllang.txt @@ -0,0 +1,48 @@ +*html_spelllang.txt* For Vim version 8.2 Last change: 2022 May 9 + +DESCRIPTION *html_spelllang* + +This filetype plugin for HTML searches for ``, ``, and `
` +elements, and attempts to set the 'spelllang' option appropriately if it +detects that spelling files exist corresponding to any `lang=` attribute +defined for the lattermost instances of these elements within the first 128 +lines. + +This includes switching on common RFC 4646 language region codes; for example, +an `en-us` attribute may attempt to set 'spelllang' to `en_US`. Only simple +`LANGUAGE-REGION` codes are presently supported; there's quite a lot more to +the relevant RFC. + +It also includes a hook to re-check the same number of lines if the buffer is +modified, in case the language code has been updated. Where supported, this +is done with the |TextChanged| autocommand event. + +REQUIREMENTS *html_spelllang-requirements* + +This plugin is only available if 'compatible' is not set. It presently +requires Vim 8.2 or newer, but can almost certainly be back-ported. + +OPTIONS *html_spelllang-options* + +You probably don't actually want to change these, but just in case: + + *g:html_spelllang_lines* +Set `g:html_spelllang_lines` in your |vimrc| to a number besides 128 if you +want to change the number of lines to be checked for language codes in the +buffer, both on initial load and buffer modification. + + *g:html_spelllang_pattern* +Set `g:html_spelllang_pattern` in your |vimrc| if you really want to override +the pattern used to match the language code. You will want two matching +subgroups for |matchlist()|: one for the language, and a second for for the +optional region. + +AUTHOR *html_spelllang-author* + +Written and maintained by Tom Ryder . + +LICENSE *html_spelllang-license* + +Licensed for distribution under the same terms as Vim itself (see |license|). + + vim:tw=78:ts=8:ft=help:norl: -- cgit v1.2.3