mirror of
https://github.com/vim/vim.git
synced 2025-10-04 05:25:06 -04:00
Update runtime files
This commit is contained in:
@@ -1,10 +0,0 @@
|
||||
" Vim indent file
|
||||
" Language: confini
|
||||
|
||||
" Quit if an indent file was already loaded.
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
endif
|
||||
|
||||
" Use the cfg indenting, it's similar enough.
|
||||
runtime! indent/cfg.vim
|
@@ -1,10 +0,0 @@
|
||||
" Vim indent file
|
||||
" Language: systemd.unit(5)
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
endif
|
||||
|
||||
" Looks a lot like dosini files.
|
||||
runtime! indent/dosini.vim
|
@@ -2,7 +2,7 @@
|
||||
" Language: YAML
|
||||
" Maintainer: Nikolai Pavlov <zyx.vim@gmail.com>
|
||||
" Last Update: Lukas Reineke
|
||||
" Last Change: 2022 May 02
|
||||
" Last Change: 2022 Jun 17
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists('b:did_indent')
|
||||
@@ -44,30 +44,30 @@ function s:FindPrevLEIndentedLineMatchingRegex(lnum, regex)
|
||||
return plilnum
|
||||
endfunction
|
||||
|
||||
let s:mapkeyregex='\v^\s*\#@!\S@=%(\''%([^'']|\''\'')*\'''.
|
||||
\ '|\"%([^"\\]|\\.)*\"'.
|
||||
let s:mapkeyregex = '\v^\s*\#@!\S@=%(\''%([^'']|\''\'')*\''' ..
|
||||
\ '|\"%([^"\\]|\\.)*\"' ..
|
||||
\ '|%(%(\:\ )@!.)*)\:%(\ |$)'
|
||||
let s:liststartregex='\v^\s*%(\-%(\ |$))'
|
||||
let s:liststartregex = '\v^\s*%(\-%(\ |$))'
|
||||
|
||||
let s:c_ns_anchor_char = '\v%([\n\r\uFEFF \t,[\]{}]@!\p)'
|
||||
let s:c_ns_anchor_name = s:c_ns_anchor_char.'+'
|
||||
let s:c_ns_anchor_property = '\v\&'.s:c_ns_anchor_name
|
||||
let s:c_ns_anchor_name = s:c_ns_anchor_char .. '+'
|
||||
let s:c_ns_anchor_property = '\v\&' .. s:c_ns_anchor_name
|
||||
|
||||
let s:ns_word_char = '\v[[:alnum:]_\-]'
|
||||
let s:ns_tag_char = '\v%(%\x\x|'.s:ns_word_char.'|[#/;?:@&=+$.~*''()])'
|
||||
let s:c_named_tag_handle = '\v\!'.s:ns_word_char.'+\!'
|
||||
let s:ns_tag_char = '\v%(%\x\x|' .. s:ns_word_char .. '|[#/;?:@&=+$.~*''()])'
|
||||
let s:c_named_tag_handle = '\v\!' .. s:ns_word_char .. '+\!'
|
||||
let s:c_secondary_tag_handle = '\v\!\!'
|
||||
let s:c_primary_tag_handle = '\v\!'
|
||||
let s:c_tag_handle = '\v%('.s:c_named_tag_handle.
|
||||
\ '|'.s:c_secondary_tag_handle.
|
||||
\ '|'.s:c_primary_tag_handle.')'
|
||||
let s:c_ns_shorthand_tag = '\v'.s:c_tag_handle . s:ns_tag_char.'+'
|
||||
let s:c_tag_handle = '\v%(' .. s:c_named_tag_handle.
|
||||
\ '|' .. s:c_secondary_tag_handle.
|
||||
\ '|' .. s:c_primary_tag_handle .. ')'
|
||||
let s:c_ns_shorthand_tag = '\v' .. s:c_tag_handle .. s:ns_tag_char .. '+'
|
||||
let s:c_non_specific_tag = '\v\!'
|
||||
let s:ns_uri_char = '\v%(%\x\x|'.s:ns_word_char.'\v|[#/;?:@&=+$,.!~*''()[\]])'
|
||||
let s:c_verbatim_tag = '\v\!\<'.s:ns_uri_char.'+\>'
|
||||
let s:c_ns_tag_property = '\v'.s:c_verbatim_tag.
|
||||
\ '\v|'.s:c_ns_shorthand_tag.
|
||||
\ '\v|'.s:c_non_specific_tag
|
||||
let s:ns_uri_char = '\v%(%\x\x|' .. s:ns_word_char .. '\v|[#/;?:@&=+$,.!~*''()[\]])'
|
||||
let s:c_verbatim_tag = '\v\!\<' .. s:ns_uri_char.. '+\>'
|
||||
let s:c_ns_tag_property = '\v' .. s:c_verbatim_tag.
|
||||
\ '\v|' .. s:c_ns_shorthand_tag.
|
||||
\ '\v|' .. s:c_non_specific_tag
|
||||
|
||||
let s:block_scalar_header = '\v[|>]%([+-]?[1-9]|[1-9]?[+-])?'
|
||||
|
||||
@@ -142,9 +142,9 @@ function GetYAMLIndent(lnum)
|
||||
" - List with
|
||||
" multiline scalar
|
||||
return previndent+2
|
||||
elseif prevline =~# s:mapkeyregex . '\v\s*%(%('.s:c_ns_tag_property.
|
||||
\ '\v|'.s:c_ns_anchor_property.
|
||||
\ '\v|'.s:block_scalar_header.
|
||||
elseif prevline =~# s:mapkeyregex .. '\v\s*%(%(' .. s:c_ns_tag_property ..
|
||||
\ '\v|' .. s:c_ns_anchor_property ..
|
||||
\ '\v|' .. s:block_scalar_header ..
|
||||
\ '\v)%(\s+|\s*%(\#.*)?$))*'
|
||||
" Mapping with: value
|
||||
" that is multiline scalar
|
||||
|
Reference in New Issue
Block a user