Mercurial > vim
comparison runtime/indent/xml.vim @ 14999:2b30a2b4bde2
Update runtime files
commit https://github.com/vim/vim/commit/ba3ff539303c7bb6e46a6802dce3c7b2e55284e0
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Nov 4 14:45:49 2018 +0100
Update runtime files
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 04 Nov 2018 15:00:08 +0100 |
parents | 2f7e67dd088c |
children | 8b334e4cb97f |
comparison
equal
deleted
inserted
replaced
14998:921dcc025fc7 | 14999:2b30a2b4bde2 |
---|---|
1 " Language: xml | 1 " Language: xml |
2 " Repository: https://github.com/chrisbra/vim-xml-ftplugin | 2 " Repository: https://github.com/chrisbra/vim-xml-ftplugin |
3 " Maintainer: Christian Brabandt <cb@256bit.org> | 3 " Maintainer: Christian Brabandt <cb@256bit.org> |
4 " Previous Maintainer: Johannes Zellner <johannes@zellner.org> | 4 " Previous Maintainer: Johannes Zellner <johannes@zellner.org> |
5 " Last Change: 20180724 - Correctly indent xml comments https://github.com/vim/vim/issues/3200 | 5 " Last Change: 20181022 - Do not overwrite indentkeys setting |
6 " https://github.com/chrisbra/vim-xml-ftplugin/issues/1 | |
7 " 20180724 - Correctly indent xml comments https://github.com/vim/vim/issues/3200 | |
6 " Notes: 1) does not indent pure non-xml code (e.g. embedded scripts) | 8 " Notes: 1) does not indent pure non-xml code (e.g. embedded scripts) |
7 " 2) will be confused by unbalanced tags in comments | 9 " 2) will be confused by unbalanced tags in comments |
8 " or CDATA sections. | 10 " or CDATA sections. |
9 " 2009-05-26 patch by Nikolai Weibull | 11 " 2009-05-26 patch by Nikolai Weibull |
10 " TODO: implement pre-like tags, see xml_indent_open / xml_indent_close | 12 " TODO: implement pre-like tags, see xml_indent_open / xml_indent_close |
17 let s:keepcpo= &cpo | 19 let s:keepcpo= &cpo |
18 set cpo&vim | 20 set cpo&vim |
19 | 21 |
20 " [-- local settings (must come before aborting the script) --] | 22 " [-- local settings (must come before aborting the script) --] |
21 setlocal indentexpr=XmlIndentGet(v:lnum,1) | 23 setlocal indentexpr=XmlIndentGet(v:lnum,1) |
22 setlocal indentkeys=o,O,*<Return>,<>>,<<>,/,{,} | 24 setlocal indentkeys=o,O,*<Return>,<>>,<<>,/,{,},!^F |
23 | 25 |
24 if !exists('b:xml_indent_open') | 26 if !exists('b:xml_indent_open') |
25 let b:xml_indent_open = '.\{-}<\a' | 27 let b:xml_indent_open = '.\{-}<\a' |
26 " pre tag, e.g. <address> | 28 " pre tag, e.g. <address> |
27 " let b:xml_indent_open = '.\{-}<[/]\@!\(address\)\@!' | 29 " let b:xml_indent_open = '.\{-}<[/]\@!\(address\)\@!' |