mirror of
https://github.com/sheerun/vim-polyglot.git
synced 2025-11-08 11:33:52 -05:00
Update
This commit is contained in:
@@ -166,7 +166,7 @@ On top of all language packs from [vim repository](https://github.com/vim/vim/tr
|
||||
- [requirements](https://github.com/raimon49/requirements.txt.vim) (Syntax highlighting for pip files)
|
||||
- [rspec](https://github.com/keith/rspec.vim)
|
||||
- [rst](https://github.com/marshallward/vim-restructuredtext) (reStructuredText syntax highlighting for rst, rest, rest.txt and rst.txt files)
|
||||
- [ruby](https://github.com/vim-ruby/vim-ruby) (Ruby and HTML+ERB syntax highlighting for rb, builder, eye, fcgi, gemspec and 25 more files)
|
||||
- [ruby](https://github.com/vim-ruby/vim-ruby) (Ruby and HTML+ERB syntax highlighting for rb, builder, eye, fcgi, gemspec and 26 more files)
|
||||
- [rust](https://github.com/rust-lang/rust.vim) (Rust syntax highlighting for rs and rs.in files)
|
||||
- [scala](https://github.com/derekwyatt/vim-scala) (Scala syntax highlighting for scala, kojo and sc files)
|
||||
- [scss](https://github.com/cakebaker/scss-syntax.vim) (SCSS syntax highlighting for scss files)
|
||||
@@ -198,7 +198,7 @@ On top of all language packs from [vim repository](https://github.com/vim/vim/tr
|
||||
- [velocity](https://github.com/lepture/vim-velocity) (Syntax highlighting for vm files)
|
||||
- [vue](https://github.com/posva/vim-vue) (Vue syntax highlighting for vue and wpy files)
|
||||
- [xdc](https://github.com/amal-khailtash/vim-xdc-syntax) (Syntax highlighting for xdc files)
|
||||
- [xml](https://github.com/amadeus/vim-xml) (XML syntax highlighting for xml, adml, admx, ant, axml and 95 more files)
|
||||
- [xml](https://github.com/amadeus/vim-xml) (XML syntax highlighting for xml, adml, admx, ant, axml and 96 more files)
|
||||
- [xsl](https://github.com/vim-scripts/XSLT-syntax) (XSLT syntax highlighting for xslt and xsl files)
|
||||
- [yard](https://github.com/noprompt/vim-yardoc)
|
||||
- [zephir](https://github.com/xwsoul/vim-zephir) (Zephir syntax highlighting for zep files)
|
||||
|
||||
40
after/ftplugin/requirements.vim
Normal file
40
after/ftplugin/requirements.vim
Normal file
@@ -0,0 +1,40 @@
|
||||
if polyglot#init#is_disabled(expand('<sfile>:p'), 'requirements', 'after/ftplugin/requirements.vim')
|
||||
finish
|
||||
endif
|
||||
|
||||
" the Requirements File Format syntax support for Vim
|
||||
" Version: 1.6.0
|
||||
" Author: raimon <raimon49@hotmail.com>
|
||||
" License: MIT LICENSE
|
||||
" The MIT License (MIT)
|
||||
"
|
||||
" Copyright (c) 2015 raimon
|
||||
"
|
||||
" Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
" of this software and associated documentation files (the "Software"), to deal
|
||||
" in the Software without restriction, including without limitation the rights
|
||||
" to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
" copies of the Software, and to permit persons to whom the Software is
|
||||
" furnished to do so, subject to the following conditions:
|
||||
"
|
||||
" The above copyright notice and this permission notice shall be included in all
|
||||
" copies or substantial portions of the Software.
|
||||
"
|
||||
" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
" AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
" OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
" SOFTWARE.
|
||||
if executable('pip-compile')
|
||||
let s:filename = expand("%:p")
|
||||
if fnamemodify(s:filename, ":t") ==# 'requirements.in'
|
||||
" this is the default filename for pip-compile
|
||||
setlocal makeprg=pip-compile
|
||||
elseif fnamemodify(s:filename, ":e") ==# 'in'
|
||||
\ && Requirements_matched_filename(s:filename)
|
||||
setlocal makeprg=pip-compile\ %
|
||||
endif
|
||||
endif
|
||||
" vim: et sw=4 ts=4 sts=4:
|
||||
@@ -2,7 +2,7 @@ if polyglot#init#is_disabled(expand('<sfile>:p'), 'graphql', 'after/indent/javas
|
||||
finish
|
||||
endif
|
||||
|
||||
" Copyright (c) 2016-2020 Jon Parise <jon@indelible.org>
|
||||
" Copyright (c) 2016-2021 Jon Parise <jon@indelible.org>
|
||||
"
|
||||
" Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
" of this software and associated documentation files (the "Software"), to
|
||||
|
||||
@@ -2,7 +2,7 @@ if polyglot#init#is_disabled(expand('<sfile>:p'), 'graphql', 'after/indent/php.v
|
||||
finish
|
||||
endif
|
||||
|
||||
" Copyright (c) 2016-2020 Jon Parise <jon@indelible.org>
|
||||
" Copyright (c) 2016-2021 Jon Parise <jon@indelible.org>
|
||||
"
|
||||
" Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
" of this software and associated documentation files (the "Software"), to
|
||||
|
||||
@@ -2,7 +2,7 @@ if polyglot#init#is_disabled(expand('<sfile>:p'), 'graphql', 'after/indent/types
|
||||
finish
|
||||
endif
|
||||
|
||||
" Copyright (c) 2016-2020 Jon Parise <jon@indelible.org>
|
||||
" Copyright (c) 2016-2021 Jon Parise <jon@indelible.org>
|
||||
"
|
||||
" Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
" of this software and associated documentation files (the "Software"), to
|
||||
|
||||
@@ -2,7 +2,7 @@ if polyglot#init#is_disabled(expand('<sfile>:p'), 'graphql', 'after/syntax/javas
|
||||
finish
|
||||
endif
|
||||
|
||||
" Copyright (c) 2016-2020 Jon Parise <jon@indelible.org>
|
||||
" Copyright (c) 2016-2021 Jon Parise <jon@indelible.org>
|
||||
"
|
||||
" Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
" of this software and associated documentation files (the "Software"), to
|
||||
|
||||
@@ -2,7 +2,7 @@ if polyglot#init#is_disabled(expand('<sfile>:p'), 'graphql', 'after/syntax/php/g
|
||||
finish
|
||||
endif
|
||||
|
||||
" Copyright (c) 2016-2020 Jon Parise <jon@indelible.org>
|
||||
" Copyright (c) 2016-2021 Jon Parise <jon@indelible.org>
|
||||
"
|
||||
" Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
" of this software and associated documentation files (the "Software"), to
|
||||
|
||||
@@ -2,7 +2,7 @@ if polyglot#init#is_disabled(expand('<sfile>:p'), 'graphql', 'after/syntax/reaso
|
||||
finish
|
||||
endif
|
||||
|
||||
" Copyright (c) 2016-2020 Jon Parise <jon@indelible.org>
|
||||
" Copyright (c) 2016-2021 Jon Parise <jon@indelible.org>
|
||||
"
|
||||
" Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
" of this software and associated documentation files (the "Software"), to
|
||||
@@ -38,4 +38,5 @@ if exists('s:current_syntax')
|
||||
let b:current_syntax = s:current_syntax
|
||||
endif
|
||||
|
||||
syntax region graphqlExtensionPoint matchgroup=Noise start=+\[%graphql\_s*{|+lc=10 end=+|}\_s*]+he=s+1 contains=@GraphQLSyntax keepend
|
||||
syntax region graphqlExtensionPoint start=+\[%graphql+ end=+\]+ contains=graphqlExtensionPointS
|
||||
syntax region graphqlExtensionPointS matchgroup=String start=+{|+ end=+|}+ contains=@GraphQLSyntax contained
|
||||
|
||||
@@ -2,7 +2,7 @@ if polyglot#init#is_disabled(expand('<sfile>:p'), 'graphql', 'after/syntax/types
|
||||
finish
|
||||
endif
|
||||
|
||||
" Copyright (c) 2016-2020 Jon Parise <jon@indelible.org>
|
||||
" Copyright (c) 2016-2021 Jon Parise <jon@indelible.org>
|
||||
"
|
||||
" Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
" of this software and associated documentation files (the "Software"), to
|
||||
|
||||
@@ -12,28 +12,14 @@ function! s:L2U_Setup()
|
||||
|
||||
" Keep track of whether LaTeX-to-Unicode is activated
|
||||
" (used when filetype changes)
|
||||
if !has_key(b:, "l2u_enabled")
|
||||
let b:l2u_enabled = 0
|
||||
endif
|
||||
if !has_key(b:, "l2u_autodetect_enable")
|
||||
let b:l2u_autodetect_enable = 1
|
||||
endif
|
||||
let b:l2u_enabled = get(b:, "l2u_enabled", 0)
|
||||
let b:l2u_autodetect_enable = get(b:, "l2u_autodetect_enable", 1)
|
||||
|
||||
" Did we install the L2U tab mappings?
|
||||
if !has_key(b:, "l2u_tab_set")
|
||||
let b:l2u_tab_set = 0
|
||||
endif
|
||||
if !has_key(b:, "l2u_cmdtab_set")
|
||||
let b:l2u_cmdtab_set = 0
|
||||
endif
|
||||
if !has_key(b:, "l2u_keymap_set")
|
||||
let b:l2u_keymap_set = 0
|
||||
endif
|
||||
|
||||
" Did we activate the L2U as-you-type substitutions?
|
||||
if !has_key(b:, "l2u_autosub_set")
|
||||
let b:l2u_autosub_set = 0
|
||||
endif
|
||||
" Did we install the L2U tab/as-you-type/keymap... mappings?
|
||||
let b:l2u_tab_set = get(b:, "l2u_tab_set", 0)
|
||||
let b:l2u_cmdtab_set = get(b:, "l2u_cmdtab_set", 0)
|
||||
let b:l2u_autosub_set = get(b:, "l2u_autosub_set", 0)
|
||||
let b:l2u_keymap_set = get(b:, "l2u_keymap_set", 0)
|
||||
|
||||
" Following are some flags used to pass information between the function which
|
||||
" attempts the LaTeX-to-Unicode completion and the fallback function
|
||||
@@ -77,17 +63,19 @@ function! s:L2U_SetupGlobal()
|
||||
let g:latex_to_unicode_suggestions = 0
|
||||
endif
|
||||
|
||||
" A hack to forcibly get out of completion mode: feed
|
||||
" this string with feedkeys()
|
||||
if has("win32") || has("win64")
|
||||
let s:l2u_esc_sequence = "\u0006"
|
||||
else
|
||||
let s:l2u_esc_sequence = "\u0091\b"
|
||||
end
|
||||
" Forcibly get out of completion mode: feed
|
||||
" this string with feedkeys(s:l2u_esc_sequence, 'n')
|
||||
let s:l2u_esc_sequence = " \b"
|
||||
|
||||
" Trigger for the previous mapping of <Tab>
|
||||
let s:l2u_fallback_trigger = "\u0091L2UFallbackTab"
|
||||
|
||||
" Trigger for the previous mapping of <CR>
|
||||
let s:l2u_fallback_trigger_cr = "\u0091L2UFallbackCR"
|
||||
|
||||
" Trigger for autosub completion cleanup autocommand
|
||||
let s:l2u_autosub_cleanup_trigger = "\u0091L2UAutosubCleanup"
|
||||
|
||||
endfunction
|
||||
|
||||
" Each time the filetype changes, we may need to enable or
|
||||
@@ -203,7 +191,7 @@ function! s:L2U_ismatch()
|
||||
if col0 == -1
|
||||
return 0
|
||||
endif
|
||||
let base = l[col0 : col1-1]
|
||||
let base = l[col0:col1-2]
|
||||
return has_key(g:l2u_symbols_dict, base)
|
||||
endfunction
|
||||
|
||||
@@ -258,8 +246,14 @@ function! LaTeXtoUnicode#completefunc(findstart, base)
|
||||
let b:l2u_in_fallback = 0
|
||||
return -3
|
||||
endif
|
||||
" make sure that the options are still set
|
||||
" (it may happen that <C-X><C-U> itself triggers the fallback before
|
||||
" restarting, thus reseetting them; this happens when the prompt is
|
||||
" waiting for ^U^N^P during a partial completion)
|
||||
call s:L2U_SetCompleteopt()
|
||||
" setup the cleanup/fallback operations when we're done
|
||||
call s:L2U_InsertCompleteDoneAutocommand()
|
||||
call s:L2U_InsertInsertLeaveAutocommand()
|
||||
" set info for the callback
|
||||
let b:l2u_found_completion = 1
|
||||
" analyse current line
|
||||
@@ -345,48 +339,83 @@ function! LaTeXtoUnicode#PutLiteral(k)
|
||||
return ''
|
||||
endfunction
|
||||
|
||||
function! LaTeXtoUnicode#PutLiteralCR()
|
||||
call feedkeys('
|
||||
', 'ni')
|
||||
return ''
|
||||
endfunction
|
||||
|
||||
" Function which saves the current insert-mode mapping of a key sequence `s`
|
||||
" <Tab> mapping into the Fallback trigger)
|
||||
" and associates it with another key sequence `k` (e.g. stores the current
|
||||
" <Tab> mapping into the Fallback trigger).
|
||||
" It returns the previous maparg dictionary, so that the previous mapping can
|
||||
" be reinstated if needed.
|
||||
function! s:L2U_SetFallbackMapping(s, k)
|
||||
let mmdict = maparg(a:s, 'i', 0, 1)
|
||||
if empty(mmdict)
|
||||
return
|
||||
exe 'inoremap <buffer> ' . a:k . ' ' . a:s
|
||||
return mmdict
|
||||
endif
|
||||
let rhs = mmdict["rhs"]
|
||||
return
|
||||
if rhs =~# '^<Plug>L2U'
|
||||
return mmdict
|
||||
endif
|
||||
if mmdict["silent"]
|
||||
let pre = pre . '<silent>'
|
||||
endif
|
||||
if mmdict["expr"]
|
||||
let pre = pre . '<expr>'
|
||||
endif
|
||||
let pre = '<buffer>'
|
||||
let pre = pre . (mmdict["silent"] ? '<silent>' : '')
|
||||
let pre = pre . (mmdict["expr"] ? '<expr>' : '')
|
||||
if mmdict["noremap"]
|
||||
let cmd = 'inoremap '
|
||||
else
|
||||
let cmd = 'imap '
|
||||
" general solution.
|
||||
" This is a nasty hack used to prevent infinite recursion. It's not a
|
||||
" general solution. Also, it doesn't work with <CR> since that stops
|
||||
" parsing of the <C-R>=... expression, so we need to special-case it.
|
||||
" Also, if the original mapping was intended to be recursive, this
|
||||
" will break it.
|
||||
let rhs = substitute(rhs, '\c' . a:s, "\<C-R>=LaTeXtoUnicode#PutLiteral('" . a:s . "')\<CR>", 'g')
|
||||
if mmdict["expr"]
|
||||
if a:s != "<CR>"
|
||||
let rhs = substitute(rhs, '\c' . a:s, "\<C-R>=LaTeXtoUnicode#PutLiteral('" . a:s . "')\<CR>", 'g')
|
||||
else
|
||||
let rhs = substitute(rhs, '\c' . a:s, "\<C-R>=LaTeXtoUnicode#PutLiteralCR()\<CR>", 'g')
|
||||
endif
|
||||
" Make the mapping silent even if it wasn't originally
|
||||
if !mmdict["silent"]
|
||||
let pre = pre . '<silent>'
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
exe cmd . pre . ' ' . a:k . ' ' . rhs
|
||||
return mmdict
|
||||
endfunction
|
||||
|
||||
" Reinstate a mapping from the maparg dict returned by SetFallbackMapping
|
||||
" (only if buffer-local, since otherwise it should still be available)
|
||||
function! s:L2U_ReinstateMapping(mmdict)
|
||||
if empty(a:mmdict) || !a:mmdict["buffer"]
|
||||
return ''
|
||||
endif
|
||||
let lhs = a:mmdict["lhs"]
|
||||
let rhs = a:mmdict["rhs"]
|
||||
if rhs =~# '^<Plug>L2U'
|
||||
return ''
|
||||
endif
|
||||
let pre = '<buffer>'
|
||||
let pre = pre . (a:mmdict["silent"] ? '<silent>' : '')
|
||||
let pre = pre . (a:mmdict["expr"] ? '<expr>' : '')
|
||||
let cmd = a:mmdict["noremap"] ? 'inoremap ' : 'imap '
|
||||
exe cmd . pre . ' ' . lhs . ' ' . rhs
|
||||
endfunction
|
||||
|
||||
" This is the function which is mapped to <Tab>
|
||||
function! LaTeXtoUnicode#Tab()
|
||||
" the <Tab> is passed through to the fallback mapping if the completion
|
||||
" isn't an exact match before the cursor when suggestions are disabled
|
||||
if pumvisible() && !b:l2u_tab_completing && (get(g:, "latex_to_unicode_suggestions", 1) || !s:L2U_ismatch())
|
||||
" menu is present, and it hasn't been raised by the L2U tab, and there
|
||||
" isn't an exact match before the cursor
|
||||
if pumvisible() && !b:l2u_tab_completing && !s:L2U_ismatch()
|
||||
call feedkeys(s:l2u_fallback_trigger)
|
||||
return ''
|
||||
endif
|
||||
" ensure that we start completion with some reasonable options
|
||||
call s:L2U_SetCompleteopt()
|
||||
" reset the in_fallback info
|
||||
let b:l2u_in_fallback = 0
|
||||
@@ -497,7 +526,7 @@ function! s:L2U_RestoreCompleteopt()
|
||||
endif
|
||||
endfunction
|
||||
|
||||
augroup L2UTab
|
||||
function! s:L2U_InsertCompleteDoneAutocommand()
|
||||
augroup L2UCompleteDone
|
||||
autocmd! * <buffer>
|
||||
" Every time a L2U completion finishes, the fallback may be invoked
|
||||
@@ -505,11 +534,25 @@ function! s:L2U_InsertCompleteDoneAutocommand()
|
||||
augroup END
|
||||
endfunction
|
||||
|
||||
augroup L2UTab
|
||||
function! s:L2U_RemoveCompleteDoneAutocommand()
|
||||
augroup L2UCompleteDone
|
||||
autocmd! * <buffer>
|
||||
augroup END
|
||||
endfunction
|
||||
|
||||
function s:L2U_InsertLeaveClenup()
|
||||
call s:L2U_ResetLastCompletionInfo()
|
||||
augroup L2UInsertLeave
|
||||
autocmd! * <buffer>
|
||||
augroup END
|
||||
endfunction
|
||||
|
||||
function! s:L2U_InsertInsertLeaveAutocommand()
|
||||
augroup L2UInsertLeave
|
||||
autocmd! * <buffer>
|
||||
autocmd InsertLeave <buffer> call s:L2U_InsertLeaveClenup()
|
||||
augroup END
|
||||
endfunction
|
||||
|
||||
" Setup the L2U tab mapping
|
||||
function! s:L2U_SetTab(wait_insert_enter)
|
||||
@@ -537,12 +580,12 @@ function! s:L2U_SetTab(wait_insert_enter)
|
||||
return
|
||||
endif
|
||||
|
||||
if get(b:, "prev_completefunc", "") != "LaTeXtoUnicode#completefunc"
|
||||
let b:prev_completefunc = &completefunc
|
||||
" Backup the previous completefunc (the check is probably not really needed)
|
||||
if get(b:, "l2u_prev_completefunc", "") != "LaTeXtoUnicode#completefunc"
|
||||
let b:l2u_prev_completefunc = &completefunc
|
||||
endif
|
||||
setlocal completefunc=LaTeXtoUnicode#completefunc
|
||||
call s:L2U_SetFallbackMapping('<Tab>', s:l2u_fallback_trigger)
|
||||
|
||||
let b:l2u_prev_map_tab = s:L2U_SetFallbackMapping('<Tab>', s:l2u_fallback_trigger)
|
||||
imap <buffer> <Tab> <Plug>L2UTab
|
||||
inoremap <buffer><expr> <Plug>L2UTab LaTeXtoUnicode#Tab()
|
||||
@@ -560,10 +603,10 @@ function! s:L2U_UnsetTab()
|
||||
endif
|
||||
if !b:l2u_tab_set
|
||||
return
|
||||
exec "setlocal completefunc=" . get(b:, "prev_completefunc", "")
|
||||
endif
|
||||
exec "setlocal completefunc=" . get(b:, "l2u_prev_completefunc", "")
|
||||
iunmap <buffer> <Tab>
|
||||
call s:L2U_SetFallbackMapping(s:l2u_fallback_trigger, '<Tab>')
|
||||
if empty(maparg("<Tab>", "i"))
|
||||
call s:L2U_ReinstateMapping(b:l2u_prev_map_tab)
|
||||
endif
|
||||
iunmap <buffer> <Plug>L2UTab
|
||||
@@ -572,13 +615,25 @@ endfunction
|
||||
endfunction
|
||||
|
||||
" Function which looks for viable LaTeX-to-Unicode supstitutions as you type
|
||||
function! LaTeXtoUnicode#AutoSub(...)
|
||||
" avoid recursive calls
|
||||
if get(b:, "l2u_in_autosub", 0)
|
||||
return ''
|
||||
endif
|
||||
let vc = a:0 == 0 ? v:char : a:1
|
||||
" for some reason function keys seem to be passed as characters 149 (F1-F12)
|
||||
" or 186 (F13-F37, these are entered with shift/ctrl). In such cases, we
|
||||
" can't really do any better than giving up.
|
||||
if char2nr(vc) == 149 || char2nr(vc) == 186
|
||||
return ''
|
||||
endif
|
||||
let b:l2u_in_autosub = 1
|
||||
let col1 = col('.')
|
||||
let lnum = line('.')
|
||||
if col1 == 1
|
||||
call feedkeys(a:2, 'n')
|
||||
if a:0 > 1
|
||||
call feedkeys(a:2, 't')
|
||||
endif
|
||||
let b:l2u_in_autosub = 0
|
||||
return ''
|
||||
endif
|
||||
@@ -586,21 +641,42 @@ function! LaTeXtoUnicode#AutoSub(...)
|
||||
let l = getline(lnum)[0 : col1-1-bs] . v:char
|
||||
let col0 = match(l, '\\\%([_^]\?[A-Za-z]\+\%' . col1 . 'c\%([^A-Za-z]\|$\)\|[_^]\%([0-9()=+-]\)\%' . col1 .'c\%(.\|$\)\)')
|
||||
if col0 == -1
|
||||
call feedkeys(a:2, 'n')
|
||||
if a:0 > 1
|
||||
call feedkeys(a:2, 't')
|
||||
endif
|
||||
let b:l2u_in_autosub = 0
|
||||
return ''
|
||||
let base = l[col0 : -1-bs]
|
||||
endif
|
||||
let base = l[col0 : col1-1-bs]
|
||||
let unicode = get(g:l2u_symbols_dict, base, '')
|
||||
if empty(unicode)
|
||||
call feedkeys(a:2, 'n')
|
||||
if a:0 > 1
|
||||
call feedkeys(a:2, 't')
|
||||
endif
|
||||
let b:l2u_in_autosub = 0
|
||||
return ''
|
||||
endif
|
||||
|
||||
" create a temporary mapping to reset b:l2u_in_autosub when done
|
||||
" (when invoked, it removes itself)
|
||||
exec 'imap <buffer> ' . s:l2u_autosub_cleanup_trigger . ' <Plug>L2UAutosubReset'
|
||||
inoremap <buffer><expr> <Plug>L2UAutosubReset <SID>L2U_AutosubReset()
|
||||
|
||||
" perform the substitution, wrapping it in undo breakpoints so that
|
||||
" we can revert it as a whole
|
||||
call feedkeys("\<C-G>u", 'n')
|
||||
call feedkeys(repeat("\b", len(base) + bs) . unicode . vc . s:l2u_esc_sequence, 'nt')
|
||||
call feedkeys("\<C-G>u", 'n')
|
||||
" enqueue the reset mechanism
|
||||
call feedkeys(s:l2u_autosub_cleanup_trigger)
|
||||
return ''
|
||||
endfunction
|
||||
|
||||
function! s:L2U_AutosubReset()
|
||||
" no longer doing substitution
|
||||
let b:l2u_in_autosub = 0
|
||||
" remove the mapping that triggered this function
|
||||
exec 'iunmap <buffer> ' . s:l2u_autosub_cleanup_trigger
|
||||
iunmap <buffer> <Plug>L2UAutosubReset
|
||||
return ''
|
||||
endfunction
|
||||
@@ -619,8 +695,10 @@ function! s:L2U_SetAutoSub(wait_insert_enter)
|
||||
endif
|
||||
" Viable substitutions are searched at every character insertion via the
|
||||
" autocmd InsertCharPre. The <Enter> key does not seem to be catched in
|
||||
" this way though, so we use a mapping for that case.
|
||||
|
||||
let b:l2u_prev_map_cr = s:L2U_SetFallbackMapping('<CR>', s:l2u_fallback_trigger_cr)
|
||||
inoremap <buffer><expr> <Plug>L2UAutoSub LaTeXtoUnicode#AutoSub("\n", "\<CR>")
|
||||
imap <buffer> <CR> <Plug>L2UAutoSub
|
||||
exec 'inoremap <buffer><expr> <Plug>L2UAutoSub LaTeXtoUnicode#AutoSub("\n", "' . s:l2u_fallback_trigger_cr . '")'
|
||||
|
||||
augroup L2UAutoSub
|
||||
@@ -637,7 +715,11 @@ function! s:L2U_UnsetAutoSub()
|
||||
return
|
||||
endif
|
||||
|
||||
iunmap <buffer> <CR>
|
||||
if empty(maparg("<CR>", "i"))
|
||||
call s:L2U_ReinstateMapping(b:l2u_prev_map_cr)
|
||||
endif
|
||||
iunmap <buffer> <Plug>L2UAutoSub
|
||||
exe 'iunmap <buffer> ' . s:l2u_fallback_trigger_cr
|
||||
augroup L2UAutoSub
|
||||
autocmd! * <buffer>
|
||||
|
||||
@@ -1989,7 +1989,6 @@ fu! csv#AnalyzeColumn(...) "{{{3
|
||||
endif
|
||||
|
||||
let title="Nr\tCount\t % \tValue"
|
||||
endif
|
||||
echohl Title
|
||||
echo printf("%s", title)
|
||||
echohl Normal
|
||||
@@ -2311,7 +2310,7 @@ fu! csv#CommandDefinitions() "{{{3
|
||||
call csv#LocalCmd("NewDelimiter", ':call csv#NewDelimiter(<q-args>, 1, line(''$''))',
|
||||
\ '-nargs=1')
|
||||
call csv#LocalCmd("Duplicates", ':call csv#CheckDuplicates(<q-args>)',
|
||||
\ '-nargs=1 -complete=custom,csv#CompleteColumnNr')
|
||||
\ '-nargs=? -complete=custom,csv#CompleteColumnNr')
|
||||
call csv#LocalCmd('Transpose', ':call csv#Transpose(<line1>, <line2>)',
|
||||
\ '-range=%')
|
||||
call csv#LocalCmd('CSVTabularize', ':call csv#Tabularize(<bang>0,<line1>,<line2>)',
|
||||
@@ -2499,12 +2498,16 @@ fu! csv#CompleteColumnNr(A,L,P) "{{{3
|
||||
return join(range(1,csv#MaxColumns()), "\n")
|
||||
endfu
|
||||
fu! csv#CheckDuplicates(list) "{{{3
|
||||
let string = a:list
|
||||
if string =~ '\d\s\?-\s\?\d'
|
||||
let string = substitute(string, '\(\d\+\)\s\?-\s\?\(\d\+\)',
|
||||
\ '\=join(range(submatch(1),submatch(2)), ",")', '')
|
||||
if empty(a:list)
|
||||
let list=[csv#WColumn()]
|
||||
else
|
||||
let string = a:list
|
||||
if string =~ '\d\s\?-\s\?\d'
|
||||
let string = substitute(string, '\(\d\+\)\s\?-\s\?\(\d\+\)',
|
||||
\ '\=join(range(submatch(1),submatch(2)), ",")', '')
|
||||
endif
|
||||
let list=split(string, ',')
|
||||
endif
|
||||
let list=split(string, ',')
|
||||
call csv#DuplicateRows(list)
|
||||
endfu
|
||||
fu! csv#Transpose(line1, line2) "{{{3
|
||||
|
||||
@@ -336,6 +336,7 @@ function! s:download(branch)
|
||||
\ )
|
||||
if v:shell_error == 0
|
||||
call system('unzip -o -d ' . s:script_root_dir . "/fsac " . zip)
|
||||
call system('find ' . s:script_root_dir . '/fsac' . ' -type f -exec chmod 777 \{\} \;')
|
||||
echom "[FSAC] Updated FsAutoComplete to version " . a:branch . ""
|
||||
else
|
||||
echom "[FSAC] Failed to update FsAutoComplete"
|
||||
|
||||
@@ -315,7 +315,7 @@ function! go#config#FmtAutosave() abort
|
||||
endfunction
|
||||
|
||||
function! go#config#ImportsAutosave() abort
|
||||
return get(g:, 'go_imports_autosave', 0)
|
||||
return get(g:, 'go_imports_autosave', 1)
|
||||
endfunction
|
||||
|
||||
function! go#config#SetFmtAutosave(value) abort
|
||||
@@ -359,11 +359,11 @@ function! go#config#DeclsMode() abort
|
||||
endfunction
|
||||
|
||||
function! go#config#FmtCommand() abort
|
||||
return get(g:, "go_fmt_command", "gofmt")
|
||||
return get(g:, "go_fmt_command", go#config#GoplsEnabled() ? 'gopls' : 'gofmt')
|
||||
endfunction
|
||||
|
||||
function! go#config#ImportsMode() abort
|
||||
return get(g:, "go_imports_mode", "goimports")
|
||||
return get(g:, "go_imports_mode", go#config#GoplsEnabled() ? 'gopls' : 'goimports')
|
||||
endfunction
|
||||
|
||||
function! go#config#FmtOptions() abort
|
||||
@@ -388,7 +388,7 @@ function! go#config#RenameCommand() abort
|
||||
endfunction
|
||||
|
||||
function! go#config#GorenameBin() abort
|
||||
return get(g:, "go_gorename_bin", "gopls")
|
||||
return get(g:, "go_gorename_bin", 'gopls')
|
||||
endfunction
|
||||
|
||||
function! go#config#GorenamePrefill() abort
|
||||
|
||||
@@ -2,7 +2,7 @@ if polyglot#init#is_disabled(expand('<sfile>:p'), 'graphql', 'autoload/graphql.v
|
||||
finish
|
||||
endif
|
||||
|
||||
" Copyright (c) 2016-2020 Jon Parise <jon@indelible.org>
|
||||
" Copyright (c) 2016-2021 Jon Parise <jon@indelible.org>
|
||||
"
|
||||
" Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
" of this software and associated documentation files (the "Software"), to
|
||||
|
||||
@@ -1321,7 +1321,7 @@ endif
|
||||
|
||||
if !has_key(g:polyglot_is_disabled, 'html')
|
||||
au BufNewFile,BufRead,BufWritePost *.html call polyglot#detect#Html()
|
||||
au BufNewFile,BufRead *.htm,*.html.hl,*.inc,*.st,*.xht,*.xhtml setf html
|
||||
au BufNewFile,BufRead *.htm,*.html.hl,*.inc,*.xht,*.xhtml setf html
|
||||
endif
|
||||
|
||||
if !has_key(g:polyglot_is_disabled, 'hollywood')
|
||||
@@ -2000,7 +2000,7 @@ if !has_key(g:polyglot_is_disabled, 'rspec')
|
||||
endif
|
||||
|
||||
if !has_key(g:polyglot_is_disabled, 'ruby')
|
||||
au BufNewFile,BufRead *.axlsx,*.builder,*.cap,*.eye,*.fcgi,*.gemspec,*.god,*.jbuilder,*.mspec,*.opal,*.pluginspec,*.podspec,*.rabl,*.rake,*.rant,*.rb,*.rbi,*.rbuild,*.rbw,*.rbx,*.rjs,*.ru,*.ruby,*.rxml,*.spec,*.thor,*.watchr,{.,}Brewfile,{.,}Guardfile,{.,}autotest,{.,}irbrc,{.,}pryrc,{.,}simplecov,Appraisals,Berksfile,Buildfile,Capfile,Cheffile,Dangerfile,Deliverfile,Fastfile,Gemfile,Gemfile.lock,Guardfile,Jarfile,KitchenSink,Mavenfile,Podfile,Puppetfile,Rakefile,Routefile,Snapfile,Thorfile,Vagrantfile,[Rr]antfile,buildfile,vagrantfile setf ruby
|
||||
au BufNewFile,BufRead *.axlsx,*.builder,*.cap,*.eye,*.fcgi,*.gemspec,*.god,*.jbuilder,*.mspec,*.opal,*.pluginspec,*.podspec,*.prawn,*.rabl,*.rake,*.rant,*.rb,*.rbi,*.rbuild,*.rbw,*.rbx,*.rjs,*.ru,*.ruby,*.rxml,*.spec,*.thor,*.watchr,{.,}Brewfile,{.,}Guardfile,{.,}autotest,{.,}irbrc,{.,}pryrc,{.,}simplecov,Appraisals,Berksfile,Buildfile,Capfile,Cheffile,Dangerfile,Deliverfile,Fastfile,Gemfile,Guardfile,Jarfile,KitchenSink,Mavenfile,Podfile,Puppetfile,Rakefile,Routefile,Snapfile,Thorfile,Vagrantfile,[Rr]antfile,buildfile,vagrantfile setf ruby
|
||||
au BufNewFile,BufRead [Rr]akefile* call s:StarSetf('ruby')
|
||||
au BufNewFile,BufRead *.erb,*.erb.deface,*.rhtml setf eruby
|
||||
endif
|
||||
@@ -2592,7 +2592,7 @@ if !has_key(g:polyglot_is_disabled, 'ant')
|
||||
endif
|
||||
|
||||
if !has_key(g:polyglot_is_disabled, 'xml')
|
||||
au BufNewFile,BufRead *.adml,*.admx,*.ant,*.axml,*.builds,*.ccproj,*.ccxml,*.cdxml,*.clixml,*.cproject,*.cscfg,*.csdef,*.csl,*.csproj,*.csproj.user,*.ct,*.depproj,*.dita,*.ditamap,*.ditaval,*.dll.config,*.dotsettings,*.filters,*.fsproj,*.fxml,*.glade,*.gml,*.gmx,*.grxml,*.gst,*.iml,*.ivy,*.jelly,*.jsproj,*.kml,*.launch,*.mdpolicy,*.mjml,*.mm,*.mod,*.mxml,*.natvis,*.ncl,*.ndproj,*.nproj,*.nuspec,*.odd,*.osm,*.pkgproj,*.pluginspec,*.proj,*.props,*.psc1,*.pt,*.rdf,*.res,*.resx,*.rs,*.rss,*.sch,*.scxml,*.sfproj,*.shproj,*.srdf,*.storyboard,*.sublime-snippet,*.targets,*.tml,*.tpm,*.ui,*.urdf,*.ux,*.vbproj,*.vcxproj,*.vsixmanifest,*.vssettings,*.vstemplate,*.vxml,*.wixproj,*.workflow,*.wpl,*.wsdl,*.wsf,*.wxi,*.wxl,*.wxs,*.x3d,*.xacro,*.xaml,*.xib,*.xlf,*.xliff,*.xmi,*.xml,*.xml.dist,*.xproj,*.xsd,*.xspec,*.xul,*.zcml,*/etc/blkid.tab,*/etc/blkid.tab.old,*/etc/xdg/menus/*.menu,*fglrxrc,{.,}classpath,{.,}cproject,{.,}project,App.config,NuGet.config,Settings.StyleCop,Web.Debug.config,Web.Release.config,Web.config,packages.config setf xml
|
||||
au BufNewFile,BufRead *.adml,*.admx,*.ant,*.axml,*.builds,*.ccproj,*.ccxml,*.cdxml,*.clixml,*.cproject,*.cscfg,*.csdef,*.csl,*.csproj,*.csproj.user,*.ct,*.depproj,*.dita,*.ditamap,*.ditaval,*.dll.config,*.dotsettings,*.filters,*.fsproj,*.fxml,*.glade,*.gml,*.gmx,*.grxml,*.gst,*.iml,*.ivy,*.jelly,*.jsproj,*.kml,*.launch,*.mdpolicy,*.mjml,*.mm,*.mod,*.mxml,*.natvis,*.ncl,*.ndproj,*.nproj,*.nuspec,*.odd,*.osm,*.pkgproj,*.pluginspec,*.proj,*.props,*.psc1,*.pt,*.rdf,*.res,*.resx,*.rs,*.rss,*.sch,*.scxml,*.sfproj,*.shproj,*.srdf,*.storyboard,*.sublime-snippet,*.targets,*.tml,*.tpm,*.ui,*.urdf,*.ux,*.vbproj,*.vcxproj,*.vsixmanifest,*.vssettings,*.vstemplate,*.vxml,*.wixproj,*.workflow,*.wpl,*.wsdl,*.wsf,*.wxi,*.wxl,*.wxs,*.x3d,*.xacro,*.xaml,*.xib,*.xlf,*.xliff,*.xmi,*.xml,*.xml.dist,*.xmp,*.xproj,*.xsd,*.xspec,*.xul,*.zcml,*/etc/blkid.tab,*/etc/blkid.tab.old,*/etc/xdg/menus/*.menu,*fglrxrc,{.,}classpath,{.,}cproject,{.,}project,App.config,NuGet.config,Settings.StyleCop,Web.Debug.config,Web.Release.config,Web.config,packages.config setf xml
|
||||
endif
|
||||
|
||||
if !has_key(g:polyglot_is_disabled, 'csv')
|
||||
|
||||
@@ -229,7 +229,7 @@ let s:globs = {
|
||||
\ 'hollywood': '*.hws',
|
||||
\ 'hostconf': '',
|
||||
\ 'hostsaccess': '',
|
||||
\ 'html': '*.html,*.htm,*.html.hl,*.inc,*.st,*.xht,*.xhtml',
|
||||
\ 'html': '*.html,*.htm,*.html.hl,*.inc,*.xht,*.xhtml',
|
||||
\ 'html.handlebars': '*.handlebars,*.hbs,*.hdbs,*.hb',
|
||||
\ 'html.mustache': '*.mustache,*.hogan,*.hulk,*.hjs',
|
||||
\ 'html.twig': '*.twig',
|
||||
@@ -462,7 +462,7 @@ let s:globs = {
|
||||
\ 'rrst': '*.rrst,*.srst',
|
||||
\ 'rst': '*.rst,*.rest,*.rest.txt,*.rst.txt',
|
||||
\ 'rtf': '*.rtf',
|
||||
\ 'ruby': '*.rb,*.builder,*.eye,*.fcgi,*.gemspec,*.god,*.jbuilder,*.mspec,*.pluginspec,*.podspec,*.rabl,*.rake,*.rbi,*.rbuild,*.rbw,*.rbx,*.ru,*.ruby,*.spec,*.thor,*.watchr,*.rxml,*.rjs,*.rant,*.axlsx,*.cap,*.opal,.irbrc,.pryrc,.simplecov,Appraisals,Berksfile,Buildfile,Capfile,Dangerfile,Deliverfile,Fastfile,Gemfile,Gemfile.lock,Guardfile,Jarfile,Mavenfile,Podfile,Puppetfile,Rakefile,Snapfile,Thorfile,Vagrantfile,buildfile,[Rr]antfile,.autotest,Cheffile,KitchenSink,Routefile,.Guardfile,.Brewfile,vagrantfile,[Rr]akefile*,*_spec.rb',
|
||||
\ 'ruby': '*.rb,*.builder,*.eye,*.fcgi,*.gemspec,*.god,*.jbuilder,*.mspec,*.pluginspec,*.podspec,*.prawn,*.rabl,*.rake,*.rbi,*.rbuild,*.rbw,*.rbx,*.ru,*.ruby,*.spec,*.thor,*.watchr,*.rxml,*.rjs,*.rant,*.axlsx,*.cap,*.opal,.irbrc,.pryrc,.simplecov,Appraisals,Berksfile,Buildfile,Capfile,Dangerfile,Deliverfile,Fastfile,Gemfile,Guardfile,Jarfile,Mavenfile,Podfile,Puppetfile,Rakefile,Snapfile,Thorfile,Vagrantfile,buildfile,[Rr]antfile,.autotest,Cheffile,KitchenSink,Routefile,.Guardfile,.Brewfile,vagrantfile,[Rr]akefile*,*_spec.rb',
|
||||
\ 'rust': '*.rs,*.rs.in',
|
||||
\ 'samba': 'smb.conf',
|
||||
\ 'sas': '*.sas',
|
||||
@@ -612,7 +612,7 @@ let s:globs = {
|
||||
\ 'xhtml': '*.xhtml,*.xht',
|
||||
\ 'xinetd': '',
|
||||
\ 'xmath': '*.msc,*.msf',
|
||||
\ 'xml': '*.xml,*.adml,*.admx,*.ant,*.axml,*.builds,*.ccproj,*.ccxml,*.clixml,*.cproject,*.cscfg,*.csdef,*.csl,*.csproj,*.ct,*.depproj,*.dita,*.ditamap,*.ditaval,*.dll.config,*.dotsettings,*.filters,*.fsproj,*.fxml,*.glade,*.gml,*.gmx,*.grxml,*.gst,*.iml,*.ivy,*.jelly,*.jsproj,*.kml,*.launch,*.mdpolicy,*.mjml,*.mm,*.mod,*.mxml,*.natvis,*.ncl,*.ndproj,*.nproj,*.nuspec,*.odd,*.osm,*.pkgproj,*.pluginspec,*.proj,*.props,*.psc1,*.pt,*.rdf,*.res,*.resx,*.rs,*.rss,*.sch,*.scxml,*.sfproj,*.shproj,*.srdf,*.storyboard,*.sublime-snippet,*.targets,*.tml,*.ui,*.urdf,*.ux,*.vbproj,*.vcxproj,*.vsixmanifest,*.vssettings,*.vstemplate,*.vxml,*.wixproj,*.workflow,*.wsdl,*.wsf,*.wxi,*.wxl,*.wxs,*.x3d,*.xacro,*.xaml,*.xib,*.xlf,*.xliff,*.xmi,*.xml.dist,*.xproj,*.xsd,*.xspec,*.xul,*.zcml,*.cdxml,*.tpm,*.csproj.user,*.wpl,.classpath,.cproject,.project,App.config,NuGet.config,Settings.StyleCop,Web.Debug.config,Web.Release.config,Web.config,packages.config,*fglrxrc',
|
||||
\ 'xml': '*.xml,*.adml,*.admx,*.ant,*.axml,*.builds,*.ccproj,*.ccxml,*.clixml,*.cproject,*.cscfg,*.csdef,*.csl,*.csproj,*.ct,*.depproj,*.dita,*.ditamap,*.ditaval,*.dll.config,*.dotsettings,*.filters,*.fsproj,*.fxml,*.glade,*.gml,*.gmx,*.grxml,*.gst,*.iml,*.ivy,*.jelly,*.jsproj,*.kml,*.launch,*.mdpolicy,*.mjml,*.mm,*.mod,*.mxml,*.natvis,*.ncl,*.ndproj,*.nproj,*.nuspec,*.odd,*.osm,*.pkgproj,*.pluginspec,*.proj,*.props,*.psc1,*.pt,*.rdf,*.res,*.resx,*.rs,*.rss,*.sch,*.scxml,*.sfproj,*.shproj,*.srdf,*.storyboard,*.sublime-snippet,*.targets,*.tml,*.ui,*.urdf,*.ux,*.vbproj,*.vcxproj,*.vsixmanifest,*.vssettings,*.vstemplate,*.vxml,*.wixproj,*.workflow,*.wsdl,*.wsf,*.wxi,*.wxl,*.wxs,*.x3d,*.xacro,*.xaml,*.xib,*.xlf,*.xliff,*.xmi,*.xml.dist,*.xmp,*.xproj,*.xsd,*.xspec,*.xul,*.zcml,*.cdxml,*.tpm,*.csproj.user,*.wpl,.classpath,.cproject,.project,App.config,NuGet.config,Settings.StyleCop,Web.Debug.config,Web.Release.config,Web.config,packages.config,*fglrxrc',
|
||||
\ 'xml.twig': '*.xml.twig',
|
||||
\ 'xmodmap': '*Xmodmap,*xmodmap*',
|
||||
\ 'xpm': '*.xpm,*.pm',
|
||||
|
||||
@@ -3,7 +3,7 @@ if polyglot#init#is_disabled(expand('<sfile>:p'), 'requirements', 'autoload/requ
|
||||
endif
|
||||
|
||||
" the Requirements File Format syntax support for Vim
|
||||
" Version: 1.5.3
|
||||
" Version: 1.6.0
|
||||
" Author: raimon <raimon49@hotmail.com>
|
||||
" License: MIT LICENSE
|
||||
" The MIT License (MIT)
|
||||
|
||||
@@ -12,11 +12,13 @@ function! zig#fmt#Format() abort
|
||||
" Save cursor position and many other things.
|
||||
let view = winsaveview()
|
||||
|
||||
let current_buf = bufnr('')
|
||||
if !executable('zig')
|
||||
echohl Error | echomsg "no zig binary found in PATH" | echohl None
|
||||
return
|
||||
endif
|
||||
|
||||
let bin_path = get(g:, 'zig_bin_path', 'zig')
|
||||
let stderr_file = tempname()
|
||||
let cmdline = printf('%s fmt --stdin 2> %s', bin_path, stderr_file)
|
||||
let cmdline = 'zig fmt --stdin'
|
||||
let current_buf = bufnr('')
|
||||
|
||||
" The formatted code is output on stdout, the errors go on stderr.
|
||||
if exists('*systemlist')
|
||||
@@ -42,7 +44,7 @@ function! zig#fmt#Format() abort
|
||||
call setloclist(0, [], 'r')
|
||||
lclose
|
||||
elseif get(g:, 'zig_fmt_parse_errors', 1)
|
||||
let errors = s:parse_errors(expand('%'), readfile(stderr_file))
|
||||
let errors = s:parse_errors(expand('%'), out)
|
||||
|
||||
call setloclist(0, [], 'r', {
|
||||
\ 'title': 'Errors',
|
||||
@@ -53,11 +55,9 @@ function! zig#fmt#Format() abort
|
||||
" Prevent the loclist from becoming too long.
|
||||
let win_height = min([max_win_height, len(errors)])
|
||||
" Open the loclist, but only if there's at least one error to show.
|
||||
execute 'lwindow ' . win_height
|
||||
execute 'silent! lwindow ' . win_height
|
||||
endif
|
||||
|
||||
call delete(stderr_file)
|
||||
|
||||
call winrestview(view)
|
||||
|
||||
if err != 0
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim support file to detect file types
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2021 Jan 21
|
||||
" Last Change: 2021 Apr 05
|
||||
|
||||
" Listen very carefully, I will say this only once
|
||||
if exists("did_load_filetypes")
|
||||
@@ -168,6 +168,9 @@ au BufNewFile,BufRead *.mar setf vmasm
|
||||
" Atlas
|
||||
au BufNewFile,BufRead *.atl,*.as setf atlas
|
||||
|
||||
" Atom is based on XML
|
||||
au BufNewFile,BufRead *.atom setf xml
|
||||
|
||||
" Autoit v3
|
||||
au BufNewFile,BufRead *.au3 setf autoit
|
||||
|
||||
@@ -1276,6 +1279,11 @@ au BufNewFile,BufRead .povrayrc setf povini
|
||||
" Povray, Pascal, PHP or assembly
|
||||
au BufNewFile,BufRead *.inc call polyglot#ft#FTinc()
|
||||
|
||||
" PowerShell
|
||||
au BufNewFile,BufRead *.ps1,*.psd1,*.psm1,*.pssc setf ps1
|
||||
au BufNewFile,BufRead *.ps1xml setf ps1xml
|
||||
au BufNewFile,BufRead *.cdxml,*.psc1 setf xml
|
||||
|
||||
" Printcap and Termcap
|
||||
au BufNewFile,BufRead *printcap
|
||||
\ let b:ptcap_type = "print" | setf ptcap
|
||||
@@ -1334,6 +1342,9 @@ au BufNewFile,BufRead *.pml setf promela
|
||||
au BufNewFile,BufRead *.proto setf proto
|
||||
au BufNewFile,BufRead *.pbtxt setf pbtxt
|
||||
|
||||
" Poke
|
||||
au BufNewFile,BufRead *.pk setf poke
|
||||
|
||||
" Protocols
|
||||
au BufNewFile,BufRead */etc/protocols setf protocols
|
||||
|
||||
@@ -1391,6 +1402,9 @@ else
|
||||
au BufNewFile,BufRead *.rmd,*.smd setf rmd
|
||||
endif
|
||||
|
||||
" RSS looks like XML
|
||||
au BufNewFile,BufRead *.rss setf xml
|
||||
|
||||
" R reStructuredText file
|
||||
if has("fname_case")
|
||||
au BufNewFile,BufRead *.Rrst,*.rrst,*.Srst,*.srst setf rrst
|
||||
@@ -1543,11 +1557,10 @@ au BufNewFile,BufRead catalog setf catalog
|
||||
" Gentoo ebuilds, Arch Linux PKGBUILDs and Alpine Linux APKBUILDs are actually
|
||||
" bash scripts.
|
||||
" NOTE: Patterns ending in a star are further down, these have lower priority.
|
||||
au BufNewFile,BufRead .bashrc,bashrc,bash.bashrc,.bash[_-]profile,.bash[_-]logout,.bash[_-]aliases,bash-fc[-.],*.bash,*/{,.}bash[_-]completion{,.d,.sh}{,/*},*.ebuild,*.eclass,PKGBUILD,APKBUILD call polyglot#ft#SetFileTypeSH("bash")
|
||||
au BufNewFile,BufRead .bashrc,bashrc,bash.bashrc,.bash[_-]profile,.bash[_-]logout,.bash[_-]aliases,bash-fc[-.],*.ebuild,*.bash,*.eclass,PKGBUILD,APKBUILD call polyglot#ft#SetFileTypeSH("bash")
|
||||
au BufNewFile,BufRead .kshrc,*.ksh call polyglot#ft#SetFileTypeSH("ksh")
|
||||
au BufNewFile,BufRead */etc/profile,.profile,*.sh,*.env call polyglot#ft#SetFileTypeSH(getline(1))
|
||||
|
||||
|
||||
" Shell script (Arch Linux) or PHP file (Drupal)
|
||||
au BufNewFile,BufRead *.install
|
||||
\ if getline(1) =~ '<?php' |
|
||||
@@ -2216,8 +2229,11 @@ au BufNewFile,BufRead .reminders* call s:StarSetf('remind')
|
||||
" SGML catalog file
|
||||
au BufNewFile,BufRead sgml.catalog* call s:StarSetf('catalog')
|
||||
|
||||
" avoid doc files being recognized a shell files
|
||||
au BufNewFile,BufRead */doc/{,.}bash[_-]completion{,.d,.sh}{,/*} setf text
|
||||
|
||||
" Shell scripts ending in a star
|
||||
au BufNewFile,BufRead .bashrc*,.bash[_-]profile*,.bash[_-]logout*,.bash[_-]aliases*,bash-fc[-.]*,PKGBUILD*,APKBUILD* call polyglot#ft#SetFileTypeSH("bash")
|
||||
au BufNewFile,BufRead .bashrc*,.bash[_-]profile*,.bash[_-]logout*,.bash[_-]aliases*,bash-fc[-.]*,PKGBUILD*,APKBUILD*,*/{,.}bash[_-]completion{,.d,.sh}{,/*} call polyglot#ft#SetFileTypeSH("bash")
|
||||
au BufNewFile,BufRead .kshrc* call polyglot#ft#SetFileTypeSH("ksh")
|
||||
au BufNewFile,BufRead .profile* call polyglot#ft#SetFileTypeSH(getline(1))
|
||||
|
||||
|
||||
@@ -4,14 +4,14 @@ endif
|
||||
|
||||
" Vim settings file
|
||||
" Language: Fortran 2008 (and older: Fortran 2003, 95, 90, 77, 66)
|
||||
" Version: (v52) 2020 October 07
|
||||
" Version: (v53) 2021 April 06
|
||||
" Maintainer: Ajit J. Thakkar <ajit@unb.ca>; <http://www2.unb.ca/~ajit/>
|
||||
" Usage: For instructions, do :help fortran-plugin from Vim
|
||||
" Credits:
|
||||
" Version 0.1 was created in September 2000 by Ajit Thakkar.
|
||||
" Since then, useful suggestions and contributions have been made, in order, by:
|
||||
" Stefano Zacchiroli, Hendrik Merx, Ben Fritz, David Barnett, Eisuke Kawashima,
|
||||
" and Doug Kearns.
|
||||
" Doug Kearns, and Fritz Reese.
|
||||
|
||||
" Only do these settings when not done yet for this buffer
|
||||
if exists("b:did_ftplugin")
|
||||
@@ -70,12 +70,19 @@ endif
|
||||
" Set comments and textwidth according to source type
|
||||
if (b:fortran_fixed_source == 1)
|
||||
setlocal comments=:!,:*,:C
|
||||
" Fixed format requires a textwidth of 72 for code
|
||||
setlocal tw=72
|
||||
" Fixed format requires a textwidth of 72 for code,
|
||||
" but some vendor extensions allow longer lines
|
||||
if exists("fortran_extended_line_length")
|
||||
setlocal tw=132
|
||||
elseif exists("fortran_cardimage_line_length")
|
||||
setlocal tw=80
|
||||
else
|
||||
setlocal tw=72
|
||||
" If you need to add "&" on continued lines so that the code is
|
||||
" compatible with both free and fixed format, then you should do so
|
||||
" in column 73 and uncomment the next line
|
||||
" setlocal tw=73
|
||||
endif
|
||||
else
|
||||
setlocal comments=:!
|
||||
" Free format allows a textwidth of 132
|
||||
|
||||
@@ -2,7 +2,7 @@ if polyglot#init#is_disabled(expand('<sfile>:p'), 'graphql', 'ftplugin/graphql.v
|
||||
finish
|
||||
endif
|
||||
|
||||
" Copyright (c) 2016-2020 Jon Parise <jon@indelible.org>
|
||||
" Copyright (c) 2016-2021 Jon Parise <jon@indelible.org>
|
||||
"
|
||||
" Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
" of this software and associated documentation files (the "Software"), to
|
||||
|
||||
@@ -8,7 +8,7 @@ endif
|
||||
" URL: http://sites.google.com/site/khorser/opensource/vim
|
||||
" Original author: Dorai Sitaram <ds26@gte.com>
|
||||
" Original URL: http://www.ccs.neu.edu/~dorai/vimplugins/vimplugins.html
|
||||
" Last Change: Oct 23, 2013
|
||||
" Last Change: Mar 10, 2021
|
||||
|
||||
" Only do this when not done yet for this buffer
|
||||
if exists("b:did_ftplugin")
|
||||
|
||||
@@ -34,7 +34,7 @@ setl lispwords+=match-letrec,match-define,match-define-values
|
||||
setl lisp
|
||||
|
||||
" Enable auto begin new comment line when continuing from an old comment line
|
||||
setl comments+=:;
|
||||
setl comments=:;;;;,:;;;,:;;,:;
|
||||
setl formatoptions+=r
|
||||
|
||||
setl makeprg=raco\ make\ --\ %
|
||||
|
||||
@@ -31,7 +31,7 @@ setlocal commentstring=#%s
|
||||
"---------------------------------------------
|
||||
setlocal include=\\<\\(use\\\|require\\)\\>
|
||||
setlocal includeexpr=substitute(v:fname,'::','/','g')
|
||||
setlocal suffixesadd=.pm6,.pm,.raku,.rakutest,.t6
|
||||
setlocal suffixesadd=.rakumod,.rakudoc,.pm6,.pm
|
||||
setlocal define=[^A-Za-z_]
|
||||
|
||||
" The following line changes a global variable but is necessary to make
|
||||
@@ -42,39 +42,23 @@ setlocal define=[^A-Za-z_]
|
||||
set isfname+=:
|
||||
setlocal iskeyword=@,48-57,_,192-255,-
|
||||
|
||||
" Set this once, globally.
|
||||
if !exists("perlpath")
|
||||
if executable("perl6")
|
||||
try
|
||||
if &shellxquote != '"'
|
||||
let perlpath = system('perl6 -e "@*INC.join(q/,/).say"')
|
||||
else
|
||||
let perlpath = system("perl6 -e '@*INC.join(q/,/).say'")
|
||||
endif
|
||||
let perlpath = substitute(perlpath,',.$',',,','')
|
||||
catch /E145:/
|
||||
let perlpath = ".,,"
|
||||
endtry
|
||||
else
|
||||
" If we can't call perl to get its path, just default to using the
|
||||
" current directory and the directory of the current file.
|
||||
let perlpath = ".,,"
|
||||
endif
|
||||
endif
|
||||
" Raku exposes its CompUnits through $*REPO, but mapping module names to
|
||||
" compunit paths is nontrivial. Probably it's more convenient to rely on
|
||||
" people using zef, which has a handy store of sources for modules it has
|
||||
" installed.
|
||||
func s:compareReverseFtime(a, b)
|
||||
let atime = getftime(a:a)
|
||||
let btime = getftime(a:b)
|
||||
return atime > btime ? -1 : atime == btime ? 0 : 1
|
||||
endfunc
|
||||
|
||||
" Append perlpath to the existing path value, if it is set. Since we don't
|
||||
" use += to do it because of the commas in perlpath, we have to handle the
|
||||
" global / local settings, too.
|
||||
if &l:path == ""
|
||||
if &g:path == ""
|
||||
let &l:path=perlpath
|
||||
else
|
||||
let &l:path=&g:path.",".perlpath
|
||||
endif
|
||||
else
|
||||
let &l:path=&l:path.",".perlpath
|
||||
let &l:path = "lib,."
|
||||
if exists('$RAKULIB')
|
||||
let &l:path = &l:path . "," . $RAKULIB
|
||||
endif
|
||||
"---------------------------------------------
|
||||
let &l:path = &l:path . "," . join(
|
||||
\ sort(glob("~/.zef/store/*/*/lib", 0, 1), "s:compareReverseFtime"),
|
||||
\ ',')
|
||||
|
||||
" Convert ascii-based ops into their single-character unicode equivalent
|
||||
if get(g:, 'raku_unicode_abbrevs', 0)
|
||||
|
||||
@@ -47,8 +47,10 @@ if exists("*json_decode") && executable('zig')
|
||||
unlet! s:env
|
||||
endif
|
||||
|
||||
let &l:formatprg = 'zig fmt --stdin'
|
||||
|
||||
let b:undo_ftplugin =
|
||||
\ 'setl isk< et< ts< sts< sw< fo< sua< mp< com< cms< inex< inc< pa<'
|
||||
\ 'setl isk< et< ts< sts< sw< fo< sua< mp< com< cms< inex< inc< pa< fp<'
|
||||
|
||||
let &cpo = s:cpo_orig
|
||||
unlet s:cpo_orig
|
||||
|
||||
@@ -66,10 +66,14 @@ fun! CdlGetIndent(lnum)
|
||||
" PREVIOUS LINE
|
||||
let ind = indent(lnum)
|
||||
let line = getline(lnum)
|
||||
let f = -1 " wether a '=' is a conditional or a asignment, -1 means we don't know yet
|
||||
" one 'closing' element at the beginning of the line has already reduced the
|
||||
" indent, but 'else', 'elseif' & 'then' increment it for the next line
|
||||
" '=' at the beginning has already de right indent (increased for asignments)
|
||||
|
||||
" Whether a '=' is a conditional or an assignment. -1 means we don't know
|
||||
" yet.
|
||||
" One 'closing' element at the beginning of the line has already reduced the
|
||||
" indent, but 'else', 'elseif' & 'then' increment it for the next line.
|
||||
" '=' at the beginning already has the right indent (increased for
|
||||
" asignments).
|
||||
let f = -1
|
||||
let inicio = matchend(line, '^\c\s*\(else\a*\|then\|endif\|/[*/]\|[);={]\)')
|
||||
if inicio > 0
|
||||
let c = line[inicio-1]
|
||||
|
||||
@@ -2,7 +2,7 @@ if polyglot#init#is_disabled(expand('<sfile>:p'), 'graphql', 'indent/graphql.vim
|
||||
finish
|
||||
endif
|
||||
|
||||
" Copyright (c) 2016-2020 Jon Parise <jon@indelible.org>
|
||||
" Copyright (c) 2016-2021 Jon Parise <jon@indelible.org>
|
||||
"
|
||||
" Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
" of this software and associated documentation files (the "Software"), to
|
||||
|
||||
@@ -295,8 +295,8 @@ function IsFunctionArgPar(lnum, c)
|
||||
if a:c == 0
|
||||
return 0
|
||||
endif
|
||||
let stack = map(synstack(a:lnum, a:c), 'synIDattr(v:val, "name")')
|
||||
return len(stack) >= 3 && stack[-3] == 'juliaFunctionDefP'
|
||||
let stack = map(synstack(a:lnum, a:c-1), 'synIDattr(v:val, "name")')
|
||||
return len(stack) >= 2 && stack[-2] ==# 'juliaFunctionDef'
|
||||
endfunction
|
||||
|
||||
function JumpToMatch(lnum, last_closed_bracket)
|
||||
|
||||
@@ -887,7 +887,7 @@ globs:
|
||||
- '**/htmldjango.vim'
|
||||
filetypes:
|
||||
- name: htmldjango
|
||||
linguist: HTML+Django
|
||||
linguist: Jinja
|
||||
ignore_warnings:
|
||||
# handled by mustache plugin
|
||||
- mustache
|
||||
|
||||
112
syntax/dot.vim
112
syntax/dot.vim
@@ -2,19 +2,25 @@ if polyglot#init#is_disabled(expand('<sfile>:p'), 'dot', 'syntax/dot.vim')
|
||||
finish
|
||||
endif
|
||||
|
||||
" Vim syntax file
|
||||
" Language: Dot
|
||||
" Filenames: *.dot
|
||||
" Maintainer: Markus Mottl <markus.mottl@gmail.com>
|
||||
" URL: http://www.ocaml.info/vim/syntax/dot.vim
|
||||
" Last Change: 2011 May 17 - improved identifier matching + two new keywords
|
||||
" Last Change: 2021 Mar 24 - better attr + escape string matching, new keywords (Farbod Salamat-Zadeh)
|
||||
" 2011 May 17 - improved identifier matching + two new keywords
|
||||
" 2001 May 04 - initial version
|
||||
|
||||
" quit when a syntax file was already loaded
|
||||
if exists("b:current_syntax")
|
||||
" For version 5.x: Clear all syntax items
|
||||
" For version 6.x: Quit when a syntax file was already loaded
|
||||
if version < 600
|
||||
syntax clear
|
||||
elseif exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
let s:keepcpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
" Errors
|
||||
syn match dotParErr ")"
|
||||
syn match dotBrackErr "]"
|
||||
@@ -33,39 +39,43 @@ syn keyword dotTodo contained TODO FIXME XXX
|
||||
" Strings
|
||||
syn region dotString start=+"+ skip=+\\\\\|\\"+ end=+"+
|
||||
|
||||
" Escape strings
|
||||
syn match dotEscString /\v\\(N|G|E|T|H|L)/ containedin=dotString
|
||||
syn match dotEscString /\v\\(n|l|r)/ containedin=dotString
|
||||
|
||||
" General keywords
|
||||
syn keyword dotKeyword digraph node edge subgraph
|
||||
syn keyword dotKeyword graph digraph subgraph node edge strict
|
||||
|
||||
" Graph attributes
|
||||
syn keyword dotType center layers margin mclimit name nodesep nslimit
|
||||
syn keyword dotType ordering page pagedir rank rankdir ranksep ratio
|
||||
syn keyword dotType rotate size
|
||||
|
||||
" Node attributes
|
||||
syn keyword dotType distortion fillcolor fontcolor fontname fontsize
|
||||
syn keyword dotType height layer orientation peripheries regular
|
||||
syn keyword dotType shape shapefile sides skew width
|
||||
|
||||
" Edge attributes
|
||||
syn keyword dotType arrowhead arrowsize arrowtail constraint decorateP
|
||||
syn keyword dotType dir headclip headlabel headport labelangle labeldistance
|
||||
syn keyword dotType labelfontcolor labelfontname labelfontsize
|
||||
syn keyword dotType minlen port_label_distance samehead sametail
|
||||
syn keyword dotType tailclip taillabel tailport weight
|
||||
|
||||
" Shared attributes (graphs, nodes, edges)
|
||||
syn keyword dotType color
|
||||
|
||||
" Shared attributes (graphs and edges)
|
||||
syn keyword dotType bgcolor label URL
|
||||
|
||||
" Shared attributes (nodes and edges)
|
||||
syn keyword dotType fontcolor fontname fontsize layer style
|
||||
" Node, edge and graph attributes
|
||||
syn keyword dotType _background area arrowhead arrowsize arrowtail bb bgcolor
|
||||
\ center charset class clusterrank color colorscheme comment compound
|
||||
\ concentrate constraint Damping decorate defaultdist dim dimen dir
|
||||
\ diredgeconstraints distortion dpi edgehref edgetarget edgetooltip
|
||||
\ edgeURL epsilon esep fillcolor fixedsize fontcolor fontname fontnames
|
||||
\ fontpath fontsize forcelabels gradientangle group head_lp headclip
|
||||
\ headhref headlabel headport headtarget headtooltip headURL height href
|
||||
\ id image imagepath imagepos imagescale inputscale K label label_scheme
|
||||
\ labelangle labeldistance labelfloat labelfontcolor labelfontname
|
||||
\ labelfontsize labelhref labeljust labelloc labeltarget labeltooltip
|
||||
\ labelURL landscape layer layerlistsep layers layerselect layersep
|
||||
\ layout len levels levelsgap lhead lheight lp ltail lwidth margin
|
||||
\ maxiter mclimit mindist minlen mode model mosek newrank nodesep
|
||||
\ nojustify normalize notranslate nslimit nslimit1 ordering orientation
|
||||
\ outputorder overlap overlap_scaling overlap_shrink pack packmode pad
|
||||
\ page pagedir pencolor penwidth peripheries pin pos quadtree quantum
|
||||
\ rank rankdir ranksep ratio rects regular remincross repulsiveforce
|
||||
\ resolution root rotate rotation samehead sametail samplepoints scale
|
||||
\ searchsize sep shape shapefile showboxes sides size skew smoothing
|
||||
\ sortv splines start style stylesheet tail_lp tailclip tailhref
|
||||
\ taillabel tailport tailtarget tailtooltip tailURL target tooltip
|
||||
\ truecolor URL vertices viewport voro_margin weight width xdotversion
|
||||
\ xlabel xlp z
|
||||
|
||||
" Special chars
|
||||
syn match dotKeyChar "="
|
||||
syn match dotKeyChar ";"
|
||||
syn match dotKeyChar "->"
|
||||
syn match dotKeyChar "--"
|
||||
|
||||
" Identifier
|
||||
syn match dotIdentifier /\<\w\+\(:\w\+\)\?\>/
|
||||
@@ -75,27 +85,41 @@ syn sync minlines=50
|
||||
syn sync maxlines=500
|
||||
|
||||
" Define the default highlighting.
|
||||
" Only when an item doesn't have highlighting yet
|
||||
" For version 5.7 and earlier: only when not done already
|
||||
" For version 5.8 and later: only when an item doesn't have highlighting yet
|
||||
if version >= 508 || !exists("did_dot_syntax_inits")
|
||||
if version < 508
|
||||
let did_dot_syntax_inits = 1
|
||||
command -nargs=+ HiLink hi link <args>
|
||||
else
|
||||
command -nargs=+ HiLink hi def link <args>
|
||||
endif
|
||||
|
||||
hi def link dotParErr Error
|
||||
hi def link dotBraceErr Error
|
||||
hi def link dotBrackErr Error
|
||||
HiLink dotParErr Error
|
||||
HiLink dotBraceErr Error
|
||||
HiLink dotBrackErr Error
|
||||
|
||||
hi def link dotComment Comment
|
||||
hi def link dotTodo Todo
|
||||
HiLink dotComment Comment
|
||||
HiLink dotTodo Todo
|
||||
|
||||
hi def link dotParEncl Keyword
|
||||
hi def link dotBrackEncl Keyword
|
||||
hi def link dotBraceEncl Keyword
|
||||
HiLink dotParEncl Keyword
|
||||
HiLink dotBrackEncl Keyword
|
||||
HiLink dotBraceEncl Keyword
|
||||
|
||||
hi def link dotKeyword Keyword
|
||||
hi def link dotType Type
|
||||
hi def link dotKeyChar Keyword
|
||||
HiLink dotKeyword Keyword
|
||||
HiLink dotType Type
|
||||
HiLink dotKeyChar Keyword
|
||||
|
||||
hi def link dotString String
|
||||
hi def link dotIdentifier Identifier
|
||||
HiLink dotString String
|
||||
HiLink dotEscString Keyword
|
||||
HiLink dotIdentifier Identifier
|
||||
|
||||
delcommand HiLink
|
||||
endif
|
||||
|
||||
let b:current_syntax = "dot"
|
||||
|
||||
let &cpo = s:keepcpo
|
||||
unlet s:keepcpo
|
||||
|
||||
" vim: ts=8
|
||||
|
||||
@@ -12,7 +12,7 @@ endif
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
syn cluster elixirNotTop contains=@elixirRegexSpecial,@elixirStringContained,@elixirDeclaration,elixirTodo,elixirArguments,elixirBlockDefinition,elixirUnusedVariable,elixirStructDelimiter
|
||||
syn cluster elixirNotTop contains=@elixirRegexSpecial,@elixirStringContained,@elixirDeclaration,elixirTodo,elixirArguments,elixirBlockDefinition,elixirUnusedVariable,elixirStructDelimiter,elixirListDelimiter
|
||||
syn cluster elixirRegexSpecial contains=elixirRegexEscape,elixirRegexCharClass,elixirRegexQuantifier,elixirRegexEscapePunctuation
|
||||
syn cluster elixirStringContained contains=elixirInterpolation,elixirRegexEscape,elixirRegexCharClass
|
||||
syn cluster elixirDeclaration contains=elixirFunctionDeclaration,elixirPrivateFunctionDeclaration,elixirModuleDeclaration,elixirProtocolDeclaration,elixirImplDeclaration,elixirRecordDeclaration,elixirPrivateRecordDeclaration,elixirMacroDeclaration,elixirPrivateMacroDeclaration,elixirDelegateDeclaration,elixirOverridableDeclaration,elixirExceptionDeclaration,elixirCallbackDeclaration,elixirStructDeclaration
|
||||
@@ -70,12 +70,15 @@ syn match elixirRegexCharClass "\[:\(alnum\|alpha\|ascii\|blank\|cntrl\|
|
||||
|
||||
syn region elixirRegex matchgroup=elixirRegexDelimiter start="%r/" end="/[uiomxfr]*" skip="\\\\" contains=@elixirRegexSpecial
|
||||
|
||||
syn region elixirTuple matchgroup=elixirTupleDelimiter start="\(\w\|#\)\@<!{" end="}" contains=ALLBUT,@elixirNotTop
|
||||
syn region elixirTuple matchgroup=elixirTupleDelimiter start="\(\w\|#\)\@<!{" end="}" contains=ALLBUT,@elixirNotTop fold
|
||||
|
||||
syn match elixirListDelimiter '\[' contained containedin=elixirList
|
||||
syn region elixirList matchgroup=elixirListDelimiter start='\[' end='\]' contains=ALLBUT,@elixirNotTop fold
|
||||
|
||||
syn match elixirStructDelimiter '{' contained containedin=elixirStruct
|
||||
syn region elixirStruct matchgroup=elixirStructDelimiter start="%\(\w\+{\)\@=" end="}" contains=ALLBUT,@elixirNotTop
|
||||
syn region elixirStruct matchgroup=elixirStructDelimiter start="%\(\w\+{\)\@=" end="}" contains=ALLBUT,@elixirNotTop fold
|
||||
|
||||
syn region elixirMap matchgroup=elixirMapDelimiter start="%{" end="}" contains=ALLBUT,@elixirNotTop
|
||||
syn region elixirMap matchgroup=elixirMapDelimiter start="%{" end="}" contains=ALLBUT,@elixirNotTop fold
|
||||
|
||||
syn region elixirString matchgroup=elixirStringDelimiter start=+\z('\)+ end=+\z1+ skip=+\\\\\|\\\z1+ contains=@Spell,@elixirStringContained
|
||||
syn region elixirString matchgroup=elixirStringDelimiter start=+\z("\)+ end=+\z1+ skip=+\\\\\|\\\z1+ contains=@Spell,@elixirStringContained
|
||||
|
||||
@@ -4,7 +4,7 @@ endif
|
||||
|
||||
" Vim syntax file
|
||||
" Language: Fortran 2008 (and older: Fortran 2003, 95, 90, and 77)
|
||||
" Version: (v103) 2020 October 07
|
||||
" Version: (v104) 2021 April 06
|
||||
" Maintainer: Ajit J. Thakkar <ajit@unb.ca>; <http://www2.unb.ca/~ajit/>
|
||||
" Usage: For instructions, do :help fortran-syntax from Vim
|
||||
" Credits:
|
||||
@@ -12,10 +12,10 @@ endif
|
||||
" older Fortran 77 syntax file by Mario Eusebio and Preben Guldberg.
|
||||
" Since then, useful suggestions and contributions have been made, in order, by:
|
||||
" Andrej Panjkov, Bram Moolenaar, Thomas Olsen, Michael Sternberg, Christian Reile,
|
||||
" Walter Dieudonné, Alexander Wagner, Roman Bertle, Charles Rendleman,
|
||||
" Walter Dieudonne, Alexander Wagner, Roman Bertle, Charles Rendleman,
|
||||
" Andrew Griffiths, Joe Krahn, Hendrik Merx, Matt Thompson, Jan Hermann,
|
||||
" Stefano Zaghi, Vishnu V. Krishnan, Judicaël Grasset, Takuma Yoshida,
|
||||
" Eisuke Kawashima, and André Chalella.`
|
||||
" Stefano Zaghi, Vishnu V. Krishnan, Judicael Grasset, Takuma Yoshida,
|
||||
" Eisuke Kawashima, Andre Chalella, and Fritz Reese.
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
@@ -364,8 +364,15 @@ syn cluster fortranCommentGroup contains=fortranTodo
|
||||
|
||||
if (b:fortran_fixed_source == 1)
|
||||
if !exists("fortran_have_tabs")
|
||||
"Flag items beyond column 72
|
||||
syn match fortranSerialNumber excludenl "^.\{73,}$"lc=72
|
||||
" Fixed format requires a textwidth of 72 for code,
|
||||
" but some vendor extensions allow longer lines
|
||||
if exists("fortran_extended_line_length")
|
||||
syn match fortranSerialNumber excludenl "^.\{133,}$"lc=132
|
||||
elseif exists("fortran_cardimage_line_length")
|
||||
syn match fortranSerialNumber excludenl "^.\{81,}$"lc=80
|
||||
else
|
||||
syn match fortranSerialNumber excludenl "^.\{73,}$"lc=72
|
||||
endif
|
||||
"Flag left margin errors
|
||||
syn match fortranLabelError "^.\{-,4}[^0-9 ]" contains=fortranTab
|
||||
syn match fortranLabelError "^.\{4}\d\S"
|
||||
|
||||
@@ -16,12 +16,12 @@ syn sync minlines=50
|
||||
|
||||
syn include @gitDiff syntax/diff.vim
|
||||
|
||||
syn region gitHead start=/\%^/ end=/^$/
|
||||
syn region gitHead start=/\%(^commit\%( \x\{40\}\)\{1,\}\%(\s*(.*)\)\=$\)\@=/ end=/^$/
|
||||
syn region gitHead start=/\%^/ end=/^$/ contains=@NoSpell
|
||||
syn region gitHead start=/\%(^commit\%( \x\{40\}\)\{1,\}\%(\s*(.*)\)\=$\)\@=/ end=/^$/ contains=@NoSpell
|
||||
|
||||
" For git reflog and git show ...^{tree}, avoid sync issues
|
||||
syn match gitHead /^\d\{6\} \%(\w\{4} \)\=\x\{40\}\%( [0-3]\)\=\t.*/
|
||||
syn match gitHead /^\x\{40\} \x\{40}\t.*/
|
||||
syn match gitHead /^\d\{6\} \%(\w\{4} \)\=\x\{40\}\%( [0-3]\)\=\t.*/ contains=@NoSpell
|
||||
syn match gitHead /^\x\{40\} \x\{40}\t.*/ contains=@NoSpell
|
||||
|
||||
syn region gitDiff start=/^\%(diff --git \)\@=/ end=/^\%(diff --\|$\)\@=/ contains=@gitDiff fold
|
||||
syn region gitDiff start=/^\%(@@ -\)\@=/ end=/^\%(diff --\%(git\|cc\|combined\) \|$\)\@=/ contains=@gitDiff
|
||||
@@ -33,11 +33,12 @@ syn match gitDiffAdded "{+[^}]*+}" contained containedin=gitDiff
|
||||
syn match gitDiffRemoved "^ \+-.*" contained containedin=gitDiffMerge
|
||||
syn match gitDiffRemoved "\[-[^]]*-\]" contained containedin=gitDiff
|
||||
|
||||
syn match gitKeyword /^\%(object\|type\|tag\|commit\|tree\|parent\|encoding\)\>/ contained containedin=gitHead nextgroup=gitHash,gitType skipwhite
|
||||
syn match gitKeyword /^\%(tag\>\|ref:\)/ contained containedin=gitHead nextgroup=gitReference skipwhite
|
||||
syn match gitKeyword /^Merge:/ contained containedin=gitHead nextgroup=gitHashAbbrev skipwhite
|
||||
syn match gitKeyword /^\%(object\|type\|tag\|commit\|tree\|parent\|encoding\|summary\|boundary\|filename\)\>/ contained containedin=gitHead nextgroup=gitHash,gitType skipwhite contains=@NoSpell
|
||||
syn match gitKeyword /^previous\>/ contained containedin=gitHead nextgroup=gitHash skipwhite contains=@NoSpell
|
||||
syn match gitKeyword /^\%(tag\>\|ref:\)/ contained containedin=gitHead nextgroup=gitReference skipwhite contains=@NoSpell
|
||||
syn match gitKeyword /^Merge:/ contained containedin=gitHead nextgroup=gitHashAbbrev skipwhite contains=@NoSpell
|
||||
syn match gitMode /^\d\{6\}\>/ contained containedin=gitHead nextgroup=gitType,gitHash skipwhite
|
||||
syn match gitIdentityKeyword /^\%(author\|committer\|tagger\)\>/ contained containedin=gitHead nextgroup=gitIdentity skipwhite
|
||||
syn match gitIdentityKeyword /^\%(author\|committer\|tagger\)\%(-mail\|-time\|-tz\)\=\>/ contained containedin=gitHead nextgroup=gitIdentity skipwhite
|
||||
syn match gitIdentityHeader /^\%(Author\|Commit\|Tagger\):/ contained containedin=gitHead nextgroup=gitIdentity skipwhite
|
||||
syn match gitDateHeader /^\%(AuthorDate\|CommitDate\|Date\):/ contained containedin=gitHead nextgroup=gitDate skipwhite
|
||||
|
||||
@@ -51,10 +52,10 @@ syn match gitDate /\<\d\+ \l\+ ago\>/ contained
|
||||
syn match gitType /\<\%(tag\|commit\|tree\|blob\)\>/ contained nextgroup=gitHash skipwhite
|
||||
syn match gitStage /\<\d\t\@=/ contained
|
||||
syn match gitReference /\S\+\S\@!/ contained
|
||||
syn match gitHash /\<\x\{40\}\>/ contained nextgroup=gitIdentity,gitStage,gitHash skipwhite
|
||||
syn match gitHash /^\<\x\{40\}\>/ containedin=gitHead contained nextgroup=gitHash skipwhite
|
||||
syn match gitHashAbbrev /\<\x\{4,40\}\>/ contained nextgroup=gitHashAbbrev skipwhite
|
||||
syn match gitHashAbbrev /\<\x\{4,39\}\.\.\./he=e-3 contained nextgroup=gitHashAbbrev skipwhite
|
||||
syn match gitHash /\<\x\{40\}\>/ contained nextgroup=gitIdentity,gitStage,gitHash skipwhite contains=@NoSpell
|
||||
syn match gitHash /^\<\x\{40\}\>/ containedin=gitHead contained nextgroup=gitHash skipwhite contains=@NoSpell
|
||||
syn match gitHashAbbrev /\<\x\{4,40\}\>/ contained nextgroup=gitHashAbbrev skipwhite contains=@NoSpell
|
||||
syn match gitHashAbbrev /\<\x\{4,39\}\.\.\./he=e-3 contained nextgroup=gitHashAbbrev skipwhite contains=@NoSpell
|
||||
|
||||
syn match gitIdentity /\S.\{-\} <[^>]*>/ contained nextgroup=gitDate skipwhite
|
||||
syn region gitEmail matchgroup=gitEmailDelimiter start=/</ end=/>/ keepend oneline contained containedin=gitIdentity
|
||||
|
||||
@@ -14,8 +14,8 @@ endif
|
||||
|
||||
syn case match
|
||||
|
||||
syn match gitrebaseHash "\v<\x{7,}>" contained
|
||||
syn match gitrebaseCommit "\v<\x{7,}>" nextgroup=gitrebaseSummary skipwhite
|
||||
syn match gitrebaseHash "\v<\x{7,}>" contained contains=@NoSpell
|
||||
syn match gitrebaseCommit "\v<\x{7,}>" nextgroup=gitrebaseSummary skipwhite contains=@NoSpell
|
||||
syn match gitrebasePick "\v^p%(ick)=>" nextgroup=gitrebaseCommit skipwhite
|
||||
syn match gitrebaseReword "\v^r%(eword)=>" nextgroup=gitrebaseCommit skipwhite
|
||||
syn match gitrebaseEdit "\v^e%(dit)=>" nextgroup=gitrebaseCommit skipwhite
|
||||
|
||||
@@ -70,16 +70,14 @@ syn cluster gotplLiteral contains=goString,goRawString,goCharacter,@goIn
|
||||
syn keyword gotplControl contained if else end range with template
|
||||
syn keyword gotplFunctions contained and html index js len not or print printf println urlquery eq ne lt le gt ge
|
||||
syn match gotplVariable contained /\$[a-zA-Z0-9_]*\>/
|
||||
syn match goTplIdentifier contained /\.[^\s}]+\>/
|
||||
syn match goTplIdentifier contained /\.[^[:blank:]}]\+\>/
|
||||
|
||||
hi def link gotplControl Keyword
|
||||
hi def link gotplFunctions Function
|
||||
hi def link goTplVariable Special
|
||||
|
||||
syn region gotplAction start="{{" end="}}" contains=@gotplLiteral,gotplControl,gotplFunctions,gotplVariable,goTplIdentifier display
|
||||
syn region gotplAction start="\[\[" end="\]\]" contains=@gotplLiteral,gotplControl,gotplFunctions,gotplVariable display
|
||||
syn region goTplComment start="{{\(- \)\?/\*" end="\*/\( -\)\?}}" display
|
||||
syn region goTplComment start="\[\[\(- \)\?/\*" end="\*/\( -\)\?\]\]" display
|
||||
|
||||
hi def link gotplAction PreProc
|
||||
hi def link goTplComment Comment
|
||||
|
||||
@@ -2,7 +2,7 @@ if polyglot#init#is_disabled(expand('<sfile>:p'), 'graphql', 'syntax/graphql.vim
|
||||
finish
|
||||
endif
|
||||
|
||||
" Copyright (c) 2016-2020 Jon Parise <jon@indelible.org>
|
||||
" Copyright (c) 2016-2021 Jon Parise <jon@indelible.org>
|
||||
"
|
||||
" Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
" of this software and associated documentation files (the "Software"), to
|
||||
|
||||
@@ -7,8 +7,9 @@ endif
|
||||
" Previous Maintainer: Jorge Maldonado Ventura <jorgesumle@freakspot.net>
|
||||
" Previous Maintainer: Claudio Fleiner <claudio@fleiner.com>
|
||||
" Repository: https://notabug.org/jorgesumle/vim-html-syntax
|
||||
" Last Change: 2021 Feb 25
|
||||
" Last Change: 2021 Mar 02
|
||||
" Included patch #7900 to fix comments
|
||||
" Included patch #7916 to fix a few more things
|
||||
"
|
||||
|
||||
" Please check :help html.vim for some comments and a description of the options
|
||||
@@ -83,26 +84,16 @@ syn keyword htmlArg contained usemap ismap valign value vlink vspace width wrap
|
||||
syn match htmlArg contained "\<\(http-equiv\|href\|title\)="me=e-1
|
||||
|
||||
" aria attributes
|
||||
syn match htmlArg contained "\<\(aria-activedescendant\|aria-atomic\)\>"
|
||||
syn match htmlArg contained "\<\(aria-autocomplete\|aria-busy\|aria-checked\)\>"
|
||||
syn match htmlArg contained "\<\(aria-colcount\|aria-colindex\|aria-colspan\)\>"
|
||||
syn match htmlArg contained "\<\(aria-controls\|aria-current\)\>"
|
||||
syn match htmlArg contained "\<\(aria-describedby\|aria-details\)\>"
|
||||
syn match htmlArg contained "\<\(aria-disabled\|aria-dropeffect\)\>"
|
||||
syn match htmlArg contained "\<\(aria-errormessage\|aria-expanded\)\>"
|
||||
syn match htmlArg contained "\<\(aria-flowto\|aria-grabbed\|aria-haspopup\)\>"
|
||||
syn match htmlArg contained "\<\(aria-hidden\|aria-invalid\)\>"
|
||||
syn match htmlArg contained "\<\(aria-keyshortcuts\|aria-label\)\>"
|
||||
syn match htmlArg contained "\<\(aria-labelledby\|aria-level\|aria-live\)\>"
|
||||
syn match htmlArg contained "\<\(aria-modal\|aria-multiline\)\>"
|
||||
syn match htmlArg contained "\<\(aria-multiselectable\|aria-orientation\)\>"
|
||||
syn match htmlArg contained "\<\(aria-owns\|aria-placeholder\|aria-posinset\)\>"
|
||||
syn match htmlArg contained "\<\(aria-pressed\|aria-readonly\|aria-relevant\)\>"
|
||||
syn match htmlArg contained "\<\(aria-required\|aria-roledescription\)\>"
|
||||
syn match htmlArg contained "\<\(aria-rowcount\|aria-rowindex\|aria-rowspan\)\>"
|
||||
syn match htmlArg contained "\<\(aria-selected\|aria-setsize\|aria-sort\)\>"
|
||||
syn match htmlArg contained "\<\(aria-valuemax\|aria-valuemin\)\>"
|
||||
syn match htmlArg contained "\<\(aria-valuenow\|aria-valuetext\)\>"
|
||||
exe 'syn match htmlArg contained "\<aria-\%(' . join([
|
||||
\ 'activedescendant', 'atomic', 'autocomplete', 'busy', 'checked', 'colcount',
|
||||
\ 'colindex', 'colspan', 'controls', 'current', 'describedby', 'details',
|
||||
\ 'disabled', 'dropeffect', 'errormessage', 'expanded', 'flowto', 'grabbed',
|
||||
\ 'haspopup', 'hidden', 'invalid', 'keyshortcuts', 'label', 'labelledby', 'level',
|
||||
\ 'live', 'modal', 'multiline', 'multiselectable', 'orientation', 'owns',
|
||||
\ 'placeholder', 'posinset', 'pressed', 'readonly', 'relevant', 'required',
|
||||
\ 'roledescription', 'rowcount', 'rowindex', 'rowspan', 'selected', 'setsize',
|
||||
\ 'sort', 'valuemax', 'valuemin', 'valuenow', 'valuetext'
|
||||
\ ], '\|') . '\)\>"'
|
||||
syn keyword htmlArg contained role
|
||||
|
||||
" Netscape extensions
|
||||
@@ -143,25 +134,19 @@ syn match htmlSpecialChar "&#\=[0-9A-Za-z]\{1,8};"
|
||||
|
||||
" Comments (the real ones or the old netscape ones)
|
||||
if exists("html_wrong_comments")
|
||||
syn region htmlComment start=+<!--+ end=+--\s*>+ contains=@Spell
|
||||
syn region htmlComment start=+<!--+ end=+--\s*>+ contains=@Spell
|
||||
else
|
||||
" The HTML 5.2 syntax 8.2.4.41-42: bogus comment is parser error; browser skips until next >
|
||||
" Note: must stand first to get lesser :syn-priority
|
||||
syn region htmlComment start=+<!+ end=+>+ contains=htmlCommentError
|
||||
" Normal comment opening <!-- ...>
|
||||
syn region htmlComment start=+<!--+ end=+>+ contains=htmlCommentPart,@Spell
|
||||
" Idem 8.2.4.43-44: <!--> and <!---> are parser errors; browser treats as comments
|
||||
syn match htmlComment "<!---\?>" contains=htmlCommentError
|
||||
" Idem 8.2.4.51: any number of consecutive dashes within comment is okay; --> closes comment
|
||||
" Idem 8.2.4.52: closing comment by dash-dash-bang (--!>) is error ignored by parser(!); closes comment
|
||||
syn region htmlCommentPart contained start=+--+ end=+--!\?>+me=e-1 contains=htmlCommentNested,@htmlPreProc,@Spell
|
||||
" Idem 8.2.4.49: opening nested comment <!-- is parser error, ignored by browser, except <!--> is all right
|
||||
syn match htmlCommentNested contained "<!--[^>]"me=e-1
|
||||
syn match htmlCommentNested contained "<!--->"me=e-3
|
||||
syn match htmlCommentNested contained "<!---\?!>"me=e-4
|
||||
syn match htmlCommentError contained "[^><!]"
|
||||
" The HTML 5.2 syntax 8.2.4.41: bogus comment is parser error; browser skips until next >
|
||||
syn region htmlComment start=+<!+ end=+>+ contains=htmlCommentError keepend
|
||||
" Idem 8.2.4.42,51: Comment starts with <!-- and ends with -->
|
||||
" Idem 8.2.4.43,44: Except <!--> and <!---> are parser errors
|
||||
" Idem 8.2.4.52: dash-dash-bang (--!>) is error ignored by parser, also closes comment
|
||||
syn region htmlComment matchgroup=htmlComment start=+<!--\%(-\?>\)\@!+ end=+--!\?>+ contains=htmlCommentNested,@htmlPreProc,@Spell keepend
|
||||
" Idem 8.2.4.49: nested comment is parser error, except <!--> is all right
|
||||
syn match htmlCommentNested contained "<!-->\@!"
|
||||
syn match htmlCommentError contained "[^><!]"
|
||||
endif
|
||||
syn region htmlComment start=+<!DOCTYPE+ keepend end=+>+
|
||||
syn region htmlComment start=+<!DOCTYPE+ end=+>+ keepend
|
||||
|
||||
" server-parsed commands
|
||||
syn region htmlPreProc start=+<!--#+ end=+-->+ contains=htmlPreStmt,htmlPreError,htmlPreAttr
|
||||
@@ -282,7 +267,7 @@ hi def link htmlEndTag Identifier
|
||||
hi def link htmlArg Type
|
||||
hi def link htmlTagName htmlStatement
|
||||
hi def link htmlSpecialTagName Exception
|
||||
hi def link htmlValue String
|
||||
hi def link htmlValue String
|
||||
hi def link htmlSpecialChar Special
|
||||
|
||||
if !exists("html_no_rendering")
|
||||
@@ -326,14 +311,10 @@ hi def link htmlPreProc PreProc
|
||||
hi def link htmlPreAttr String
|
||||
hi def link htmlPreProcAttrName PreProc
|
||||
hi def link htmlPreProcAttrError Error
|
||||
hi def link htmlSpecial Special
|
||||
hi def link htmlSpecialChar Special
|
||||
hi def link htmlString String
|
||||
hi def link htmlStatement Statement
|
||||
hi def link htmlComment Comment
|
||||
hi def link htmlCommentPart Comment
|
||||
hi def link htmlValue String
|
||||
hi def link htmlCommentNested htmlCommentError
|
||||
hi def link htmlCommentNested htmlError
|
||||
hi def link htmlCommentError htmlError
|
||||
hi def link htmlTagError htmlError
|
||||
hi def link htmlEvent javaScript
|
||||
|
||||
@@ -58,7 +58,7 @@ syntax match jsModuleComma contained /,/ skipwhite skipempty nextgroup=
|
||||
syntax region jsString start=+\z(["']\)+ skip=+\\\%(\z1\|$\)+ end=+\z1+ end=+$+ contains=jsSpecial extend
|
||||
syntax region jsTemplateString start=+`+ skip=+\\`+ end=+`+ contains=jsTemplateExpression,jsSpecial extend
|
||||
syntax match jsTaggedTemplate /\<\K\k*\ze`/ nextgroup=jsTemplateString
|
||||
syntax match jsNumber /\c\<\%(\d\+\%(e[+-]\=\d\+\)\=\|0b[01]\+\|0o\o\+\|0x\x\+\)\>/
|
||||
syntax match jsNumber /\c\<\%(\d\+\%(e[+-]\=\d\+\)\=\|0b[01]\+\|0o\o\+\|0x\%(\x\|_\)\+\)\>/
|
||||
syntax keyword jsNumber Infinity
|
||||
syntax match jsFloat /\c\<\%(\d\+\.\d\+\|\d\+\.\|\.\d\+\)\%(e[+-]\=\d\+\)\=\>/
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ let s:idregex = '\%([^' . s:nonidS_chars . '0-9!' . s:uniop_chars . s:binop_char
|
||||
|
||||
let s:operators = '\%(' . '\.\%([-+*/^÷%|&!]\|//\|\\\|<<\|>>>\?\)\?=' .
|
||||
\ '\|' . '[:$<>]=\|||\|&&\||>\|<|\|<:\|>:\|::\|<<\|>>>\?\|//\|[-=]>\|\.\{3\}' .
|
||||
\ '\|' . '[' . s:uniop_chars . '!$]' .
|
||||
\ '\|' . '\.\?[' . s:uniop_chars . '!]' .
|
||||
\ '\|' . '\.\?[' . s:binop_chars . s:binop_chars_extra . ']' .
|
||||
\ '\)'
|
||||
|
||||
@@ -132,12 +132,11 @@ syntax region juliaCurBraBlock matchgroup=juliaParDelim start="{" end="}" cont
|
||||
|
||||
exec 'syntax match juliaType contained "' . s:idregex . '\%(\.' . s:idregex . '\)*"'
|
||||
|
||||
exec 'syntax region juliaFunctionCallR transparent start="' . s:idregex . '\%(\.' . s:idregex . '\)*\s*(" end=")\@'.s:d(1).'<=" contains=juliaFunctionCall,juliaParBlock'
|
||||
exec 'syntax region juliaFunctionCallR transparent start="' . s:idregex . '\%(\.' . s:idregex . '\)*\.\?(" end=")\@'.s:d(1).'<=" contains=juliaFunctionCall,juliaParBlock'
|
||||
exec 'syntax match juliaFunctionCall contained "\%(' . s:idregex . '\.\)*\zs' . s:idregex . '"'
|
||||
|
||||
" note: we would in principle add a "s:nodot" before function/macro/struct/... but it shouldn't come up in valid code
|
||||
exec 'syntax match juliaFunctionDef contained transparent "\%(\<\%(function\|macro\)\s\+\)\@'.s:d(20).'<=' . s:idregex . '\%(\.' . s:idregex . '\)*\ze\s\+\%(end\>\|$\)" contains=juliaFunctionName'
|
||||
exec 'syntax region juliaFunctionDefP contained transparent start="\%(\<\%(function\|macro\)\s\+\)\@'.s:d(20).'<=' . s:idregex . '\%(\.' . s:idregex . '\)*\s*(" end=")\@'.s:d(1).'<=" contains=juliaFunctionName,juliaParBlock'
|
||||
exec 'syntax match juliaFunctionDef contained transparent "\%(\<\%(function\|macro\)\)\@'.s:d(8).'<=\s\+\zs' . s:idregex . '\%(\.' . s:idregex . '\)*\ze\s*\%((\|\send\>\|$\)" contains=juliaFunctionName'
|
||||
exec 'syntax match juliaFunctionName contained "\%(\<\%(function\|macro\)\s\+\)\@'.s:d(20).'<=\%(' . s:idregex . '\.\)*\zs' . s:idregex . '"'
|
||||
|
||||
exec 'syntax match juliaStructR contained transparent "\%(\<\%(\%(mutable\s\+\)\?struct\|\%(abstract\|primitive\)\s\+type\)\s\+\)\@'.s:d(20).'<=\%(' . s:idregex . '\.\)*' . s:idregex . '\>\(\s*(\)\@!" contains=juliaType'
|
||||
@@ -157,8 +156,8 @@ exec 'syntax region juliaConditionalEBlock matchgroup=juliaConditional transpar
|
||||
exec 'syntax region juliaWhileBlock matchgroup=juliaRepeat start="'.s:nodot.'\<while\>" end="'.s:nodot.'\<end\>" contains=@juliaExpressions fold'
|
||||
exec 'syntax region juliaForBlock matchgroup=juliaRepeat start="'.s:nodot.'\<for\>" end="'.s:nodot.'\<end\>" contains=@juliaExpressions,juliaOuter fold'
|
||||
exec 'syntax region juliaBeginBlock matchgroup=juliaBlKeyword start="'.s:nodot.'\<begin\>" end="'.s:nodot.'\<end\>" contains=@juliaExpressions fold'
|
||||
exec 'syntax region juliaFunctionBlock matchgroup=juliaBlKeyword start="'.s:nodot.'\<function\>" end="'.s:nodot.'\<end\>" contains=@juliaExpressions,juliaFunctionDef,juliaFunctionDefP fold'
|
||||
exec 'syntax region juliaMacroBlock matchgroup=juliaBlKeyword start="'.s:nodot.'\<macro\>" end="'.s:nodot.'\<end\>" contains=@juliaExpressions,juliaFunctionDef,juliaFunctionDefP fold'
|
||||
exec 'syntax region juliaFunctionBlock matchgroup=juliaBlKeyword start="'.s:nodot.'\<function\>" end="'.s:nodot.'\<end\>" contains=@juliaExpressions,juliaFunctionDef fold'
|
||||
exec 'syntax region juliaMacroBlock matchgroup=juliaBlKeyword start="'.s:nodot.'\<macro\>" end="'.s:nodot.'\<end\>" contains=@juliaExpressions,juliaFunctionDef fold'
|
||||
exec 'syntax region juliaQuoteBlock matchgroup=juliaBlKeyword start="'.s:nodot.'\<quote\>" end="'.s:nodot.'\<end\>" contains=@juliaExpressions fold'
|
||||
exec 'syntax region juliaStructBlock matchgroup=juliaBlKeyword start="'.s:nodot.'\<struct\>" end="'.s:nodot.'\<end\>" contains=@juliaExpressions,juliaStructR fold'
|
||||
exec 'syntax region juliaMutableStructBlock matchgroup=juliaBlKeyword start="'.s:nodot.'\<mutable\s\+struct\>" end="'.s:nodot.'\<end\>" contains=@juliaExpressions,juliaStructR fold'
|
||||
@@ -214,7 +213,7 @@ syntax match juliaConstIO display "\<\%(std\%(out\|in\|err\)\|devnull\)\>"
|
||||
syntax match juliaConstC display "\<\%(C_NULL\)\>"
|
||||
syntax match juliaConstGeneric display "\<\%(nothing\|Main\|undef\|missing\)\>"
|
||||
|
||||
exec 'syntax region juliaParamTypeR transparent start="' . s:idregex . '\%(\.' . s:idregex . '\)*\s*{" end="}\@'.s:d(1).'<=" contains=juliaType,@juliaExpressions'
|
||||
exec 'syntax region juliaParamTypeR transparent start="' . s:idregex . '{" end="}\@'.s:d(1).'<=" contains=juliaType,@juliaExpressions'
|
||||
|
||||
syntax match juliaPossibleMacro transparent "@" contains=juliaMacroCall,juliaMacroCallP,juliaPrintfMacro,juliaDocMacro
|
||||
|
||||
@@ -383,7 +382,7 @@ syntax cluster juliaContinuationItems contains=juliaContinuationComma,juliaConti
|
||||
exec 'syntax region juliaContinuationComma matchgroup=juliaComma contained start=",\ze'.s:eol.'" end="\n\+\ze." contains=@juliaCommentItems'
|
||||
exec 'syntax region juliaContinuationColon matchgroup=juliaColon contained start=":\ze'.s:eol.'" end="\n\+\ze." contains=@juliaCommentItems'
|
||||
exec 'syntax region juliaContinuationNone matchgroup=NONE contained start="\%(\<\%(import\|using\|export\)\>\|^\)\@'.s:d(6).'<=\ze'.s:eol.'" end="\n\+\ze." contains=@juliaCommentItems,juliaAsKeyword'
|
||||
exec 'syntax match juliaMacroName "@' . s:idregex . '\%(\.' . s:idregex . '\)*"'
|
||||
exec 'syntax match juliaMacroName contained "@' . s:idregex . '\%(\.' . s:idregex . '\)*"'
|
||||
|
||||
" the following are disabled by default, but
|
||||
" can be enabled by entering e.g.
|
||||
|
||||
@@ -5,7 +5,7 @@ endif
|
||||
" Vim syntax file
|
||||
" Language: Kotlin
|
||||
" Maintainer: Alexander Udalov
|
||||
" Latest Revision: 17 February 2021
|
||||
" Latest Revision: 11 April 2021
|
||||
|
||||
if exists('b:current_syntax')
|
||||
finish
|
||||
@@ -61,7 +61,7 @@ syn match ktModifier "\v<(data|value)>\ze\@=.*<class>"
|
||||
syn match ktModifier "\v<(tailrec|operator|infix|suspend)>\ze\@=.*<fun>"
|
||||
syn match ktModifier "\v<(const)>\ze\@=.*<val>"
|
||||
syn match ktModifier "\v<(lateinit)>\ze\@=.*<var>"
|
||||
syn match ktModifier "\v<(internal|private|protected|public)>\ze\@=.*<(class|fun|val|var|typealias)>"
|
||||
syn match ktModifier "\v<(internal|private|protected|public)>\ze\@=.*<(class|object|fun|val|var|typealias|constructor)>"
|
||||
|
||||
syn match ktOperator "\v\?:|::|\<\=? | \>\=?|[!=]\=\=?|<as>\??|[-!%&*+/|]"
|
||||
|
||||
|
||||
@@ -123,6 +123,7 @@ syn keyword mesonBuiltin
|
||||
\ test
|
||||
\ vcs_tag
|
||||
\ warning
|
||||
\ range
|
||||
|
||||
if exists("meson_space_error_highlight")
|
||||
" trailing whitespace
|
||||
|
||||
@@ -4,17 +4,10 @@ endif
|
||||
|
||||
" VIM syntax file
|
||||
" Language: nroff/groff
|
||||
" Maintainer: Pedro Alejandro López-Valencia <palopezv@gmail.com>
|
||||
" URL: http://vorbote.wordpress.com/
|
||||
" Last Change: 2012 Feb 2
|
||||
"
|
||||
" {{{1 Acknowledgements
|
||||
"
|
||||
" ACKNOWLEDGEMENTS:
|
||||
"
|
||||
" My thanks to Jérôme Plût <Jerome.Plut@ens.fr>, who was the
|
||||
" creator and maintainer of this syntax file for several years.
|
||||
" May I be as good at it as he has been.
|
||||
" Maintainer: John Marshall <jmarshall@hey.com>
|
||||
" Previous Maintainer: Pedro Alejandro López-Valencia <palopezv@gmail.com>
|
||||
" Previous Maintainer: Jérôme Plût <Jerome.Plut@ens.fr>
|
||||
" Last Change: 2021 Mar 28
|
||||
"
|
||||
" {{{1 Todo
|
||||
"
|
||||
@@ -35,6 +28,13 @@ endif
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
if exists("nroff_is_groff")
|
||||
let b:nroff_is_groff = 1
|
||||
endif
|
||||
|
||||
syn spell toplevel
|
||||
syn case match
|
||||
|
||||
"
|
||||
" {{{1 plugin settings...
|
||||
"
|
||||
@@ -52,7 +52,7 @@ endif
|
||||
"
|
||||
setlocal paragraphs+=XP
|
||||
"
|
||||
" {{{2 Activate navigation to preporcessor sections.
|
||||
" {{{2 Activate navigation to preprocessor sections.
|
||||
"
|
||||
if exists("b:preprocs_as_sections")
|
||||
setlocal sections=EQTSPS[\ G1GS
|
||||
@@ -173,9 +173,9 @@ endif
|
||||
" <jp />
|
||||
|
||||
syn region nroffEquation start=/^\.\s*EQ\>/ end=/^\.\s*EN\>/
|
||||
syn region nroffTable start=/^\.\s*TS\>/ end=/^\.\s*TE\>/
|
||||
syn region nroffTable start=/^\.\s*TS\>/ end=/^\.\s*TE\>/ contains=@Spell
|
||||
syn region nroffPicture start=/^\.\s*PS\>/ end=/^\.\s*PE\>/
|
||||
syn region nroffRefer start=/^\.\s*\[\>/ end=/^\.\s*\]\>/
|
||||
syn region nroffRefer start=/^\.\s*\[\>/ end=/^\.\s*\]\>/ contains=@Spell
|
||||
syn region nroffGrap start=/^\.\s*G1\>/ end=/^\.\s*G2\>/
|
||||
syn region nroffGremlin start=/^\.\s*GS\>/ end=/^\.\s*GE|GF\>/
|
||||
|
||||
@@ -183,11 +183,11 @@ syn region nroffGremlin start=/^\.\s*GS\>/ end=/^\.\s*GE|GF\>/
|
||||
" ------------------------------------------------------------
|
||||
|
||||
syn region nroffIgnore start=/^[.']\s*ig/ end=/^['.]\s*\./
|
||||
syn match nroffComment /\(^[.']\s*\)\=\\".*/ contains=nroffTodo
|
||||
syn match nroffComment /^'''.*/ contains=nroffTodo
|
||||
syn match nroffComment /\(^[.']\s*\)\=\\".*/ contains=nroffTodo,@Spell
|
||||
syn match nroffComment /^'''.*/ contains=nroffTodo,@Spell
|
||||
|
||||
if exists("b:nroff_is_groff")
|
||||
syn match nroffComment "\\#.*$" contains=nroffTodo
|
||||
syn match nroffComment "\\#.*$" contains=nroffTodo,@Spell
|
||||
endif
|
||||
|
||||
syn keyword nroffTodo TODO XXX FIXME contained
|
||||
@@ -202,7 +202,7 @@ syn keyword nroffTodo TODO XXX FIXME contained
|
||||
"
|
||||
|
||||
hi def link nroffEscChar nroffSpecialChar
|
||||
hi def link nroffEscCharAr nroffSpecialChar
|
||||
hi def link nroffEscCharArg nroffSpecialChar
|
||||
hi def link nroffSpecialChar SpecialChar
|
||||
hi def link nroffSpace Delimiter
|
||||
|
||||
@@ -215,7 +215,7 @@ hi def link nroffEscPar nroffEscape
|
||||
hi def link nroffEscRegPar nroffEscape
|
||||
hi def link nroffEscArg nroffEscape
|
||||
hi def link nroffSize nroffEscape
|
||||
hi def link nroffEscape Preproc
|
||||
hi def link nroffEscape PreProc
|
||||
|
||||
hi def link nroffIgnore Comment
|
||||
hi def link nroffComment Comment
|
||||
|
||||
@@ -128,7 +128,7 @@ syntax match plantumlTag /<\/\?[bi]>/
|
||||
syntax region plantumlTag start=/<\/\?\%(back\|color\|del\|font\|img\|s\|size\|strike\|u\|w\)/ end=/>/
|
||||
|
||||
" Labels with a colon
|
||||
syntax match plantumlColonLine /\S\@<=\s*\zs:.\+$/ contains=plantumlSpecialString
|
||||
syntax match plantumlColonLine /\S\@<=\s*\zs : .\+$/ contains=plantumlSpecialString
|
||||
|
||||
" Stereotypes
|
||||
syntax match plantumlStereotype /<<[^-.]\+>>/ contains=plantumlSpecialString
|
||||
|
||||
@@ -3,7 +3,7 @@ if polyglot#init#is_disabled(expand('<sfile>:p'), 'requirements', 'syntax/requir
|
||||
endif
|
||||
|
||||
" the Requirements File Format syntax support for Vim
|
||||
" Version: 1.5.3
|
||||
" Version: 1.6.0
|
||||
" Author: raimon <raimon49@hotmail.com>
|
||||
" License: MIT LICENSE
|
||||
" The MIT License (MIT)
|
||||
|
||||
@@ -5,14 +5,15 @@ endif
|
||||
" Vim syntax file
|
||||
" Language: OpenSSH client configuration file (ssh_config)
|
||||
" Author: David Necas (Yeti)
|
||||
" Maintainer: Dominik Fischer <d dot f dot fischer at web dot de>
|
||||
" Maintainer: Jakub Jelen <jakuje at gmail dot com>
|
||||
" Previous Maintainer: Dominik Fischer <d dot f dot fischer at web dot de>
|
||||
" Contributor: Leonard Ehrenfried <leonard.ehrenfried@web.de>
|
||||
" Contributor: Karsten Hopp <karsten@redhat.com>
|
||||
" Contributor: Dean, Adam Kenneth <adam.ken.dean@hpe.com>
|
||||
" Last Change: 2020 Feb 12
|
||||
" Last Change: 2021 Mar 29
|
||||
" Added RemoteCommand from pull request #4809
|
||||
" Included additional keywords from Martin.
|
||||
" SSH Version: 7.4p1
|
||||
" SSH Version: 8.5p1
|
||||
"
|
||||
|
||||
" Setup
|
||||
@@ -178,6 +179,7 @@ syn keyword sshconfigKeyword HostKeyAlgorithms
|
||||
syn keyword sshconfigKeyword HostKeyAlias
|
||||
syn keyword sshconfigKeyword HostName
|
||||
syn keyword sshconfigKeyword HostbasedAuthentication
|
||||
syn keyword sshconfigKeyword HostbasedAcceptedAlgorithms
|
||||
syn keyword sshconfigKeyword HostbasedKeyTypes
|
||||
syn keyword sshconfigKeyword IPQoS
|
||||
syn keyword sshconfigKeyword IdentitiesOnly
|
||||
@@ -189,9 +191,11 @@ syn keyword sshconfigKeyword IPQoS
|
||||
syn keyword sshconfigKeyword KbdInteractiveAuthentication
|
||||
syn keyword sshconfigKeyword KbdInteractiveDevices
|
||||
syn keyword sshconfigKeyword KexAlgorithms
|
||||
syn keyword sshconfigKeyword KnownHostsCommand
|
||||
syn keyword sshconfigKeyword LocalCommand
|
||||
syn keyword sshconfigKeyword LocalForward
|
||||
syn keyword sshconfigKeyword LogLevel
|
||||
syn keyword sshconfigKeyword LogVerbose
|
||||
syn keyword sshconfigKeyword MACs
|
||||
syn keyword sshconfigKeyword Match
|
||||
syn keyword sshconfigKeyword NoHostAuthenticationForLocalhost
|
||||
@@ -199,11 +203,13 @@ syn keyword sshconfigKeyword NumberOfPasswordPrompts
|
||||
syn keyword sshconfigKeyword PKCS11Provider
|
||||
syn keyword sshconfigKeyword PasswordAuthentication
|
||||
syn keyword sshconfigKeyword PermitLocalCommand
|
||||
syn keyword sshconfigKeyword PermitRemoteOpen
|
||||
syn keyword sshconfigKeyword Port
|
||||
syn keyword sshconfigKeyword PreferredAuthentications
|
||||
syn keyword sshconfigKeyword ProxyCommand
|
||||
syn keyword sshconfigKeyword ProxyJump
|
||||
syn keyword sshconfigKeyword ProxyUseFDPass
|
||||
syn keyword sshconfigKeyword PubkeyAcceptedAlgorithms
|
||||
syn keyword sshconfigKeyword PubkeyAcceptedKeyTypes
|
||||
syn keyword sshconfigKeyword PubkeyAuthentication
|
||||
syn keyword sshconfigKeyword RekeyLimit
|
||||
|
||||
@@ -11,8 +11,8 @@ endif
|
||||
" Contributor: Leonard Ehrenfried <leonard.ehrenfried@web.de>
|
||||
" Contributor: Karsten Hopp <karsten@redhat.com>
|
||||
" Originally: 2009-07-09
|
||||
" Last Change: 2020-10-20
|
||||
" SSH Version: 8.4p1
|
||||
" Last Change: 2021-03-29
|
||||
" SSH Version: 8.5p1
|
||||
"
|
||||
|
||||
" Setup
|
||||
@@ -199,6 +199,7 @@ syn keyword sshdconfigKeyword HostCertificate
|
||||
syn keyword sshdconfigKeyword HostKey
|
||||
syn keyword sshdconfigKeyword HostKeyAgent
|
||||
syn keyword sshdconfigKeyword HostKeyAlgorithms
|
||||
syn keyword sshdconfigKeyword HostbasedAcceptedAlgorithms
|
||||
syn keyword sshdconfigKeyword HostbasedAcceptedKeyTypes
|
||||
syn keyword sshdconfigKeyword HostbasedAuthentication
|
||||
syn keyword sshdconfigKeyword HostbasedUsesNameFromPacketOnly
|
||||
@@ -217,6 +218,7 @@ syn keyword sshdconfigKeyword KexAlgorithms
|
||||
syn keyword sshdconfigKeyword KeyRegenerationInterval
|
||||
syn keyword sshdconfigKeyword ListenAddress
|
||||
syn keyword sshdconfigKeyword LogLevel
|
||||
syn keyword sshdconfigKeyword LogVerbose
|
||||
syn keyword sshdconfigKeyword LoginGraceTime
|
||||
syn keyword sshdconfigKeyword MACs
|
||||
syn keyword sshdconfigKeyword Match
|
||||
@@ -224,6 +226,8 @@ syn keyword sshdconfigKeyword MaxAuthTries
|
||||
syn keyword sshdconfigKeyword MaxSessions
|
||||
syn keyword sshdconfigKeyword MaxStartups
|
||||
syn keyword sshdconfigKeyword PasswordAuthentication
|
||||
syn keyword sshdconfigKeyword PerSourceMaxStartups
|
||||
syn keyword sshdconfigKeyword PerSourceNetBlockSize
|
||||
syn keyword sshdconfigKeyword PermitBlacklistedKeys
|
||||
syn keyword sshdconfigKeyword PermitEmptyPasswords
|
||||
syn keyword sshdconfigKeyword PermitListen
|
||||
@@ -238,6 +242,7 @@ syn keyword sshdconfigKeyword Port
|
||||
syn keyword sshdconfigKeyword PrintLastLog
|
||||
syn keyword sshdconfigKeyword PrintMotd
|
||||
syn keyword sshdconfigKeyword Protocol
|
||||
syn keyword sshdconfigKeyword PubkeyAcceptedAlgorithms
|
||||
syn keyword sshdconfigKeyword PubkeyAcceptedKeyTypes
|
||||
syn keyword sshdconfigKeyword PubkeyAuthentication
|
||||
syn keyword sshdconfigKeyword PubkeyAuthOptions
|
||||
|
||||
@@ -4,8 +4,9 @@ endif
|
||||
|
||||
" Vim syntax file
|
||||
" Language: sudoers(5) configuration files
|
||||
" Maintainer: Eisuke Kawashima ( e.kawaschima+vim AT gmail.com )
|
||||
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2018-08-18
|
||||
" Latest Revision: 2021 Mar 15
|
||||
" Recent Changes: Support for #include and #includedir.
|
||||
" Added many new options (Samuel D. Leslie)
|
||||
|
||||
@@ -30,7 +31,7 @@ syn cluster sudoersCmndSpecList contains=sudoersUserRunasBegin,sudoersPASS
|
||||
syn keyword sudoersTodo contained TODO FIXME XXX NOTE
|
||||
|
||||
syn region sudoersComment display oneline start='#' end='$' contains=sudoersTodo
|
||||
syn region sudoersInclude display oneline start='#\(include\|includedir\)' end='$'
|
||||
syn region sudoersInclude display oneline start='[#@]\%(include\|includedir\)\>' end='$'
|
||||
|
||||
syn keyword sudoersAlias User_Alias Runas_Alias nextgroup=sudoersUserAlias skipwhite skipnl
|
||||
syn keyword sudoersAlias Host_Alias nextgroup=sudoersHostAlias skipwhite skipnl
|
||||
@@ -205,7 +206,7 @@ syn keyword sudoersBooleanParameter contained skipwhite skipnl
|
||||
\ shell_noargs
|
||||
\ stay_setuid
|
||||
\ sudoedit_checkdir
|
||||
\ sudoedit_fellow
|
||||
\ sudoedit_follow
|
||||
\ syslog_pid
|
||||
\ targetpw
|
||||
\ tty_tickets
|
||||
|
||||
Reference in New Issue
Block a user