mirror of
https://github.com/sheerun/vim-polyglot.git
synced 2025-11-10 12:33:51 -05:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a39c9013cc | ||
|
|
25d2786cae |
@@ -38,7 +38,7 @@ Optionally download one of the [releases](https://github.com/sheerun/vim-polyglo
|
|||||||
- [elixir](https://github.com/elixir-lang/vim-elixir) (syntax, indent, compiler, ftplugin, ftdetect)
|
- [elixir](https://github.com/elixir-lang/vim-elixir) (syntax, indent, compiler, ftplugin, ftdetect)
|
||||||
- [emberscript](https://github.com/heartsentwined/vim-ember-script) (syntax, indent, ftplugin, ftdetect)
|
- [emberscript](https://github.com/heartsentwined/vim-ember-script) (syntax, indent, ftplugin, ftdetect)
|
||||||
- [emblem](https://github.com/heartsentwined/vim-emblem) (syntax, indent, ftplugin, ftdetect)
|
- [emblem](https://github.com/heartsentwined/vim-emblem) (syntax, indent, ftplugin, ftdetect)
|
||||||
- [erlang](https://github.com/hcs42/vim-erlang-runtime) (syntax, indent)
|
- [erlang](https://github.com/vim-erlang/vim-erlang-runtime) (syntax, indent, ftdetect)
|
||||||
- [git](https://github.com/tpope/vim-git) (syntax, indent, ftplugin, ftdetect)
|
- [git](https://github.com/tpope/vim-git) (syntax, indent, ftplugin, ftdetect)
|
||||||
- [glsl](https://github.com/tikhomirov/vim-glsl) (syntax, indent, ftdetect)
|
- [glsl](https://github.com/tikhomirov/vim-glsl) (syntax, indent, ftdetect)
|
||||||
- [go](https://github.com/fatih/vim-go) (syntax, indent, ftdetect)
|
- [go](https://github.com/fatih/vim-go) (syntax, indent, ftdetect)
|
||||||
|
|||||||
2
build
2
build
@@ -109,7 +109,7 @@ PACKS="
|
|||||||
elixir:elixir-lang/vim-elixir
|
elixir:elixir-lang/vim-elixir
|
||||||
emberscript:heartsentwined/vim-ember-script
|
emberscript:heartsentwined/vim-ember-script
|
||||||
emblem:heartsentwined/vim-emblem
|
emblem:heartsentwined/vim-emblem
|
||||||
erlang:hcs42/vim-erlang-runtime
|
erlang:vim-erlang/vim-erlang-runtime
|
||||||
git:tpope/vim-git
|
git:tpope/vim-git
|
||||||
glsl:tikhomirov/vim-glsl
|
glsl:tikhomirov/vim-glsl
|
||||||
go:fatih/vim-go:_BASIC
|
go:fatih/vim-go:_BASIC
|
||||||
|
|||||||
@@ -64,6 +64,10 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'emblem') == -1
|
|||||||
autocmd BufNewFile,BufRead *.emblem set filetype=emblem
|
autocmd BufNewFile,BufRead *.emblem set filetype=emblem
|
||||||
autocmd FileType emblem set tabstop=2|set shiftwidth=2|set expandtab
|
autocmd FileType emblem set tabstop=2|set shiftwidth=2|set expandtab
|
||||||
endif
|
endif
|
||||||
|
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'erlang') == -1
|
||||||
|
|
||||||
|
au BufNewFile,BufRead *.erl,*.hrl,rebar.config,*.app,*.app.src,*.yaws,*.xrl set ft=erlang
|
||||||
|
endif
|
||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'git') == -1
|
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'git') == -1
|
||||||
|
|
||||||
autocmd BufNewFile,BufRead *.git/{,modules/**/,worktrees/*/}{COMMIT_EDIT,TAG_EDIT,MERGE_,}MSG set ft=gitcommit
|
autocmd BufNewFile,BufRead *.git/{,modules/**/,worktrees/*/}{COMMIT_EDIT,TAG_EDIT,MERGE_,}MSG set ft=gitcommit
|
||||||
|
|||||||
@@ -138,7 +138,7 @@ if exists('s:ruby_paths') && stridx(&l:tags, join(map(copy(s:ruby_paths),'v:val.
|
|||||||
let &l:tags = &tags . ',' . join(map(copy(s:ruby_paths),'v:val."/tags"'),',')
|
let &l:tags = &tags . ',' . join(map(copy(s:ruby_paths),'v:val."/tags"'),',')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if has("gui_win32") && !exists("b:browsefilter")
|
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
|
||||||
let b:browsefilter = "Ruby Source Files (*.rb)\t*.rb\n" .
|
let b:browsefilter = "Ruby Source Files (*.rb)\t*.rb\n" .
|
||||||
\ "All Files (*.*)\t*.*\n"
|
\ "All Files (*.*)\t*.*\n"
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ syn cluster rubyExtendedStringSpecial contains=@rubyStringSpecial,rubyNestedPare
|
|||||||
syn cluster rubyRegexpSpecial contains=rubyInterpolation,rubyNoInterpolation,rubyStringEscape,rubyRegexpSpecial,rubyRegexpEscape,rubyRegexpBrackets,rubyRegexpCharClass,rubyRegexpDot,rubyRegexpQuantifier,rubyRegexpAnchor,rubyRegexpParens,rubyRegexpComment
|
syn cluster rubyRegexpSpecial contains=rubyInterpolation,rubyNoInterpolation,rubyStringEscape,rubyRegexpSpecial,rubyRegexpEscape,rubyRegexpBrackets,rubyRegexpCharClass,rubyRegexpDot,rubyRegexpQuantifier,rubyRegexpAnchor,rubyRegexpParens,rubyRegexpComment
|
||||||
|
|
||||||
" Numbers and ASCII Codes
|
" Numbers and ASCII Codes
|
||||||
syn match rubyASCIICode "\%(\w\|[]})\"'/]\)\@<!\%(?\%(\\M-\\C-\|\\C-\\M-\|\\M-\\c\|\\c\\M-\|\\c\|\\C-\|\\M-\)\=\%(\\\o\{1,3}\|\\x\x\{1,2}\|\\\=\S\)\)"
|
syn match rubyASCIICode "\%(\w\|[]})\"'/\.]\)\@<!\%(?\%(\\M-\\C-\|\\C-\\M-\|\\M-\\c\|\\c\\M-\|\\c\|\\C-\|\\M-\)\=\%(\\\o\{1,3}\|\\x\x\{1,2}\|\\\=\S\)\)"
|
||||||
syn match rubyInteger "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<0[xX]\x\+\%(_\x\+\)*\>" display
|
syn match rubyInteger "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<0[xX]\x\+\%(_\x\+\)*\>" display
|
||||||
syn match rubyInteger "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<\%(0[dD]\)\=\%(0\|[1-9]\d*\%(_\d\+\)*\)\>" display
|
syn match rubyInteger "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<\%(0[dD]\)\=\%(0\|[1-9]\d*\%(_\d\+\)*\)\>" display
|
||||||
syn match rubyInteger "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<0[oO]\=\o\+\%(_\o\+\)*\>" display
|
syn match rubyInteger "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<0[oO]\=\o\+\%(_\o\+\)*\>" display
|
||||||
@@ -131,14 +131,12 @@ syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r<" end=">[iomx
|
|||||||
syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r\[" end="\][iomxneus]*" skip="\\\\\|\\\]" contains=@rubyRegexpSpecial fold
|
syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r\[" end="\][iomxneus]*" skip="\\\\\|\\\]" contains=@rubyRegexpSpecial fold
|
||||||
syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r(" end=")[iomxneus]*" skip="\\\\\|\\)" contains=@rubyRegexpSpecial fold
|
syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r(" end=")[iomxneus]*" skip="\\\\\|\\)" contains=@rubyRegexpSpecial fold
|
||||||
|
|
||||||
" Normal String and Shell Command Output
|
" Normal String
|
||||||
if exists('ruby_spellcheck_strings')
|
let s:spell_cluster = exists('ruby_spellcheck_strings') ? ',@Spell' : ''
|
||||||
syn region rubyString matchgroup=rubyStringDelimiter start="\"" end="\"" skip="\\\\\|\\\"" contains=@rubyStringSpecial,@Spell fold
|
exe 'syn region rubyString matchgroup=rubyStringDelimiter start="\"" end="\"" skip="\\\\\|\\\"" fold contains=@rubyStringSpecial' . s:spell_cluster
|
||||||
syn region rubyString matchgroup=rubyStringDelimiter start="'" end="'" skip="\\\\\|\\'" contains=rubyQuoteEscape,@Spell fold
|
exe 'syn region rubyString matchgroup=rubyStringDelimiter start="''" end="''" skip="\\\\\|\\''" fold contains=rubyQuoteEscape' . s:spell_cluster
|
||||||
else
|
|
||||||
syn region rubyString matchgroup=rubyStringDelimiter start="\"" end="\"" skip="\\\\\|\\\"" contains=@rubyStringSpecial fold
|
" Shell Command Output
|
||||||
syn region rubyString matchgroup=rubyStringDelimiter start="'" end="'" skip="\\\\\|\\'" contains=rubyQuoteEscape fold
|
|
||||||
endif
|
|
||||||
syn region rubyString matchgroup=rubyStringDelimiter start="`" end="`" skip="\\\\\|\\`" contains=@rubyStringSpecial fold
|
syn region rubyString matchgroup=rubyStringDelimiter start="`" end="`" skip="\\\\\|\\`" contains=@rubyStringSpecial fold
|
||||||
|
|
||||||
" Generalized Single Quoted String, Symbol and Array of Strings
|
" Generalized Single Quoted String, Symbol and Array of Strings
|
||||||
|
|||||||
Reference in New Issue
Block a user