mirror of
https://github.com/sheerun/vim-polyglot.git
synced 2025-11-09 12:03:53 -05:00
Compare commits
14 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5b38663027 | ||
|
|
f0b38f2c1d | ||
|
|
6676d61f61 | ||
|
|
f0da1a9f4d | ||
|
|
298d6b6356 | ||
|
|
62f004c3da | ||
|
|
c73ea49ecb | ||
|
|
b2be47befc | ||
|
|
de38ccabbd | ||
|
|
f0f49cf0fa | ||
|
|
224a6348f9 | ||
|
|
00c3f02945 | ||
|
|
df34b4b4fa | ||
|
|
f3804b0892 |
7
.gitattributes
vendored
7
.gitattributes
vendored
@@ -1,7 +0,0 @@
|
|||||||
.gitignore export-ignore
|
|
||||||
.gitattributes export-ignore
|
|
||||||
README.md export-ignore
|
|
||||||
/spec export-ignore
|
|
||||||
Gemfile export-ignore
|
|
||||||
Gemfile.lock export-ignore
|
|
||||||
.travis.yml export-ignore
|
|
||||||
16
.travis.yml
16
.travis.yml
@@ -1,11 +1,7 @@
|
|||||||
language: ruby
|
language: vim
|
||||||
rvm:
|
|
||||||
- 2.6
|
|
||||||
sudo: false
|
|
||||||
addons:
|
|
||||||
apt:
|
|
||||||
packages:
|
|
||||||
- vim-gtk
|
|
||||||
before_script:
|
before_script:
|
||||||
- "./build"
|
- sudo add-apt-repository ppa:jonathonf/vim -y
|
||||||
script: xvfb-run bundle exec rspec --format=documentation
|
- sudo apt-get update -q
|
||||||
|
- sudo apt-get install -y vim
|
||||||
|
- vim --version
|
||||||
|
script: ./test
|
||||||
|
|||||||
28
Gemfile.lock
28
Gemfile.lock
@@ -1,28 +0,0 @@
|
|||||||
GEM
|
|
||||||
remote: https://rubygems.org/
|
|
||||||
specs:
|
|
||||||
diff-lcs (1.3)
|
|
||||||
rspec (3.8.0)
|
|
||||||
rspec-core (~> 3.8.0)
|
|
||||||
rspec-expectations (~> 3.8.0)
|
|
||||||
rspec-mocks (~> 3.8.0)
|
|
||||||
rspec-core (3.8.0)
|
|
||||||
rspec-support (~> 3.8.0)
|
|
||||||
rspec-expectations (3.8.2)
|
|
||||||
diff-lcs (>= 1.2.0, < 2.0)
|
|
||||||
rspec-support (~> 3.8.0)
|
|
||||||
rspec-mocks (3.8.0)
|
|
||||||
diff-lcs (>= 1.2.0, < 2.0)
|
|
||||||
rspec-support (~> 3.8.0)
|
|
||||||
rspec-support (3.8.0)
|
|
||||||
vimrunner (0.3.4)
|
|
||||||
|
|
||||||
PLATFORMS
|
|
||||||
ruby
|
|
||||||
|
|
||||||
DEPENDENCIES
|
|
||||||
rspec
|
|
||||||
vimrunner
|
|
||||||
|
|
||||||
BUNDLED WITH
|
|
||||||
1.16.2
|
|
||||||
@@ -10,13 +10,13 @@ A collection of language packs for Vim.
|
|||||||
> One to rule them all, one to find them, one to bring them all and in the darkness bind them.
|
> One to rule them all, one to find them, one to bring them all and in the darkness bind them.
|
||||||
|
|
||||||
- It **won't affect your startup time**, as scripts are loaded only on demand\*.
|
- It **won't affect your startup time**, as scripts are loaded only on demand\*.
|
||||||
- It **installs and updates 120+ times faster** than the <!--Package Count-->149<!--/Package Count--> packages it consists of.
|
- It **installs and updates 120+ times faster** than the <!--Package Count-->151<!--/Package Count--> packages it consists of.
|
||||||
- Solid syntax and indentation support (other features skipped). Only the best language packs.
|
- Solid syntax and indentation support (other features skipped). Only the best language packs.
|
||||||
- All unnecessary files are ignored (like enormous documentation from php support).
|
- All unnecessary files are ignored (like enormous documentation from php support).
|
||||||
- No support for esoteric languages, only most popular ones (modern too, like `slim`).
|
- No support for esoteric languages, only most popular ones (modern too, like `slim`).
|
||||||
- Each build is tested by automated vimrunner script on CI. See `spec` directory.
|
- Each build is tested by automated vimrunner script on CI. See `spec` directory.
|
||||||
|
|
||||||
\*To be completely honest, concatenated `ftdetect` script takes up to `17ms` to load.
|
\*To be completely honest, optimized `ftdetect` script takes up to `19ms` to load.
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
@@ -81,7 +81,7 @@ If you need full functionality of any plugin, please use it directly with your p
|
|||||||
- [fish](https://github.com/georgewitteman/vim-fish) (syntax, indent, compiler, autoload, ftplugin)
|
- [fish](https://github.com/georgewitteman/vim-fish) (syntax, indent, compiler, autoload, ftplugin)
|
||||||
- [flatbuffers](https://github.com/dcharbon/vim-flatbuffers) (syntax)
|
- [flatbuffers](https://github.com/dcharbon/vim-flatbuffers) (syntax)
|
||||||
- [fsharp](https://github.com/ionide/Ionide-vim) (syntax, indent)
|
- [fsharp](https://github.com/ionide/Ionide-vim) (syntax, indent)
|
||||||
- [gdscript](https://github.com/calviken/vim-gdscript3) (syntax, indent, ftplugin)
|
- [gdscript](https://github.com/calviken/vim-gdscript3) (syntax, indent)
|
||||||
- [git](https://github.com/tpope/vim-git) (syntax, indent, ftplugin)
|
- [git](https://github.com/tpope/vim-git) (syntax, indent, ftplugin)
|
||||||
- [glsl](https://github.com/tikhomirov/vim-glsl) (syntax, indent)
|
- [glsl](https://github.com/tikhomirov/vim-glsl) (syntax, indent)
|
||||||
- [gmpl](https://github.com/maelvalais/gmpl.vim) (syntax)
|
- [gmpl](https://github.com/maelvalais/gmpl.vim) (syntax)
|
||||||
@@ -99,6 +99,7 @@ If you need full functionality of any plugin, please use it directly with your p
|
|||||||
- [hive](https://github.com/zebradil/hive.vim) (syntax, ftplugin)
|
- [hive](https://github.com/zebradil/hive.vim) (syntax, ftplugin)
|
||||||
- [html5](https://github.com/othree/html5.vim) (syntax, indent, autoload, ftplugin)
|
- [html5](https://github.com/othree/html5.vim) (syntax, indent, autoload, ftplugin)
|
||||||
- [i3](https://github.com/mboughaba/i3config.vim) (syntax, ftplugin)
|
- [i3](https://github.com/mboughaba/i3config.vim) (syntax, ftplugin)
|
||||||
|
- [icalenadr](https://github.com/chutzpah/icalendar.vim) (syntax)
|
||||||
- [idris](https://github.com/idris-hackers/idris-vim) (syntax, indent, ftplugin)
|
- [idris](https://github.com/idris-hackers/idris-vim) (syntax, indent, ftplugin)
|
||||||
- [ion](https://github.com/vmchale/ion-vim) (syntax, ftplugin)
|
- [ion](https://github.com/vmchale/ion-vim) (syntax, ftplugin)
|
||||||
- [javascript](https://github.com/pangloss/vim-javascript) (syntax, indent, compiler, ftplugin, extras)
|
- [javascript](https://github.com/pangloss/vim-javascript) (syntax, indent, compiler, ftplugin, extras)
|
||||||
@@ -159,6 +160,7 @@ If you need full functionality of any plugin, please use it directly with your p
|
|||||||
- [sbt](https://github.com/derekwyatt/vim-sbt) (syntax)
|
- [sbt](https://github.com/derekwyatt/vim-sbt) (syntax)
|
||||||
- [scala](https://github.com/derekwyatt/vim-scala) (syntax, indent, compiler, ftplugin, ctags)
|
- [scala](https://github.com/derekwyatt/vim-scala) (syntax, indent, compiler, ftplugin, ctags)
|
||||||
- [scss](https://github.com/cakebaker/scss-syntax.vim) (syntax, indent, ftplugin)
|
- [scss](https://github.com/cakebaker/scss-syntax.vim) (syntax, indent, ftplugin)
|
||||||
|
- [sh](https://github.com/arzg/vim-sh) (syntax)
|
||||||
- [slim](https://github.com/slim-template/vim-slim) (syntax, indent, ftplugin)
|
- [slim](https://github.com/slim-template/vim-slim) (syntax, indent, ftplugin)
|
||||||
- [slime](https://github.com/slime-lang/vim-slime-syntax) (syntax, indent)
|
- [slime](https://github.com/slime-lang/vim-slime-syntax) (syntax, indent)
|
||||||
- [smt2](https://github.com/bohlender/vim-smt2) (syntax, autoload, ftplugin)
|
- [smt2](https://github.com/bohlender/vim-smt2) (syntax, autoload, ftplugin)
|
||||||
|
|||||||
@@ -267,7 +267,7 @@ fu! csv#GetPat(colnr, maxcolnr, pat, allowmore) "{{{3
|
|||||||
" Allow space in front of the pattern, so that it works correctly
|
" Allow space in front of the pattern, so that it works correctly
|
||||||
" even if :Arrange Col has been used #100
|
" even if :Arrange Col has been used #100
|
||||||
return '^' . csv#GetColPat(a:colnr - 1,0) .
|
return '^' . csv#GetColPat(a:colnr - 1,0) .
|
||||||
\ '\s*\zs' . a:pat . '\ze' . (a:allowmore ? '' : '$')
|
\ '.*\zs' . a:pat . '\ze' . (a:allowmore ? '' : '$')
|
||||||
else
|
else
|
||||||
return '\%' . b:csv_fixed_width_cols[-1] .
|
return '\%' . b:csv_fixed_width_cols[-1] .
|
||||||
\ 'c\zs' . a:pat . '\ze' . (a:allowmore ? '' : '$')
|
\ 'c\zs' . a:pat . '\ze' . (a:allowmore ? '' : '$')
|
||||||
@@ -504,7 +504,7 @@ fu! csv#WColumn(...) "{{{3
|
|||||||
" Return on which column the cursor is
|
" Return on which column the cursor is
|
||||||
let _cur = getpos('.')
|
let _cur = getpos('.')
|
||||||
if !exists("b:csv_fixed_width_cols")
|
if !exists("b:csv_fixed_width_cols")
|
||||||
if line('.') > 1 && mode('') != 'n'
|
if line('.') > 1 && mode('') != 'n' && empty(getline('.')[0:col('.')-1])
|
||||||
" in insert mode, get line from above, just in case the current
|
" in insert mode, get line from above, just in case the current
|
||||||
" line is empty
|
" line is empty
|
||||||
let line = getline(line('.')-1)
|
let line = getline(line('.')-1)
|
||||||
|
|||||||
@@ -170,8 +170,8 @@ function! go#config#EchoCommandInfo() abort
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! go#config#DocUrl() abort
|
function! go#config#DocUrl() abort
|
||||||
let godoc_url = get(g:, 'go_doc_url', 'https://godoc.org')
|
let godoc_url = get(g:, 'go_doc_url', 'https://pkg.go.dev')
|
||||||
if godoc_url isnot 'https://godoc.org'
|
if godoc_url isnot 'https://pkg.go.dev'
|
||||||
" strip last '/' character if available
|
" strip last '/' character if available
|
||||||
let last_char = strlen(godoc_url) - 1
|
let last_char = strlen(godoc_url) - 1
|
||||||
if godoc_url[last_char] == '/'
|
if godoc_url[last_char] == '/'
|
||||||
@@ -266,23 +266,11 @@ function! go#config#MetalinterCommand() abort
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! go#config#MetalinterAutosaveEnabled() abort
|
function! go#config#MetalinterAutosaveEnabled() abort
|
||||||
let l:default_enabled = ["vet", "golint"]
|
return get(g:, "go_metalinter_autosave_enabled", ["govet", "golint"])
|
||||||
|
|
||||||
if go#config#MetalinterCommand() == "golangci-lint"
|
|
||||||
let l:default_enabled = ["govet", "golint"]
|
|
||||||
endif
|
|
||||||
|
|
||||||
return get(g:, "go_metalinter_autosave_enabled", default_enabled)
|
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! go#config#MetalinterEnabled() abort
|
function! go#config#MetalinterEnabled() abort
|
||||||
let l:default_enabled = ["vet", "golint", "errcheck"]
|
return get(g:, "go_metalinter_enabled", ["vet", "golint", "errcheck"])
|
||||||
|
|
||||||
if go#config#MetalinterCommand() == "golangci-lint"
|
|
||||||
let l:default_enabled = ["govet", "golint"]
|
|
||||||
endif
|
|
||||||
|
|
||||||
return get(g:, "go_metalinter_enabled", default_enabled)
|
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! go#config#GolintBin() abort
|
function! go#config#GolintBin() abort
|
||||||
|
|||||||
4
build
4
build
@@ -173,7 +173,7 @@ PACKS="
|
|||||||
fish:georgewitteman/vim-fish
|
fish:georgewitteman/vim-fish
|
||||||
flatbuffers:dcharbon/vim-flatbuffers
|
flatbuffers:dcharbon/vim-flatbuffers
|
||||||
fsharp:ionide/Ionide-vim:_BASIC
|
fsharp:ionide/Ionide-vim:_BASIC
|
||||||
gdscript:calviken/vim-gdscript3
|
gdscript:calviken/vim-gdscript3:_SYNTAX
|
||||||
git:tpope/vim-git
|
git:tpope/vim-git
|
||||||
glsl:tikhomirov/vim-glsl:_NOAFTER
|
glsl:tikhomirov/vim-glsl:_NOAFTER
|
||||||
gmpl:maelvalais/gmpl.vim
|
gmpl:maelvalais/gmpl.vim
|
||||||
@@ -191,6 +191,7 @@ PACKS="
|
|||||||
hive:zebradil/hive.vim
|
hive:zebradil/hive.vim
|
||||||
html5:othree/html5.vim
|
html5:othree/html5.vim
|
||||||
i3:mboughaba/i3config.vim
|
i3:mboughaba/i3config.vim
|
||||||
|
icalenadr:chutzpah/icalendar.vim
|
||||||
idris:idris-hackers/idris-vim
|
idris:idris-hackers/idris-vim
|
||||||
ion:vmchale/ion-vim
|
ion:vmchale/ion-vim
|
||||||
javascript:pangloss/vim-javascript:_JAVASCRIPT
|
javascript:pangloss/vim-javascript:_JAVASCRIPT
|
||||||
@@ -251,6 +252,7 @@ PACKS="
|
|||||||
sbt:derekwyatt/vim-sbt
|
sbt:derekwyatt/vim-sbt
|
||||||
scala:derekwyatt/vim-scala
|
scala:derekwyatt/vim-scala
|
||||||
scss:cakebaker/scss-syntax.vim
|
scss:cakebaker/scss-syntax.vim
|
||||||
|
sh:arzg/vim-sh
|
||||||
slim:slim-template/vim-slim
|
slim:slim-template/vim-slim
|
||||||
slime:slime-lang/vim-slime-syntax
|
slime:slime-lang/vim-slime-syntax
|
||||||
smt2:bohlender/vim-smt2
|
smt2:bohlender/vim-smt2
|
||||||
|
|||||||
@@ -17,6 +17,10 @@ if exists(':CompilerSet') != 2
|
|||||||
command -nargs=* CompilerSet setlocal <args>
|
command -nargs=* CompilerSet setlocal <args>
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if !exists('g:ledger_main')
|
||||||
|
let g:ledger_main = '%'
|
||||||
|
endif
|
||||||
|
|
||||||
if !g:ledger_is_hledger
|
if !g:ledger_is_hledger
|
||||||
" Capture Ledger errors (%-C ignores all lines between "While parsing..." and "Error:..."):
|
" Capture Ledger errors (%-C ignores all lines between "While parsing..." and "Error:..."):
|
||||||
CompilerSet errorformat=%EWhile\ parsing\ file\ \"%f\"\\,\ line\ %l:,%ZError:\ %m,%-C%.%#
|
CompilerSet errorformat=%EWhile\ parsing\ file\ \"%f\"\\,\ line\ %l:,%ZError:\ %m,%-C%.%#
|
||||||
@@ -24,9 +28,9 @@ if !g:ledger_is_hledger
|
|||||||
CompilerSet errorformat+=%tarning:\ \"%f\"\\,\ line\ %l:\ %m
|
CompilerSet errorformat+=%tarning:\ \"%f\"\\,\ line\ %l:\ %m
|
||||||
" Skip all other lines:
|
" Skip all other lines:
|
||||||
CompilerSet errorformat+=%-G%.%#
|
CompilerSet errorformat+=%-G%.%#
|
||||||
exe 'CompilerSet makeprg='.substitute(g:ledger_bin, ' ', '\\ ', 'g').'\ -f\ %\ '.substitute(g:ledger_extra_options, ' ', '\\ ', 'g').'\ source\ %'
|
exe 'CompilerSet makeprg='.substitute(g:ledger_bin, ' ', '\\ ', 'g').'\ -f\ ' . shellescape(expand(g:ledger_main)) . '\ '.substitute(g:ledger_extra_options, ' ', '\\ ', 'g').'\ source\ ' . shellescape(expand(g:ledger_main))
|
||||||
else
|
else
|
||||||
exe 'CompilerSet makeprg=('.substitute(g:ledger_bin, ' ', '\\ ', 'g').'\ -f\ %\ print\ '.substitute(g:ledger_extra_options, ' ', '\\ ', 'g').'\ >\ /dev/null)'
|
exe 'CompilerSet makeprg=('.substitute(g:ledger_bin, ' ', '\\ ', 'g').'\ -f\ ' . shellescape(expand(g:ledger_main)) . '\ print\ '.substitute(g:ledger_extra_options, ' ', '\\ ', 'g').'\ >\ /dev/null)'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1,107 +0,0 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'gdscript') == -1
|
|
||||||
|
|
||||||
setlocal commentstring=#\ %s
|
|
||||||
|
|
||||||
if exists("g:gdscript3_loaded")
|
|
||||||
finish
|
|
||||||
endif
|
|
||||||
let g:gdscript3_loaded=1
|
|
||||||
|
|
||||||
if !has("python3") && !has("python")
|
|
||||||
finish
|
|
||||||
endif
|
|
||||||
|
|
||||||
if has("python3")
|
|
||||||
let s:pyfile_cmd = "py3file"
|
|
||||||
let s:py_cmd = "py3"
|
|
||||||
else
|
|
||||||
let s:pyfile_cmd = "pyfile"
|
|
||||||
let s:py_cmd = "py"
|
|
||||||
endif
|
|
||||||
|
|
||||||
execute s:pyfile_cmd . " " . expand('<sfile>:p:h') . "/../python/init.py"
|
|
||||||
|
|
||||||
fun! GDScriptComplete(findstart, base)
|
|
||||||
if a:findstart == 1
|
|
||||||
let line = getline('.')
|
|
||||||
let start = col('.') - 1
|
|
||||||
" Treat '-' as part of the word when completing in a string.
|
|
||||||
if synIDattr(synID(line('.'), col('.')-1, 1), 'name') ==# "gdString"
|
|
||||||
let pattern = '[-a-zA-Z0-9_]'
|
|
||||||
else
|
|
||||||
let pattern = '[a-zA-Z0-9_]'
|
|
||||||
endif
|
|
||||||
while start > 0 && line[start - 1] =~ pattern
|
|
||||||
let start -= 1
|
|
||||||
endwhile
|
|
||||||
return start
|
|
||||||
else
|
|
||||||
execute s:py_cmd . " gdscript_complete()"
|
|
||||||
if exists("gdscript_completions")
|
|
||||||
return gdscript_completions
|
|
||||||
else
|
|
||||||
return []
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
endfun
|
|
||||||
set omnifunc=GDScriptComplete
|
|
||||||
|
|
||||||
" Configure for common completion frameworks.
|
|
||||||
|
|
||||||
" Deoplete
|
|
||||||
if &rtp =~ 'deoplete.nvim'
|
|
||||||
call deoplete#custom#option('sources', {
|
|
||||||
\ 'gdscript3': ['omni'],
|
|
||||||
\ })
|
|
||||||
call deoplete#custom#var('omni', 'input_patterns', {
|
|
||||||
\ 'gdscript3': [
|
|
||||||
\ '\.|\w+',
|
|
||||||
\ '\bextends\s+',
|
|
||||||
\ '\bexport\(',
|
|
||||||
\ '\bfunc\s+',
|
|
||||||
\ '"res://[^"]*'
|
|
||||||
\ ]
|
|
||||||
\ })
|
|
||||||
endif
|
|
||||||
|
|
||||||
" SuperTab
|
|
||||||
let g:SuperTabDefaultCompletionType = "<c-x><c-o>"
|
|
||||||
|
|
||||||
" YouCompleteMe
|
|
||||||
if !exists('g:ycm_semantic_triggers')
|
|
||||||
let g:ycm_semantic_triggers = {}
|
|
||||||
endif
|
|
||||||
let g:ycm_semantic_triggers.gdscript3 = [
|
|
||||||
\'re!\w+',
|
|
||||||
\'.',
|
|
||||||
\'re!\bextends\s+',
|
|
||||||
\'re!\bexport\(',
|
|
||||||
\'re!\bfunc\s+',
|
|
||||||
\'re!"res://[^"]*'
|
|
||||||
\]
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
" Configure echodoc
|
|
||||||
if &rtp =~ 'echodoc'
|
|
||||||
let s:echodoc_dict = { "name": "gdscript3", "rank": 9 }
|
|
||||||
fun! s:echodoc_dict.search(text)
|
|
||||||
execute s:py_cmd . " echodoc_search()"
|
|
||||||
if exists("echodoc_search_result")
|
|
||||||
return echodoc_search_result
|
|
||||||
else
|
|
||||||
return []
|
|
||||||
endif
|
|
||||||
endfun
|
|
||||||
call echodoc#register('gdscript3', s:echodoc_dict)
|
|
||||||
|
|
||||||
" Reset echodoc cache when exiting insert mode.
|
|
||||||
" This fixes an issue where the function signature wouldn't re-appear
|
|
||||||
" after exiting and re-entering insert mode.
|
|
||||||
au InsertLeave * let b:prev_echodoc = []
|
|
||||||
endif
|
|
||||||
|
|
||||||
" Configure Syntastic checker
|
|
||||||
let g:syntastic_gdscript3_checkers = ['godot_server']
|
|
||||||
|
|
||||||
endif
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'gdscript') == -1
|
|
||||||
|
|
||||||
setlocal commentstring=//\ %s
|
|
||||||
|
|
||||||
endif
|
|
||||||
@@ -40,7 +40,8 @@ let s:cposet=&cpoptions
|
|||||||
set cpo&vim
|
set cpo&vim
|
||||||
|
|
||||||
" Comment string
|
" Comment string
|
||||||
setlocal comments=
|
setlocal comments=sr:(*\ ,mb:\ ,ex:*)
|
||||||
|
setlocal comments^=sr:(**,mb:\ \ ,ex:*)
|
||||||
setlocal commentstring=(*%s*)
|
setlocal commentstring=(*%s*)
|
||||||
|
|
||||||
" Add mappings, unless the user didn't want this.
|
" Add mappings, unless the user didn't want this.
|
||||||
|
|||||||
@@ -835,7 +835,7 @@ function! s:ErlangCalcIndent2(lnum, stack)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
elseif stack == ['prev_term_plus']
|
elseif stack == ['prev_term_plus']
|
||||||
if token =~# '[a-zA-Z_@]' ||
|
if token =~# '[a-zA-Z_@#]' ||
|
||||||
\ token ==# '<string>' || token ==# '<string_start>' ||
|
\ token ==# '<string>' || token ==# '<string_start>' ||
|
||||||
\ token ==# '<quoted_atom>' || token ==# '<quoted_atom_start>'
|
\ token ==# '<quoted_atom>' || token ==# '<quoted_atom_start>'
|
||||||
call s:Log(' previous token found: curr_vcol + plus = ' .
|
call s:Log(' previous token found: curr_vcol + plus = ' .
|
||||||
|
|||||||
@@ -32,7 +32,8 @@ setlocal nosmartindent
|
|||||||
" Comment formatting
|
" Comment formatting
|
||||||
if !exists("no_ocaml_comments")
|
if !exists("no_ocaml_comments")
|
||||||
if (has("comments"))
|
if (has("comments"))
|
||||||
setlocal comments=sr:(*,mb:*,ex:*)
|
setlocal comments=sr:(*\ ,mb:\ ,ex:*)
|
||||||
|
setlocal comments^=sr:(**,mb:\ \ ,ex:*)
|
||||||
setlocal fo=cqort
|
setlocal fo=cqort
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -1,28 +0,0 @@
|
|||||||
require 'spec_helper'
|
|
||||||
require 'timeout'
|
|
||||||
|
|
||||||
describe "My Vim plugin" do
|
|
||||||
|
|
||||||
extensions = `cat ftdetect/polyglot.vim | grep '^au' | tr "\t" ' ' | cut -d ' ' -f 3 | grep -v / | grep -v '^\*$' | grep -v '^$'`.strip
|
|
||||||
|
|
||||||
extensions.gsub!(/\[(.).+\]/) { $1 }.gsub!('*', 'test')
|
|
||||||
|
|
||||||
extensions = extensions.split(/[\n,]/)
|
|
||||||
|
|
||||||
extensions.sort!.uniq!.each do |ext|
|
|
||||||
if ext.match?(/^[a-z\.]+$/i)
|
|
||||||
it "should parse #{ext} file" do
|
|
||||||
Timeout::timeout(20) do
|
|
||||||
write_file "#{ext}", ""
|
|
||||||
vim.edit "#{ext}"
|
|
||||||
vim.insert "sample"
|
|
||||||
vim.write
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
after(:all) do
|
|
||||||
vim.kill
|
|
||||||
end
|
|
||||||
end
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
require 'vimrunner'
|
|
||||||
require 'vimrunner/rspec'
|
|
||||||
|
|
||||||
$plugin_path = File.expand_path('../..', __FILE__)
|
|
||||||
|
|
||||||
Vimrunner::RSpec.configure do |config|
|
|
||||||
config.reuse_server = false
|
|
||||||
|
|
||||||
# Decide how to start a Vim instance. In this block, an instance should be
|
|
||||||
# spawned and set up with anything project-specific.
|
|
||||||
config.start_vim do
|
|
||||||
vim = Vimrunner.start
|
|
||||||
|
|
||||||
# Setup your plugin in the Vim instance
|
|
||||||
vim.add_plugin($plugin_path)
|
|
||||||
|
|
||||||
# The returned value is the Client available in the tests.
|
|
||||||
vim
|
|
||||||
end
|
|
||||||
end
|
|
||||||
@@ -1,7 +1,9 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'crystal') == -1
|
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'crystal') == -1
|
||||||
|
|
||||||
" Language: Crystal
|
" Language: Crystal
|
||||||
" Maintainer: rhysd <https://rhysd.github.io>
|
" Maintainer:
|
||||||
|
" rhysd <https://rhysd.github.io>
|
||||||
|
" Jeffrey Crochet <jlcrochet@pm.me>
|
||||||
"
|
"
|
||||||
" Based on Ruby syntax highlight
|
" Based on Ruby syntax highlight
|
||||||
" which was made by Mirko Nasato and Doug Kearns
|
" which was made by Mirko Nasato and Doug Kearns
|
||||||
|
|||||||
@@ -30,13 +30,13 @@ syntax keyword dartOperator new is as in
|
|||||||
syntax match dartOperator "+=\=\|-=\=\|*=\=\|/=\=\|%=\=\|\~/=\=\|<<=\=\|>>=\=\|[<>]=\=\|===\=\|\!==\=\|&=\=\|\^=\=\||=\=\|||\|&&\|\[\]=\=\|=>\|!\|\~\|?\|:"
|
syntax match dartOperator "+=\=\|-=\=\|*=\=\|/=\=\|%=\=\|\~/=\=\|<<=\=\|>>=\=\|[<>]=\=\|===\=\|\!==\=\|&=\=\|\^=\=\||=\=\|||\|&&\|\[\]=\=\|=>\|!\|\~\|?\|:"
|
||||||
syntax keyword dartCoreType void var dynamic
|
syntax keyword dartCoreType void var dynamic
|
||||||
syntax keyword dartStatement return
|
syntax keyword dartStatement return
|
||||||
syntax keyword dartStorageClass static abstract final const factory
|
syntax keyword dartStorageClass static abstract final const factory late
|
||||||
syntax keyword dartExceptions throw rethrow try on catch finally
|
syntax keyword dartExceptions throw rethrow try on catch finally
|
||||||
syntax keyword dartAssert assert
|
syntax keyword dartAssert assert
|
||||||
syntax keyword dartClassDecl extends with implements
|
syntax keyword dartClassDecl extends with implements
|
||||||
syntax keyword dartBranch break continue nextgroup=dartUserLabelRef skipwhite
|
syntax keyword dartBranch break continue nextgroup=dartUserLabelRef skipwhite
|
||||||
syntax keyword dartKeyword get set operator call external async await
|
syntax keyword dartKeyword get set operator call external async await
|
||||||
\ yield sync native covariant
|
\ yield sync native covariant required
|
||||||
syntax match dartUserLabelRef "\k\+" contained
|
syntax match dartUserLabelRef "\k\+" contained
|
||||||
|
|
||||||
syntax region dartLabelRegion transparent matchgroup=dartLabel start="\<case\>" matchgroup=NONE end=":"
|
syntax region dartLabelRegion transparent matchgroup=dartLabel start="\<case\>" matchgroup=NONE end=":"
|
||||||
|
|||||||
59
syntax/icalendar.vim
Normal file
59
syntax/icalendar.vim
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'icalenadr') == -1
|
||||||
|
|
||||||
|
" Vim syntax file
|
||||||
|
" Language: icalendar <http://www.ietf.org/rfc/rfc2445.txt>
|
||||||
|
" Maintainer: Steven N. Severinghaus <sns@severinghaus.org>
|
||||||
|
" Last Modified: 2006-04-17
|
||||||
|
" Version: 0.3
|
||||||
|
|
||||||
|
" Quit if syntax file is already loaded
|
||||||
|
if version < 600
|
||||||
|
syntax clear
|
||||||
|
elseif exists("b:current_syntax")
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
|
command! -nargs=+ IcalHiLink hi def link <args>
|
||||||
|
|
||||||
|
syntax case ignore
|
||||||
|
setlocal iskeyword+=-
|
||||||
|
|
||||||
|
syn match icalObject "^\(BEGIN\|END\)"
|
||||||
|
syn match icalObjectType ":\(VCALENDAR\|VEVENT\|VTODO\|VJOURNAL\|VFREEBUSY\|VTIMEZONE\|VALARM\)$"
|
||||||
|
syn match icalObjectType ":\(DAYLIGHT\|STANDARD\)$"
|
||||||
|
syn match icalProperty "^\(DTSTART\|PRODID\|VERSION\|CALSCALE\|METHOD\)"
|
||||||
|
syn match icalProperty "^\(DTEND\|DTSTAMP\|ORGANIZER\|UID\|CLASS\|CREATED\)"
|
||||||
|
syn match icalProperty "^\(LOCATION\|SEQUENCE\|STATUS\|SUMMARY\|COMMENT\)"
|
||||||
|
syn match icalProperty "^\(TRANSP\|ATTENDEE\|ATTACH\|FREEBUSY\|METHOD\|CONTACT\)"
|
||||||
|
syn match icalProperty "^\(DURATION\|RRULE\|EXDATE\|EXRULE\|URL\|DESCRIPTION\|ACTION\)"
|
||||||
|
syn match icalProperty "^\(LAST-MODIFIED\|RECURRENCE-ID\|TRIGGER\|RELATED-TO\|RDATE\)"
|
||||||
|
syn match icalProperty "^\(TZID\|TZOFFSETFROM\|TZOFFSETTO\|TZNAME\|TZURL\)"
|
||||||
|
syn match icalProperty "^\(PRIORITY\|DUE\|COMPLETED\|PERCENT-COMPLETE\|CATEGORIES\)"
|
||||||
|
syn match icalProperty "^\(RESOURCES\|REPEAT\|REQUEST-STATUS\)"
|
||||||
|
syn match icalCustom /^X-[A-Z-]\+/
|
||||||
|
syn match icalDate "\<\d\{8}\>"
|
||||||
|
syn match icalDate "[0-9]\{8}T[0-9]\{6}Z\="
|
||||||
|
syn match icalParameter "[A-Z0-9-]\+=[^;:]\+"
|
||||||
|
syn keyword icalSetValue CONFIRMED TENTATIVE CANCELLED DELEGATED OPAQUE
|
||||||
|
syn keyword icalSetValue NEEDS-ACTION ACCEPTED DECLINED IN-PROGRESS
|
||||||
|
syn keyword icalSetValue PRIVATE PUBLIC PUBLISH GREGORIAN DISPLAY
|
||||||
|
syn match icalSetValue /:COMPLETED$/
|
||||||
|
|
||||||
|
" Types: PreProc Keyword Type String Comment Special
|
||||||
|
IcalHiLink icalProperty PreProc
|
||||||
|
IcalHiLink icalObject Label
|
||||||
|
IcalHiLink icalObjectType Type
|
||||||
|
IcalHiLink icalDate String
|
||||||
|
IcalHiLink icalParameter Comment
|
||||||
|
IcalHiLink icalSetValue Special
|
||||||
|
IcalHiLink icalCustom Error
|
||||||
|
|
||||||
|
delcommand IcalHiLink
|
||||||
|
|
||||||
|
let b:current_syntax = "icalendar"
|
||||||
|
|
||||||
|
"EOF vim: tw=78:ft=vim:ts=8
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
endif
|
||||||
@@ -124,7 +124,7 @@ syntax region juliaCurBraBlock matchgroup=juliaParDelim start="{" end="}" cont
|
|||||||
|
|
||||||
" This is really ugly. It would be better to mask most keywords when a dot is
|
" This is really ugly. It would be better to mask most keywords when a dot is
|
||||||
" found, introducing some kind of dot-environment
|
" found, introducing some kind of dot-environment
|
||||||
let s:nodot = '\%(\.\)\@'.s:d(1).'1<!'
|
let s:nodot = '\%(\.\)\@'.s:d(1).'<!'
|
||||||
|
|
||||||
exec 'syntax match juliaKeyword display "'.s:nodot.'\<\%(return\|local\|global\|import\%(all\)\?\|export\|using\|const\|where\)\>"'
|
exec 'syntax match juliaKeyword display "'.s:nodot.'\<\%(return\|local\|global\|import\%(all\)\?\|export\|using\|const\|where\)\>"'
|
||||||
syntax match juliaInfixKeyword display "\%(=\s*\)\@<!\<\%(in\|isa\)\>\S\@!\%(\s*=\)\@!"
|
syntax match juliaInfixKeyword display "\%(=\s*\)\@<!\<\%(in\|isa\)\>\S\@!\%(\s*=\)\@!"
|
||||||
|
|||||||
@@ -684,68 +684,68 @@ syn case match
|
|||||||
if version >= 704
|
if version >= 704
|
||||||
if b:php_version_id >= 70300
|
if b:php_version_id >= 70300
|
||||||
" @begin phpHereDoc
|
" @begin phpHereDoc
|
||||||
SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@3<=\z(\I\i*\)$" end="^\s*\z1\>" contained contains=@Spell,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
|
SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@3<=\s*\z(\I\i*\)$" end="^\s*\z1\>" contained contains=@Spell,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
|
||||||
SynFold syn region phpHereDoc matchgroup=Delimiter start=+\(<<<\)\@3<="\z(\I\i*\)"$+ end="^\s*\z1\>" contained contains=@Spell,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
|
SynFold syn region phpHereDoc matchgroup=Delimiter start=+\(<<<\)\@3<=\s*"\z(\I\i*\)"$+ end="^\s*\z1\>" contained contains=@Spell,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
|
||||||
" including HTML,JavaScript,SQL if enabled via options
|
" including HTML,JavaScript,SQL if enabled via options
|
||||||
if (exists("php_html_in_heredoc") && php_html_in_heredoc)
|
if (exists("php_html_in_heredoc") && php_html_in_heredoc)
|
||||||
SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@3<=\z(\(\I\i*\)\=\(html\)\c\(\i*\)\)$" end="^\s*\z1\>" contained contains=@htmlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
|
SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@3<=\s*\z(\(\I\i*\)\=\(html\)\c\(\i*\)\)$" end="^\s*\z1\>" contained contains=@htmlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
|
||||||
SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@3<=\z(\(\I\i*\)\=\(javascript\)\c\(\i*\)\)$" end="^\s*\z1\>" contained contains=@htmlJavascript,phpIdentifierSimply,phpIdentifier,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
|
SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@3<=\s*\z(\(\I\i*\)\=\(javascript\)\c\(\i*\)\)$" end="^\s*\z1\>" contained contains=@htmlJavascript,phpIdentifierSimply,phpIdentifier,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
|
||||||
endif
|
endif
|
||||||
if (exists("php_sql_heredoc") && php_sql_heredoc)
|
if (exists("php_sql_heredoc") && php_sql_heredoc)
|
||||||
SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@3<=\z(\(\I\i*\)\=\(sql\)\c\(\i*\)\)$" end="^\s*\z1\>" contained contains=@sqlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
|
SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@3<=\s*\z(\(\I\i*\)\=\(sql\)\c\(\i*\)\)$" end="^\s*\z1\>" contained contains=@sqlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
|
||||||
endif
|
endif
|
||||||
if (exists("php_xml_heredoc") && php_xml_heredoc)
|
if (exists("php_xml_heredoc") && php_xml_heredoc)
|
||||||
SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@3<=\z(\(\I\i*\)\=\(xml\)\c\(\i*\)\)$" end="^\s*\z1\>" contained contains=@xmlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
|
SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@3<=\s*\z(\(\I\i*\)\=\(xml\)\c\(\i*\)\)$" end="^\s*\z1\>" contained contains=@xmlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
|
||||||
endif
|
endif
|
||||||
" @end phpHereDoc
|
" @end phpHereDoc
|
||||||
else
|
else
|
||||||
" @begin phpHereDoc
|
" @begin phpHereDoc
|
||||||
SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@3<=\z(\I\i*\)$" end="^\z1\(;\=$\)\@=" contained contains=@Spell,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
|
SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@3<=\s*\z(\I\i*\)$" end="^\z1\(;\=$\)\@=" contained contains=@Spell,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
|
||||||
SynFold syn region phpHereDoc matchgroup=Delimiter start=+\(<<<\)\@3<="\z(\I\i*\)"$+ end="^\z1\(;\=$\)\@=" contained contains=@Spell,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
|
SynFold syn region phpHereDoc matchgroup=Delimiter start=+\(<<<\)\@3<=\s*"\z(\I\i*\)"$+ end="^\z1\(;\=$\)\@=" contained contains=@Spell,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
|
||||||
" including HTML,JavaScript,SQL if enabled via options
|
" including HTML,JavaScript,SQL if enabled via options
|
||||||
if (exists("php_html_in_heredoc") && php_html_in_heredoc)
|
if (exists("php_html_in_heredoc") && php_html_in_heredoc)
|
||||||
SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@3<=\z(\(\I\i*\)\=\(html\)\c\(\i*\)\)$" end="^\z1\(;\=$\)\@=" contained contains=@htmlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
|
SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@3<=\s*\z(\(\I\i*\)\=\(html\)\c\(\i*\)\)$" end="^\z1\(;\=$\)\@=" contained contains=@htmlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
|
||||||
SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@3<=\z(\(\I\i*\)\=\(javascript\)\c\(\i*\)\)$" end="^\z1\(;\=$\)\@=" contained contains=@htmlJavascript,phpIdentifierSimply,phpIdentifier,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
|
SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@3<=\s*\z(\(\I\i*\)\=\(javascript\)\c\(\i*\)\)$" end="^\z1\(;\=$\)\@=" contained contains=@htmlJavascript,phpIdentifierSimply,phpIdentifier,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
|
||||||
endif
|
endif
|
||||||
if (exists("php_sql_heredoc") && php_sql_heredoc)
|
if (exists("php_sql_heredoc") && php_sql_heredoc)
|
||||||
SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@3<=\z(\(\I\i*\)\=\(sql\)\c\(\i*\)\)$" end="^\z1\(;\=$\)\@=" contained contains=@sqlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
|
SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@3<=\s*\z(\(\I\i*\)\=\(sql\)\c\(\i*\)\)$" end="^\z1\(;\=$\)\@=" contained contains=@sqlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
|
||||||
endif
|
endif
|
||||||
if (exists("php_xml_heredoc") && php_xml_heredoc)
|
if (exists("php_xml_heredoc") && php_xml_heredoc)
|
||||||
SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@3<=\z(\(\I\i*\)\=\(xml\)\c\(\i*\)\)$" end="^\z1\(;\=$\)\@=" contained contains=@xmlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
|
SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@3<=\s*\z(\(\I\i*\)\=\(xml\)\c\(\i*\)\)$" end="^\z1\(;\=$\)\@=" contained contains=@xmlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
|
||||||
endif
|
endif
|
||||||
" @end phpHereDoc
|
" @end phpHereDoc
|
||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
if b:php_version_id >= 70300
|
if b:php_version_id >= 70300
|
||||||
" @copy phpHereDoc strip_maximum_size
|
" @copy phpHereDoc strip_maximum_size
|
||||||
SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\z(\I\i*\)$" end="^\s*\z1\>" contained contains=@Spell,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
|
SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\s*\z(\I\i*\)$" end="^\s*\z1\>" contained contains=@Spell,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
|
||||||
SynFold syn region phpHereDoc matchgroup=Delimiter start=+\(<<<\)\@<="\z(\I\i*\)"$+ end="^\s*\z1\>" contained contains=@Spell,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
|
SynFold syn region phpHereDoc matchgroup=Delimiter start=+\(<<<\)\@<=\s*"\z(\I\i*\)"$+ end="^\s*\z1\>" contained contains=@Spell,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
|
||||||
" including HTML,JavaScript,SQL if enabled via options
|
" including HTML,JavaScript,SQL if enabled via options
|
||||||
if (exists("php_html_in_heredoc") && php_html_in_heredoc)
|
if (exists("php_html_in_heredoc") && php_html_in_heredoc)
|
||||||
SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\z(\(\I\i*\)\=\(html\)\c\(\i*\)\)$" end="^\s*\z1\>" contained contains=@htmlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
|
SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\s*\z(\(\I\i*\)\=\(html\)\c\(\i*\)\)$" end="^\s*\z1\>" contained contains=@htmlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
|
||||||
SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\z(\(\I\i*\)\=\(javascript\)\c\(\i*\)\)$" end="^\s*\z1\>" contained contains=@htmlJavascript,phpIdentifierSimply,phpIdentifier,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
|
SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\s*\z(\(\I\i*\)\=\(javascript\)\c\(\i*\)\)$" end="^\s*\z1\>" contained contains=@htmlJavascript,phpIdentifierSimply,phpIdentifier,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
|
||||||
endif
|
endif
|
||||||
if (exists("php_sql_heredoc") && php_sql_heredoc)
|
if (exists("php_sql_heredoc") && php_sql_heredoc)
|
||||||
SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\z(\(\I\i*\)\=\(sql\)\c\(\i*\)\)$" end="^\s*\z1\>" contained contains=@sqlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
|
SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\s*\z(\(\I\i*\)\=\(sql\)\c\(\i*\)\)$" end="^\s*\z1\>" contained contains=@sqlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
|
||||||
endif
|
endif
|
||||||
if (exists("php_xml_heredoc") && php_xml_heredoc)
|
if (exists("php_xml_heredoc") && php_xml_heredoc)
|
||||||
SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\z(\(\I\i*\)\=\(xml\)\c\(\i*\)\)$" end="^\s*\z1\>" contained contains=@xmlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
|
SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\s*\z(\(\I\i*\)\=\(xml\)\c\(\i*\)\)$" end="^\s*\z1\>" contained contains=@xmlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
|
||||||
endif
|
endif
|
||||||
" @end phpHereDoc
|
" @end phpHereDoc
|
||||||
else
|
else
|
||||||
" @copy phpHereDoc strip_maximum_size
|
" @copy phpHereDoc strip_maximum_size
|
||||||
SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\z(\I\i*\)$" end="^\z1\(;\=$\)\@=" contained contains=@Spell,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
|
SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\s*\z(\I\i*\)$" end="^\z1\(;\=$\)\@=" contained contains=@Spell,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
|
||||||
SynFold syn region phpHereDoc matchgroup=Delimiter start=+\(<<<\)\@<="\z(\I\i*\)"$+ end="^\z1\(;\=$\)\@=" contained contains=@Spell,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
|
SynFold syn region phpHereDoc matchgroup=Delimiter start=+\(<<<\)\@<=\s*"\z(\I\i*\)"$+ end="^\z1\(;\=$\)\@=" contained contains=@Spell,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
|
||||||
" including HTML,JavaScript,SQL if enabled via options
|
" including HTML,JavaScript,SQL if enabled via options
|
||||||
if (exists("php_html_in_heredoc") && php_html_in_heredoc)
|
if (exists("php_html_in_heredoc") && php_html_in_heredoc)
|
||||||
SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\z(\(\I\i*\)\=\(html\)\c\(\i*\)\)$" end="^\z1\(;\=$\)\@=" contained contains=@htmlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
|
SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\s*\z(\(\I\i*\)\=\(html\)\c\(\i*\)\)$" end="^\z1\(;\=$\)\@=" contained contains=@htmlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
|
||||||
SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\z(\(\I\i*\)\=\(javascript\)\c\(\i*\)\)$" end="^\z1\(;\=$\)\@=" contained contains=@htmlJavascript,phpIdentifierSimply,phpIdentifier,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
|
SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\s*\z(\(\I\i*\)\=\(javascript\)\c\(\i*\)\)$" end="^\z1\(;\=$\)\@=" contained contains=@htmlJavascript,phpIdentifierSimply,phpIdentifier,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
|
||||||
endif
|
endif
|
||||||
if (exists("php_sql_heredoc") && php_sql_heredoc)
|
if (exists("php_sql_heredoc") && php_sql_heredoc)
|
||||||
SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\z(\(\I\i*\)\=\(sql\)\c\(\i*\)\)$" end="^\z1\(;\=$\)\@=" contained contains=@sqlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
|
SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\s*\z(\(\I\i*\)\=\(sql\)\c\(\i*\)\)$" end="^\z1\(;\=$\)\@=" contained contains=@sqlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
|
||||||
endif
|
endif
|
||||||
if (exists("php_xml_heredoc") && php_xml_heredoc)
|
if (exists("php_xml_heredoc") && php_xml_heredoc)
|
||||||
SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\z(\(\I\i*\)\=\(xml\)\c\(\i*\)\)$" end="^\z1\(;\=$\)\@=" contained contains=@xmlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
|
SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\s*\z(\(\I\i*\)\=\(xml\)\c\(\i*\)\)$" end="^\z1\(;\=$\)\@=" contained contains=@xmlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
|
||||||
endif
|
endif
|
||||||
" @end phpHereDoc
|
" @end phpHereDoc
|
||||||
endif
|
endif
|
||||||
@@ -755,66 +755,66 @@ endif
|
|||||||
if version >= 704
|
if version >= 704
|
||||||
if b:php_version_id >= 70300
|
if b:php_version_id >= 70300
|
||||||
" @begin phpNowDoc
|
" @begin phpNowDoc
|
||||||
SynFold syn region phpNowDoc matchgroup=Delimiter start=+\(<<<\)\@3<='\z(\I\i*\)'$+ end="^\s*\z1\>" contained keepend extend
|
SynFold syn region phpNowDoc matchgroup=Delimiter start=+\(<<<\)\@3<=\s*'\z(\I\i*\)'$+ end="^\s*\z1\>" contained keepend extend
|
||||||
" including HTML,JavaScript,SQL if enabled via options
|
" including HTML,JavaScript,SQL if enabled via options
|
||||||
if (exists("php_html_in_nowdoc") && php_html_in_nowdoc)
|
if (exists("php_html_in_nowdoc") && php_html_in_nowdoc)
|
||||||
SynFold syn region phpNowDoc matchgroup=Delimiter start=+\(<<<\)\@3<='\z(\(\I\i*\)\=\(html\)\c\(\i*\)\)'$+ end="^\s*\z1\>" contained contains=@htmlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
|
SynFold syn region phpNowDoc matchgroup=Delimiter start=+\(<<<\)\@3<=\s*'\z(\(\I\i*\)\=\(html\)\c\(\i*\)\)'$+ end="^\s*\z1\>" contained contains=@htmlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
|
||||||
SynFold syn region phpNowDoc matchgroup=Delimiter start=+\(<<<\)\@3<='\z(\(\I\i*\)\=\(javascript\)\c\(\i*\)\)'$+ end="^\s*\z1\>" contained contains=@htmlJavascript,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
|
SynFold syn region phpNowDoc matchgroup=Delimiter start=+\(<<<\)\@3<=\s*'\z(\(\I\i*\)\=\(javascript\)\c\(\i*\)\)'$+ end="^\s*\z1\>" contained contains=@htmlJavascript,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
|
||||||
endif
|
endif
|
||||||
if (exists("php_sql_nowdoc") && php_sql_nowdoc)
|
if (exists("php_sql_nowdoc") && php_sql_nowdoc)
|
||||||
SynFold syn region phpNowDoc matchgroup=Delimiter start=+\(<<<\)\@3<='\z(\(\I\i*\)\=\(sql\)\c\(\i*\)\)'$+ end="^\s*\z1\>" contained contains=@sqlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
|
SynFold syn region phpNowDoc matchgroup=Delimiter start=+\(<<<\)\@3<=\s*'\z(\(\I\i*\)\=\(sql\)\c\(\i*\)\)'$+ end="^\s*\z1\>" contained contains=@sqlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
|
||||||
endif
|
endif
|
||||||
if (exists("php_xml_nowdoc") && php_xml_nowdoc)
|
if (exists("php_xml_nowdoc") && php_xml_nowdoc)
|
||||||
SynFold syn region phpNowDoc matchgroup=Delimiter start=+\(<<<\)\@3<='\z(\(\I\i*\)\=\(xml\)\c\(\i*\)\)'$+ end="^\s*\z1\>" contained contains=@xmlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
|
SynFold syn region phpNowDoc matchgroup=Delimiter start=+\(<<<\)\@3<=\s*'\z(\(\I\i*\)\=\(xml\)\c\(\i*\)\)'$+ end="^\s*\z1\>" contained contains=@xmlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
|
||||||
endif
|
endif
|
||||||
" @end phpNowDoc
|
" @end phpNowDoc
|
||||||
else
|
else
|
||||||
" @begin phpNowDoc
|
" @begin phpNowDoc
|
||||||
SynFold syn region phpNowDoc matchgroup=Delimiter start=+\(<<<\)\@3<='\z(\I\i*\)'$+ end="^\z1\(;\=$\)\@=" contained keepend extend
|
SynFold syn region phpNowDoc matchgroup=Delimiter start=+\(<<<\)\@3<=\s*'\z(\I\i*\)'$+ end="^\z1\(;\=$\)\@=" contained keepend extend
|
||||||
" including HTML,JavaScript,SQL if enabled via options
|
" including HTML,JavaScript,SQL if enabled via options
|
||||||
if (exists("php_html_in_nowdoc") && php_html_in_nowdoc)
|
if (exists("php_html_in_nowdoc") && php_html_in_nowdoc)
|
||||||
SynFold syn region phpNowDoc matchgroup=Delimiter start=+\(<<<\)\@3<='\z(\(\I\i*\)\=\(html\)\c\(\i*\)\)'$+ end="^\z1\(;\=$\)\@=" contained contains=@htmlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
|
SynFold syn region phpNowDoc matchgroup=Delimiter start=+\(<<<\)\@3<=\s*'\z(\(\I\i*\)\=\(html\)\c\(\i*\)\)'$+ end="^\z1\(;\=$\)\@=" contained contains=@htmlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
|
||||||
SynFold syn region phpNowDoc matchgroup=Delimiter start=+\(<<<\)\@3<='\z(\(\I\i*\)\=\(javascript\)\c\(\i*\)\)'$+ end="^\z1\(;\=$\)\@=" contained contains=@htmlJavascript,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
|
SynFold syn region phpNowDoc matchgroup=Delimiter start=+\(<<<\)\@3<=\s*'\z(\(\I\i*\)\=\(javascript\)\c\(\i*\)\)'$+ end="^\z1\(;\=$\)\@=" contained contains=@htmlJavascript,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
|
||||||
endif
|
endif
|
||||||
if (exists("php_sql_nowdoc") && php_sql_nowdoc)
|
if (exists("php_sql_nowdoc") && php_sql_nowdoc)
|
||||||
SynFold syn region phpNowDoc matchgroup=Delimiter start=+\(<<<\)\@3<='\z(\(\I\i*\)\=\(sql\)\c\(\i*\)\)'$+ end="^\z1\(;\=$\)\@=" contained contains=@sqlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
|
SynFold syn region phpNowDoc matchgroup=Delimiter start=+\(<<<\)\@3<=\s*'\z(\(\I\i*\)\=\(sql\)\c\(\i*\)\)'$+ end="^\z1\(;\=$\)\@=" contained contains=@sqlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
|
||||||
endif
|
endif
|
||||||
if (exists("php_xml_nowdoc") && php_xml_nowdoc)
|
if (exists("php_xml_nowdoc") && php_xml_nowdoc)
|
||||||
SynFold syn region phpNowDoc matchgroup=Delimiter start=+\(<<<\)\@3<='\z(\(\I\i*\)\=\(xml\)\c\(\i*\)\)'$+ end="^\z1\(;\=$\)\@=" contained contains=@xmlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
|
SynFold syn region phpNowDoc matchgroup=Delimiter start=+\(<<<\)\@3<=\s*'\z(\(\I\i*\)\=\(xml\)\c\(\i*\)\)'$+ end="^\z1\(;\=$\)\@=" contained contains=@xmlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
|
||||||
endif
|
endif
|
||||||
" @end phpNowDoc
|
" @end phpNowDoc
|
||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
if b:php_version_id >= 70300
|
if b:php_version_id >= 70300
|
||||||
" @copy phpHereDoc strip_maximum_size
|
" @copy phpHereDoc strip_maximum_size
|
||||||
SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\z(\I\i*\)$" end="^\s*\z1\>" contained contains=@Spell,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
|
SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\s*\z(\I\i*\)$" end="^\s*\z1\>" contained contains=@Spell,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
|
||||||
SynFold syn region phpHereDoc matchgroup=Delimiter start=+\(<<<\)\@<="\z(\I\i*\)"$+ end="^\s*\z1\>" contained contains=@Spell,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
|
SynFold syn region phpHereDoc matchgroup=Delimiter start=+\(<<<\)\@<=\s*"\z(\I\i*\)"$+ end="^\s*\z1\>" contained contains=@Spell,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
|
||||||
" including HTML,JavaScript,SQL if enabled via options
|
" including HTML,JavaScript,SQL if enabled via options
|
||||||
if (exists("php_html_in_heredoc") && php_html_in_heredoc)
|
if (exists("php_html_in_heredoc") && php_html_in_heredoc)
|
||||||
SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\z(\(\I\i*\)\=\(html\)\c\(\i*\)\)$" end="^\s*\z1\>" contained contains=@htmlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
|
SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\s*\z(\(\I\i*\)\=\(html\)\c\(\i*\)\)$" end="^\s*\z1\>" contained contains=@htmlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
|
||||||
SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\z(\(\I\i*\)\=\(javascript\)\c\(\i*\)\)$" end="^\s*\z1\>" contained contains=@htmlJavascript,phpIdentifierSimply,phpIdentifier,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
|
SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\s*\z(\(\I\i*\)\=\(javascript\)\c\(\i*\)\)$" end="^\s*\z1\>" contained contains=@htmlJavascript,phpIdentifierSimply,phpIdentifier,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
|
||||||
endif
|
endif
|
||||||
if (exists("php_sql_heredoc") && php_sql_heredoc)
|
if (exists("php_sql_heredoc") && php_sql_heredoc)
|
||||||
SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\z(\(\I\i*\)\=\(sql\)\c\(\i*\)\)$" end="^\s*\z1\>" contained contains=@sqlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
|
SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\s*\z(\(\I\i*\)\=\(sql\)\c\(\i*\)\)$" end="^\s*\z1\>" contained contains=@sqlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
|
||||||
endif
|
endif
|
||||||
if (exists("php_xml_heredoc") && php_xml_heredoc)
|
if (exists("php_xml_heredoc") && php_xml_heredoc)
|
||||||
SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\z(\(\I\i*\)\=\(xml\)\c\(\i*\)\)$" end="^\s*\z1\>" contained contains=@xmlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
|
SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\s*\z(\(\I\i*\)\=\(xml\)\c\(\i*\)\)$" end="^\s*\z1\>" contained contains=@xmlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
|
||||||
endif
|
endif
|
||||||
" @end phpNowDoc
|
" @end phpNowDoc
|
||||||
else
|
else
|
||||||
" @copy phpHereDoc strip_maximum_size
|
" @copy phpHereDoc strip_maximum_size
|
||||||
SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\z(\I\i*\)$" end="^\z1\(;\=$\)\@=" contained contains=@Spell,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
|
SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\s*\z(\I\i*\)$" end="^\z1\(;\=$\)\@=" contained contains=@Spell,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
|
||||||
SynFold syn region phpHereDoc matchgroup=Delimiter start=+\(<<<\)\@<="\z(\I\i*\)"$+ end="^\z1\(;\=$\)\@=" contained contains=@Spell,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
|
SynFold syn region phpHereDoc matchgroup=Delimiter start=+\(<<<\)\@<=\s*"\z(\I\i*\)"$+ end="^\z1\(;\=$\)\@=" contained contains=@Spell,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
|
||||||
" including HTML,JavaScript,SQL if enabled via options
|
" including HTML,JavaScript,SQL if enabled via options
|
||||||
if (exists("php_html_in_heredoc") && php_html_in_heredoc)
|
if (exists("php_html_in_heredoc") && php_html_in_heredoc)
|
||||||
SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\z(\(\I\i*\)\=\(html\)\c\(\i*\)\)$" end="^\z1\(;\=$\)\@=" contained contains=@htmlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
|
SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\s*\z(\(\I\i*\)\=\(html\)\c\(\i*\)\)$" end="^\z1\(;\=$\)\@=" contained contains=@htmlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
|
||||||
SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\z(\(\I\i*\)\=\(javascript\)\c\(\i*\)\)$" end="^\z1\(;\=$\)\@=" contained contains=@htmlJavascript,phpIdentifierSimply,phpIdentifier,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
|
SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\s*\z(\(\I\i*\)\=\(javascript\)\c\(\i*\)\)$" end="^\z1\(;\=$\)\@=" contained contains=@htmlJavascript,phpIdentifierSimply,phpIdentifier,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
|
||||||
endif
|
endif
|
||||||
if (exists("php_sql_heredoc") && php_sql_heredoc)
|
if (exists("php_sql_heredoc") && php_sql_heredoc)
|
||||||
SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\z(\(\I\i*\)\=\(sql\)\c\(\i*\)\)$" end="^\z1\(;\=$\)\@=" contained contains=@sqlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
|
SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\s*\z(\(\I\i*\)\=\(sql\)\c\(\i*\)\)$" end="^\z1\(;\=$\)\@=" contained contains=@sqlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
|
||||||
endif
|
endif
|
||||||
if (exists("php_xml_heredoc") && php_xml_heredoc)
|
if (exists("php_xml_heredoc") && php_xml_heredoc)
|
||||||
SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\z(\(\I\i*\)\=\(xml\)\c\(\i*\)\)$" end="^\z1\(;\=$\)\@=" contained contains=@xmlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
|
SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\s*\z(\(\I\i*\)\=\(xml\)\c\(\i*\)\)$" end="^\z1\(;\=$\)\@=" contained contains=@xmlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
|
||||||
endif
|
endif
|
||||||
" @end phpNowDoc
|
" @end phpNowDoc
|
||||||
endif
|
endif
|
||||||
|
|||||||
60
syntax/sh.vim
Normal file
60
syntax/sh.vim
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'sh') == -1
|
||||||
|
|
||||||
|
" Shebang
|
||||||
|
syn match shShebang "^#!.*$" containedin=shComment
|
||||||
|
|
||||||
|
" Operators
|
||||||
|
syn match shOperator '||'
|
||||||
|
syn match shOperator '&&'
|
||||||
|
|
||||||
|
" Match semicolons as Delimiter rather than Operator
|
||||||
|
syn match shSemicolon ';' containedin=shOperator,zshOperator
|
||||||
|
|
||||||
|
" Highlight braces, brackets and parens as Delimiters in zsh
|
||||||
|
syn match zshDelim '\v(\(|\))' containedin=zshParentheses
|
||||||
|
syn match zshDelim '\v(\{|\})' containedin=zshBraces
|
||||||
|
syn match zshDelim '\v(\[|\])' containedin=zshParentheses
|
||||||
|
|
||||||
|
" Match command flags in zsh
|
||||||
|
syn match zshFlag "\v<-\w+" containedin=zshBrackets,zshParentheses
|
||||||
|
|
||||||
|
" Special files as Constants
|
||||||
|
syn match Constant "\v/dev/\w+"
|
||||||
|
\ containedin=shFunctionOne,shIf,shCmdParenRegion,shCommandSub
|
||||||
|
|
||||||
|
" Common commands
|
||||||
|
let commands = [ 'arch', 'awk', 'b2sum', 'base32', 'base64', 'basename', 'basenc', 'bash', 'brew', 'cat', 'chcon', 'chgrp', 'chown', 'chroot', 'cksum', 'comm', 'cp', 'csplit', 'curl', 'cut', 'date', 'dd', 'defaults', 'df', 'dir', 'dircolors', 'dirname', 'ed', 'env', 'expand', 'factor', 'fmt', 'fold', 'git', 'grep', 'groups', 'head', 'hexdump', 'hostid', 'hostname', 'hugo', 'id', 'install', 'join', 'killall', 'link', 'ln', 'logname', 'md5sum', 'mkdir', 'mkfifo', 'mknod', 'mktemp', 'nice', 'nl', 'nohup', 'npm', 'nproc', 'numfmt', 'od', 'open', 'paste', 'pathchk', 'pr', 'printenv', 'printf', 'ptx', 'readlink', 'realpath', 'rg', 'runcon', 'scutil', 'sed', 'seq', 'sha1sum', 'sha2', 'shred', 'shuf', 'split', 'stat', 'stdbuf', 'stty', 'sudo', 'sum', 'sync', 'tac', 'tee', 'terminfo', 'timeout', 'tmux', 'top', 'touch', 'tput', 'tr', 'truncate', 'tsort', 'tty', 'uname', 'unexpand', 'uniq', 'unlink', 'uptime', 'users', 'vdir', 'vim', 'wc', 'who', 'whoami', 'yabai', 'yes' ]
|
||||||
|
|
||||||
|
for i in commands
|
||||||
|
execute 'syn match shStatement "\v(\w|-)@<!'
|
||||||
|
\ . i
|
||||||
|
\ . '(\w|-)@!" containedin=shFunctionOne,shIf,shCmdParenRegion,shCommandSub,zshBrackets'
|
||||||
|
endfor
|
||||||
|
|
||||||
|
" Fix default highlighting groups
|
||||||
|
hi def link bashSpecialVariables Identifier
|
||||||
|
hi def link shCmdSubRegion Delimiter
|
||||||
|
hi def link shDerefSimple Identifier
|
||||||
|
hi def link shFor Identifier
|
||||||
|
hi def link shFunctionKey Statement
|
||||||
|
hi def link shQuote StringDelimiter
|
||||||
|
hi def link shRange Delimiter
|
||||||
|
hi def link shSnglCase Delimiter
|
||||||
|
hi def link shStatement Statement
|
||||||
|
hi def link shTestOpr Operator
|
||||||
|
hi def link shVarAssign Operator
|
||||||
|
hi def link zshDeref Identifier
|
||||||
|
hi def link zshFunction Function
|
||||||
|
hi def link zshOperator Operator
|
||||||
|
hi def link zshStringDelimiter StringDelimiter
|
||||||
|
hi def link zshSubst Identifier
|
||||||
|
hi def link zshSubstDelim Delimiter
|
||||||
|
hi def link zshVariableDef Identifier
|
||||||
|
|
||||||
|
" Link custom groups
|
||||||
|
hi def link shSemicolon Delimiter
|
||||||
|
hi def link shShebang PreProc
|
||||||
|
hi def link zshDelim Delimiter
|
||||||
|
hi def link zshFlag Special
|
||||||
|
|
||||||
|
endif
|
||||||
@@ -73,6 +73,7 @@ syn region slimJavascriptFilter matchgroup=slimFilter start="^\z(\s*\)javascript
|
|||||||
syn region slimCoffeeFilter matchgroup=slimFilter start="^\z(\s*\)coffee:\s*$" end="^\%(\z1 \| *$\)\@!" contains=@coffeeAll,slimInterpolation keepend
|
syn region slimCoffeeFilter matchgroup=slimFilter start="^\z(\s*\)coffee:\s*$" end="^\%(\z1 \| *$\)\@!" contains=@coffeeAll,slimInterpolation keepend
|
||||||
syn region slimCSSFilter matchgroup=slimFilter start="^\z(\s*\)css:\s*$" end="^\%(\z1 \| *$\)\@!" contains=@htmlCss,slimInterpolation keepend
|
syn region slimCSSFilter matchgroup=slimFilter start="^\z(\s*\)css:\s*$" end="^\%(\z1 \| *$\)\@!" contains=@htmlCss,slimInterpolation keepend
|
||||||
syn region slimSassFilter matchgroup=slimFilter start="^\z(\s*\)sass:\s*$" end="^\%(\z1 \| *$\)\@!" contains=@hamlSassTop
|
syn region slimSassFilter matchgroup=slimFilter start="^\z(\s*\)sass:\s*$" end="^\%(\z1 \| *$\)\@!" contains=@hamlSassTop
|
||||||
|
syn region slimRubyFilter matchgroup=slimFilter start="^\z(\s*\)ruby:\s*$" end="^\%(\z1 \| *$\)\@!" contains=@slimRubyTop keepend
|
||||||
|
|
||||||
syn region slimRuby matchgroup=slimRubyOutputChar start="\s*[=]\==[']\=" skip="\%\(,\s*\|\\\)$" end="$" contained contains=@slimRubyTop keepend
|
syn region slimRuby matchgroup=slimRubyOutputChar start="\s*[=]\==[']\=" skip="\%\(,\s*\|\\\)$" end="$" contained contains=@slimRubyTop keepend
|
||||||
syn region slimRuby matchgroup=slimRubyChar start="\s*-" skip="\%\(,\s*\|\\\)$" end="$" contained contains=@slimRubyTop keepend
|
syn region slimRuby matchgroup=slimRubyChar start="\s*-" skip="\%\(,\s*\|\\\)$" end="$" contained contains=@slimRubyTop keepend
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'vifm') == -1
|
|||||||
|
|
||||||
" vifm syntax file
|
" vifm syntax file
|
||||||
" Maintainer: xaizek <xaizek@posteo.net>
|
" Maintainer: xaizek <xaizek@posteo.net>
|
||||||
" Last Change: May 17, 2020
|
" Last Change: May 26, 2020
|
||||||
" Inspired By: Vim syntax file by Dr. Charles E. Campbell, Jr.
|
" Inspired By: Vim syntax file by Dr. Charles E. Campbell, Jr.
|
||||||
|
|
||||||
if exists('b:current_syntax')
|
if exists('b:current_syntax')
|
||||||
@@ -89,7 +89,7 @@ syntax case ignore
|
|||||||
syntax keyword vifmHiGroups contained WildMenu Border Win CmdLine CurrLine
|
syntax keyword vifmHiGroups contained WildMenu Border Win CmdLine CurrLine
|
||||||
\ OtherLine Directory Link Socket Device Executable Selected BrokenLink
|
\ OtherLine Directory Link Socket Device Executable Selected BrokenLink
|
||||||
\ TopLine TopLineSel StatusLine JobLine SuggestBox Fifo ErrorMsg CmpMismatch
|
\ TopLine TopLineSel StatusLine JobLine SuggestBox Fifo ErrorMsg CmpMismatch
|
||||||
\ AuxWin OtherWin TabLine TabLineSel
|
\ AuxWin OtherWin TabLine TabLineSel HardLink
|
||||||
\ User1 User2 User3 User4 User5 User6 User7 User8 User9
|
\ User1 User2 User3 User4 User5 User6 User7 User8 User9
|
||||||
syntax keyword vifmHiStyles contained
|
syntax keyword vifmHiStyles contained
|
||||||
\ bold underline reverse inverse standout italic none
|
\ bold underline reverse inverse standout italic none
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ let b:current_syntax = "zig"
|
|||||||
|
|
||||||
syn keyword zigStorage const var extern packed export pub noalias inline noinline comptime callconv volatile allowzero align linksection threadlocal
|
syn keyword zigStorage const var extern packed export pub noalias inline noinline comptime callconv volatile allowzero align linksection threadlocal
|
||||||
syn keyword zigStructure struct enum union error
|
syn keyword zigStructure struct enum union error
|
||||||
syn keyword zigStatement break return continue asm defer errdefer unreachable try catch async noasync await suspend resume
|
syn keyword zigStatement break return continue asm defer errdefer unreachable try catch async nosuspend await suspend resume
|
||||||
syn keyword zigConditional if else switch and or orelse
|
syn keyword zigConditional if else switch and or orelse
|
||||||
syn keyword zigRepeat while for
|
syn keyword zigRepeat while for
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ syn region zirCommentLine start=";" end="$" contains=zirTodo,@Spell
|
|||||||
|
|
||||||
syn region zirBlock start="{" end="}" transparent fold
|
syn region zirBlock start="{" end="}" transparent fold
|
||||||
|
|
||||||
syn keyword zirKeyword primitive fntype int str as ptrtoint fieldptr deref asm unreachable export ref
|
syn keyword zirKeyword primitive fntype int str as ptrtoint fieldptr deref asm unreachable export ref fn
|
||||||
|
|
||||||
syn keyword zirTodo contained TODO
|
syn keyword zirTodo contained TODO
|
||||||
|
|
||||||
|
|||||||
60
syntax/zsh.vim
Normal file
60
syntax/zsh.vim
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'sh') == -1
|
||||||
|
|
||||||
|
" Shebang
|
||||||
|
syn match shShebang "^#!.*$" containedin=shComment
|
||||||
|
|
||||||
|
" Operators
|
||||||
|
syn match shOperator '||'
|
||||||
|
syn match shOperator '&&'
|
||||||
|
|
||||||
|
" Match semicolons as Delimiter rather than Operator
|
||||||
|
syn match shSemicolon ';' containedin=shOperator,zshOperator
|
||||||
|
|
||||||
|
" Highlight braces, brackets and parens as Delimiters in zsh
|
||||||
|
syn match zshDelim '\v(\(|\))' containedin=zshParentheses
|
||||||
|
syn match zshDelim '\v(\{|\})' containedin=zshBraces
|
||||||
|
syn match zshDelim '\v(\[|\])' containedin=zshParentheses
|
||||||
|
|
||||||
|
" Match command flags in zsh
|
||||||
|
syn match zshFlag "\v<-\w+" containedin=zshBrackets,zshParentheses
|
||||||
|
|
||||||
|
" Special files as Constants
|
||||||
|
syn match Constant "\v/dev/\w+"
|
||||||
|
\ containedin=shFunctionOne,shIf,shCmdParenRegion,shCommandSub
|
||||||
|
|
||||||
|
" Common commands
|
||||||
|
let commands = [ 'arch', 'awk', 'b2sum', 'base32', 'base64', 'basename', 'basenc', 'bash', 'brew', 'cat', 'chcon', 'chgrp', 'chown', 'chroot', 'cksum', 'comm', 'cp', 'csplit', 'curl', 'cut', 'date', 'dd', 'defaults', 'df', 'dir', 'dircolors', 'dirname', 'ed', 'env', 'expand', 'factor', 'fmt', 'fold', 'git', 'grep', 'groups', 'head', 'hexdump', 'hostid', 'hostname', 'hugo', 'id', 'install', 'join', 'killall', 'link', 'ln', 'logname', 'md5sum', 'mkdir', 'mkfifo', 'mknod', 'mktemp', 'nice', 'nl', 'nohup', 'npm', 'nproc', 'numfmt', 'od', 'open', 'paste', 'pathchk', 'pr', 'printenv', 'printf', 'ptx', 'readlink', 'realpath', 'rg', 'runcon', 'scutil', 'sed', 'seq', 'sha1sum', 'sha2', 'shred', 'shuf', 'split', 'stat', 'stdbuf', 'stty', 'sudo', 'sum', 'sync', 'tac', 'tee', 'terminfo', 'timeout', 'tmux', 'top', 'touch', 'tput', 'tr', 'truncate', 'tsort', 'tty', 'uname', 'unexpand', 'uniq', 'unlink', 'uptime', 'users', 'vdir', 'vim', 'wc', 'who', 'whoami', 'yabai', 'yes' ]
|
||||||
|
|
||||||
|
for i in commands
|
||||||
|
execute 'syn match shStatement "\v(\w|-)@<!'
|
||||||
|
\ . i
|
||||||
|
\ . '(\w|-)@!" containedin=shFunctionOne,shIf,shCmdParenRegion,shCommandSub,zshBrackets'
|
||||||
|
endfor
|
||||||
|
|
||||||
|
" Fix default highlighting groups
|
||||||
|
hi def link bashSpecialVariables Identifier
|
||||||
|
hi def link shCmdSubRegion Delimiter
|
||||||
|
hi def link shDerefSimple Identifier
|
||||||
|
hi def link shFor Identifier
|
||||||
|
hi def link shFunctionKey Statement
|
||||||
|
hi def link shQuote StringDelimiter
|
||||||
|
hi def link shRange Delimiter
|
||||||
|
hi def link shSnglCase Delimiter
|
||||||
|
hi def link shStatement Statement
|
||||||
|
hi def link shTestOpr Operator
|
||||||
|
hi def link shVarAssign Operator
|
||||||
|
hi def link zshDeref Identifier
|
||||||
|
hi def link zshFunction Function
|
||||||
|
hi def link zshOperator Operator
|
||||||
|
hi def link zshStringDelimiter StringDelimiter
|
||||||
|
hi def link zshSubst Identifier
|
||||||
|
hi def link zshSubstDelim Delimiter
|
||||||
|
hi def link zshVariableDef Identifier
|
||||||
|
|
||||||
|
" Link custom groups
|
||||||
|
hi def link shSemicolon Delimiter
|
||||||
|
hi def link shShebang PreProc
|
||||||
|
hi def link zshDelim Delimiter
|
||||||
|
hi def link zshFlag Special
|
||||||
|
|
||||||
|
endif
|
||||||
19
test
Executable file
19
test
Executable file
@@ -0,0 +1,19 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
vim -N --startuptime /dev/stdout -u <(
|
||||||
|
echo "filetype plugin indent on"
|
||||||
|
echo "syntax enable"
|
||||||
|
echo "let &rtp='$PWD,'.&rtp"
|
||||||
|
cat ftdetect/polyglot.vim | grep -E 'set ft=[a-z-]+' -o | sort | uniq | awk -F '=' '{ print $2 }' | while read ft; do
|
||||||
|
echo "try"
|
||||||
|
echo " enew"
|
||||||
|
echo " set ft=$ft"
|
||||||
|
echo "catch"
|
||||||
|
echo " echo v:exception"
|
||||||
|
echo " exec ':cq!'"
|
||||||
|
echo "endtry"
|
||||||
|
done
|
||||||
|
echo "exec ':q!'"
|
||||||
|
)
|
||||||
Reference in New Issue
Block a user