diff options
author | Bram Moolenaar <Bram@vim.org> | 2018-11-04 14:45:49 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2018-11-04 14:45:49 +0100 |
commit | ba3ff539303c7bb6e46a6802dce3c7b2e55284e0 (patch) | |
tree | aa03c46ea8b651302a19f537f92c3624c4ac5990 /runtime/indent | |
parent | dcd71cbaedf75dd8e5c5a45c5c2e3ec7ee552dce (diff) | |
download | vim-git-ba3ff539303c7bb6e46a6802dce3c7b2e55284e0.tar.gz |
Update runtime files
Diffstat (limited to 'runtime/indent')
-rw-r--r-- | runtime/indent/html.vim | 2 | ||||
-rw-r--r-- | runtime/indent/raml.vim | 12 | ||||
-rw-r--r-- | runtime/indent/testdir/README.txt | 17 | ||||
-rw-r--r-- | runtime/indent/xml.vim | 6 |
4 files changed, 28 insertions, 9 deletions
diff --git a/runtime/indent/html.vim b/runtime/indent/html.vim index 6c866594c..bece6614b 100644 --- a/runtime/indent/html.vim +++ b/runtime/indent/html.vim @@ -625,7 +625,7 @@ func! s:CSSIndent() return eval(b:hi_css1indent) endif - " If the current line starts with "}" align with it's match. + " If the current line starts with "}" align with its match. if curtext =~ '^\s*}' call cursor(v:lnum, 1) try diff --git a/runtime/indent/raml.vim b/runtime/indent/raml.vim new file mode 100644 index 000000000..73756ae7d --- /dev/null +++ b/runtime/indent/raml.vim @@ -0,0 +1,12 @@ +" Vim indent file +" Language: RAML (RESTful API Modeling Language) +" Maintainer: mucheng <leisurelicht@gmail.com> +" License: VIM LICENSE +" Latest Revision: 2018-11-03 + +if exists("b:did_indent") + finish +endif + +" Same as yaml indenting. +runtime! indent/yaml.vim diff --git a/runtime/indent/testdir/README.txt b/runtime/indent/testdir/README.txt index 8efd34ed4..28c162856 100644 --- a/runtime/indent/testdir/README.txt +++ b/runtime/indent/testdir/README.txt @@ -22,8 +22,12 @@ First of all, create a FILETYPE.in file. It should contain: endfunc " END_INDENT -- Optionally, a line with INDENT_EXE, followed by a Vim command. This will be - executed before indenting the lines. Example: + If you just want to test normal indenting with default options, you can make + this a large number of lines. Just add all kinds of language constructs, + nested statements, etc. with valid syntax. + +- Optionally, add lines with INDENT_EXE after START_INDENT, followed by a Vim + command. This will be executed before indenting the lines. Example: " START_INDENT " INDENT_EXE let g:vim_indent_cont = 6 @@ -36,8 +40,8 @@ First of all, create a FILETYPE.in file. It should contain: the next block of lines. - Alternatively to indenting all the lines between START_INDENT and - END_INDENT, use a INDENT_AT line, which specifies a pattern to find the line - to indent. Example: + END_INDENT, use an INDENT_AT line, which specifies a pattern to find the + line to indent. Example: " START_INDENT " INDENT_AT this-line @@ -47,7 +51,8 @@ First of all, create a FILETYPE.in file. It should contain: " END_INDENT Alternatively you can use INDENT_NEXT to indent the line below the matching - pattern: + pattern. Keep in mind that quite often it will indent relative to the + matching line: " START_INDENT " INDENT_NEXT next-line @@ -84,7 +89,7 @@ different from the FILETYPE.ok file. Check the contents of the FILETYPE.fail file. If it is perfectly OK, then rename it to overwrite the FILETYPE.ok file. If you now run "make test" again, the test will pass and create a FILETYPE.out file, which is identical to the -FILETYPE.ok file. +FILETYPE.ok file. The FILETYPE.fail file will be deleted. If you try to run "make test" again you will notice that nothing happens, because the FILETYPE.out file already exists. Delete it, or do "make clean", diff --git a/runtime/indent/xml.vim b/runtime/indent/xml.vim index dcafb467a..7afcc89b7 100644 --- a/runtime/indent/xml.vim +++ b/runtime/indent/xml.vim @@ -2,7 +2,9 @@ " Repository: https://github.com/chrisbra/vim-xml-ftplugin " Maintainer: Christian Brabandt <cb@256bit.org> " Previous Maintainer: Johannes Zellner <johannes@zellner.org> -" Last Change: 20180724 - Correctly indent xml comments https://github.com/vim/vim/issues/3200 +" Last Change: 20181022 - Do not overwrite indentkeys setting +" https://github.com/chrisbra/vim-xml-ftplugin/issues/1 +" 20180724 - Correctly indent xml comments https://github.com/vim/vim/issues/3200 " Notes: 1) does not indent pure non-xml code (e.g. embedded scripts) " 2) will be confused by unbalanced tags in comments " or CDATA sections. @@ -19,7 +21,7 @@ set cpo&vim " [-- local settings (must come before aborting the script) --] setlocal indentexpr=XmlIndentGet(v:lnum,1) -setlocal indentkeys=o,O,*<Return>,<>>,<<>,/,{,} +setlocal indentkeys=o,O,*<Return>,<>>,<<>,/,{,},!^F if !exists('b:xml_indent_open') let b:xml_indent_open = '.\{-}<\a' |