mirror of
1
0
Fork 0

Updated plugins

This commit is contained in:
amix 2016-07-03 13:53:59 +02:00
parent b50cc96113
commit d4db542a34
19 changed files with 273 additions and 171 deletions

View File

@ -59,6 +59,7 @@ let s:types = {
\ 'erlang' : '%serlang%serlang%sdrmf', \ 'erlang' : '%serlang%serlang%sdrmf',
\ 'expect' : '%stcl%stcl%scfp', \ 'expect' : '%stcl%stcl%scfp',
\ 'fortran': '%sfortran%sfortran%spbceiklmntvfs', \ 'fortran': '%sfortran%sfortran%spbceiklmntvfs',
\ 'go' : '%sgo%sgo%sfctv',
\ 'html' : '%shtml%shtml%saf', \ 'html' : '%shtml%shtml%saf',
\ 'java' : '%sjava%sjava%spcifm', \ 'java' : '%sjava%sjava%spcifm',
\ 'javascript': '%sjavascript%sjavascript%sf', \ 'javascript': '%sjavascript%sjavascript%sf',

View File

@ -4398,9 +4398,9 @@ The following checkers are available for Python (filetype "python"):
1. flake8...................|syntastic-python-flake8| 1. flake8...................|syntastic-python-flake8|
2. Frosted..................|syntastic-python-frosted| 2. Frosted..................|syntastic-python-frosted|
3. mypy.....................|syntastic-python-mypy| 3. mypy.....................|syntastic-python-mypy|
4. pep8.....................|syntastic-python-pep8| 4. Prospector...............|syntastic-python-prospector|
5. Prospector...............|syntastic-python-prospector| 5. py3kwarn.................|syntastic-python-py3kwarn|
6. py3kwarn.................|syntastic-python-py3kwarn| 6. pycodestyle..............|syntastic-python-pycodestyle|
7. pydocstyle...............|syntastic-python-pydocstyle| 7. pydocstyle...............|syntastic-python-pydocstyle|
8. Pyflakes.................|syntastic-python-pyflakes| 8. Pyflakes.................|syntastic-python-pyflakes|
9. Pylama...................|syntastic-python-pylama| 9. Pylama...................|syntastic-python-pylama|
@ -4460,24 +4460,7 @@ This checker is initialised using the "makeprgBuild()" function and thus it
accepts the standard options described at |syntastic-config-makeprg|. accepts the standard options described at |syntastic-config-makeprg|.
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
4. pep8 *syntastic-python-pep8* 4. Prospector *syntastic-python-prospector*
Name: pep8
Maintainer: LCD 47 <lcd047@gmail.com>
"Pep8" is a style checker for Python, derived from the conventions in PEP 8
(http://www.python.org/dev/peps/pep-0008/). See the project's page for
details:
https://github.com/jcrocholl/pep8
Checker options~
This checker is initialised using the "makeprgBuild()" function and thus it
accepts the standard options described at |syntastic-config-makeprg|.
------------------------------------------------------------------------------
5. Prospector *syntastic-python-prospector*
Name: prospector Name: prospector
Maintainer: LCD 47 <lcd047@gmail.com> Maintainer: LCD 47 <lcd047@gmail.com>
@ -4500,7 +4483,7 @@ This checker is initialised using the "makeprgBuild()" function and thus it
accepts the standard options described at |syntastic-config-makeprg|. accepts the standard options described at |syntastic-config-makeprg|.
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
6. py3kwarn *syntastic-python-py3kwarn* 5. py3kwarn *syntastic-python-py3kwarn*
Name: py3kwarn Name: py3kwarn
Author: Liam Curry <liam@curry.name> Author: Liam Curry <liam@curry.name>
@ -4515,6 +4498,23 @@ Checker options~
This checker is initialised using the "makeprgBuild()" function and thus it This checker is initialised using the "makeprgBuild()" function and thus it
accepts the standard options described at |syntastic-config-makeprg|. accepts the standard options described at |syntastic-config-makeprg|.
------------------------------------------------------------------------------
6. pycodestyle *syntastic-python-pycodestyle*
Name: pycodestyle
Maintainer: LCD 47 <lcd047@gmail.com>
"pycodestyle" (formerly "pep8") is a style checker for Python, derived from
the conventions in PEP 8 (http://www.python.org/dev/peps/pep-0008/). See the
project's page for details:
https://github.com/PyCQA/pycodestyle
Checker options~
This checker is initialised using the "makeprgBuild()" function and thus it
accepts the standard options described at |syntastic-config-makeprg|.
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
7. pydocstyle *syntastic-python-pydocstyle* 7. pydocstyle *syntastic-python-pydocstyle*

View File

@ -19,7 +19,7 @@ if has('reltime')
lockvar! g:_SYNTASTIC_START lockvar! g:_SYNTASTIC_START
endif endif
let g:_SYNTASTIC_VERSION = '3.7.0-153' let g:_SYNTASTIC_VERSION = '3.7.0-157'
lockvar g:_SYNTASTIC_VERSION lockvar g:_SYNTASTIC_VERSION
" Sanity checks {{{1 " Sanity checks {{{1

View File

@ -1,6 +1,6 @@
"============================================================================ "============================================================================
"File: pep8.vim "File: pep8.vim
"Description: Syntax checking plugin for syntastic.vim "Description: Syntax checking plugin for syntastic
"Maintainer: LCD 47 <lcd047 at gmail dot com> "Maintainer: LCD 47 <lcd047 at gmail dot com>
"License: This program is free software. It comes without any warranty, "License: This program is free software. It comes without any warranty,
" to the extent permitted by applicable law. You can redistribute " to the extent permitted by applicable law. You can redistribute
@ -15,34 +15,9 @@ if exists('g:loaded_syntastic_python_pep8_checker')
endif endif
let g:loaded_syntastic_python_pep8_checker = 1 let g:loaded_syntastic_python_pep8_checker = 1
let s:save_cpo = &cpo
set cpo&vim
function! SyntaxCheckers_python_pep8_GetLocList() dict
let makeprg = self.makeprgBuild({})
let errorformat = '%f:%l:%c: %m'
let env = syntastic#util#isRunningWindows() ? {} : { 'TERM': 'dumb' }
let loclist = SyntasticMake({
\ 'makeprg': makeprg,
\ 'errorformat': errorformat,
\ 'env': env,
\ 'subtype': 'Style' })
for e in loclist
let e['type'] = e['text'] =~? '^W' ? 'W' : 'E'
endfor
return loclist
endfunction
call g:SyntasticRegistry.CreateAndRegisterChecker({ call g:SyntasticRegistry.CreateAndRegisterChecker({
\ 'filetype': 'python', \ 'filetype': 'python',
\ 'name': 'pep8'}) \ 'name': 'pep8',
\ 'redirect': 'python/pycodestyle'})
let &cpo = s:save_cpo
unlet s:save_cpo
" vim: set sw=4 sts=4 et fdm=marker: " vim: set sw=4 sts=4 et fdm=marker:

View File

@ -0,0 +1,48 @@
"============================================================================
"File: pycodestyle.vim
"Description: Syntax checking plugin for syntastic
"Maintainer: LCD 47 <lcd047 at gmail dot com>
"License: This program is free software. It comes without any warranty,
" to the extent permitted by applicable law. You can redistribute
" it and/or modify it under the terms of the Do What The Fuck You
" Want To Public License, Version 2, as published by Sam Hocevar.
" See http://sam.zoy.org/wtfpl/COPYING for more details.
"
"============================================================================
if exists('g:loaded_syntastic_python_pycodestyle_checker')
finish
endif
let g:loaded_syntastic_python_pycodestyle_checker = 1
let s:save_cpo = &cpo
set cpo&vim
function! SyntaxCheckers_python_pycodestyle_GetLocList() dict
let makeprg = self.makeprgBuild({})
let errorformat = '%f:%l:%c: %m'
let env = syntastic#util#isRunningWindows() ? {} : { 'TERM': 'dumb' }
let loclist = SyntasticMake({
\ 'makeprg': makeprg,
\ 'errorformat': errorformat,
\ 'env': env,
\ 'subtype': 'Style' })
for e in loclist
let e['type'] = e['text'] =~? '^W' ? 'W' : 'E'
endfor
return loclist
endfunction
call g:SyntasticRegistry.CreateAndRegisterChecker({
\ 'filetype': 'python',
\ 'name': 'pycodestyle'})
let &cpo = s:save_cpo
unlet s:save_cpo
" vim: set sw=4 sts=4 et fdm=marker:

View File

@ -13,7 +13,7 @@ call coffee#CoffeeSetUpVariables()
setlocal formatoptions-=t formatoptions+=croql setlocal formatoptions-=t formatoptions+=croql
setlocal comments=:# commentstring=#\ %s setlocal comments=:# commentstring=#\ %s
setlocal omnifunc=javascriptcomplete#CompleteJS setlocal omnifunc=javascriptcomplete#CompleteJS
setlocal suffixesadd+=coffee setlocal suffixesadd+=.coffee
" Create custom augroups. " Create custom augroups.
augroup CoffeeBufUpdate | augroup END augroup CoffeeBufUpdate | augroup END

View File

@ -1,10 +1,15 @@
## 1.8 (unplanned) ## 1.8 (unplanned)
FEATURES:
* If you open a new buffer with a Go filename it get automatically populated based on the directory. If there are no Go files a simple main package is created, otherwise the file will include the package declaration line based on the package in the current directory. Checkout the demo to see it in action: https://twitter.com/fatih/status/748333086643994624. This is enabled by default. Can be disabled with `let g:go_template_autocreate = 0`. You can use your own template with `let g:go_template_file = "foo.go"` and putting the file under the `templates/` folder. [gh-918]
IMPROVEMENTS: IMPROVEMENTS:
* `:GoDoc` accepts arguments now which are passed directly to `godoc`. So usages like `:GoDoc flag` works again (it was changed in previous versions [gh-894] * `:GoDoc` accepts arguments now which are passed directly to `godoc`. So usages like `:GoDoc flag` works again (it was changed in previous versions [gh-894]
* `:GoDef` works now for modified files as well [gh-910] * `:GoDef` works now for modified files as well [gh-910]
* Internal: fix indentations on all files to **2-spaces/no tabs**. This is now the default vim-go style across all VimL files [gh-915] * Internal: fix indentations on all files to **2-spaces/no tabs**. This is now the default vim-go style across all VimL files [gh-915]
* Syntax: improved syntax highglighting performance for methods, fields, structs and interface type declarations [gh-917]
BUG FIXES: BUG FIXES:
@ -13,6 +18,12 @@ BUG FIXES:
* Fix `:GoCoverage` not running for Neovim [gh-899] * Fix `:GoCoverage` not running for Neovim [gh-899]
* Fix `:GoFmt` not picking up `-srcdir` if the command was set to use `goimports` [gh-904] * Fix `:GoFmt` not picking up `-srcdir` if the command was set to use `goimports` [gh-904]
* Fix `:GoTestCompile` to not leave behind artifacts if the cwd and the test files's directory do not match [gh-909] * Fix `:GoTestCompile` to not leave behind artifacts if the cwd and the test files's directory do not match [gh-909]
* Fix `:GoDocBrowser` to not fail if godoc doesn't exist [gh-920]
BACKWARDS INCOMPATIBILITIES:
* `g:go_highlight_structs` and `g:go_highlight_interface` are removed in favor of `g:go_highlight_types` [gh-917]
## 1.7.1 (June 7, 2016) ## 1.7.1 (June 7, 2016)

View File

@ -181,8 +181,7 @@ To change it:
let g:go_highlight_functions = 1 let g:go_highlight_functions = 1
let g:go_highlight_methods = 1 let g:go_highlight_methods = 1
let g:go_highlight_fields = 1 let g:go_highlight_fields = 1
let g:go_highlight_structs = 1 let g:go_highlight_types = 1
let g:go_highlight_interfaces = 1
let g:go_highlight_operators = 1 let g:go_highlight_operators = 1
let g:go_highlight_build_constraints = 1 let g:go_highlight_build_constraints = 1
``` ```

View File

@ -19,7 +19,7 @@ function! s:godocWord(args)
if !executable('godoc') if !executable('godoc')
let msg = "godoc command not found." let msg = "godoc command not found."
let msg .= " install with: go get golang.org/x/tools/cmd/godoc" let msg .= " install with: go get golang.org/x/tools/cmd/godoc"
call go#util#echoWarning(msg) call go#util#EchoWarning(msg)
return [] return []
endif endif

View File

@ -0,0 +1,31 @@
let s:current_file = expand("<sfile>")
function! go#template#create()
let l:root_dir = fnamemodify(s:current_file, ':h:h:h')
let cd = exists('*haslocaldir') && haslocaldir() ? 'lcd ' : 'cd '
let dir = getcwd()
execute cd . fnameescape(expand("%:p:h"))
let l:package_name = go#tool#PackageName()
" if we can't figure out any package name(no Go files or non Go package
" files) from the directory create the template
if l:package_name == -1
let l:template_file = get(g:, 'go_template_file', "hello_world.go")
let l:template_path = go#util#Join(l:root_dir, "templates", l:template_file)
exe '0r ' . l:template_path
$delete _
else
let l:content = printf("package %s", l:package_name)
call append(0, l:content)
$delete _
endif
" Remove the '... [New File]' message line from the command line
echon
execute cd . fnameescape(dir)
endfunction
" vim: sw=2 ts=2 et

View File

@ -43,6 +43,16 @@ function! go#tool#Imports()
return imports return imports
endfunction endfunction
function! go#tool#PackageName()
let command = "go list -f '{{.Name}}'"
let out = go#tool#ExecuteInDir(command)
if go#util#ShellError() != 0
return -1
endif
return split(out, '\n')[0]
endfunction
function! go#tool#ParseErrors(lines) function! go#tool#ParseErrors(lines)
let errors = [] let errors = []

View File

@ -25,6 +25,12 @@ function! go#util#LineEnding()
return "\n" return "\n"
endfunction endfunction
" Join joins any number of path elements into a single path, adding a
" Separator if necessary and returns the result
function! go#util#Join(...)
return join(a:000, go#util#PathSep())
endfunction
" IsWin returns 1 if current OS is Windows or 0 otherwise " IsWin returns 1 if current OS is Windows or 0 otherwise
function! go#util#IsWin() function! go#util#IsWin()
let win = ['win16', 'win32', 'win64', 'win95'] let win = ['win16', 'win32', 'win64', 'win95']

View File

@ -1118,23 +1118,17 @@ Highlights method names. By default it's disabled. >
let g:go_highlight_methods = 0 let g:go_highlight_methods = 0
< <
*'g:go_highlight_structs'* *'g:go_highlight_types'*
Highlights struct names. By default it's disabled. > Highlights struct and interface names. By default it's disabled. >
let g:go_highlight_structs = 0 let g:go_highlight_types = 0
< <
*'g:go_highlight_fields'* *'g:go_highlight_fields'*
Highlights field names. By default it's disabled. > Highlights field names. By default it's disabled. >
let g:go_highlight_fields = 0 let g:go_highlight_fields = 0
<
*'g:go_highlight_interfaces'*
Highlights interface names. By default it's disabled. >
let g:go_highlight_interfaces = 0
< <
*'g:go_highlight_build_constraints'* *'g:go_highlight_build_constraints'*
@ -1291,8 +1285,30 @@ Specifies whether `gocode` should add built-in types, functions and constants
to an autocompletion proposals. By default it is enabled. to an autocompletion proposals. By default it is enabled.
> >
let g:go_gocode_propose_builtins = 1 let g:go_gocode_propose_builtins = 1
<
*g:go_template_autocreate*
When a new Go file is created, vim-go automatically fills the buffer content
with a Go code template. By default the template under
`templates/hello_world.go` is used. This can be changed with the
|g:go_template_file| setting.
If the new file is created in an already prepopulated package (with other Go
files), in this case a Go code template with only the Go package declaration
(which is automatically determined according to the current package) is added.
By default it is enabled.
>
let g:go_template_autocreate = 1
<
*g:go_template_file*
Specifies the file under the `templates` folder that is used if a new Go file
is created. Checkout |g:go_template_autocreate| for more info. By default the
`hello_world.go` file is used.
>
let g:go_template_file = "hello_world.go"
<
=============================================================================== ===============================================================================
TROUBLESHOOTING *go-troubleshooting* TROUBLESHOOTING *go-troubleshooting*

View File

@ -171,6 +171,11 @@ augroup vim-go
if get(g:, "go_metalinter_autosave", 0) if get(g:, "go_metalinter_autosave", 0)
autocmd BufWritePost *.go call go#lint#Gometa(1) autocmd BufWritePost *.go call go#lint#Gometa(1)
endif endif
" create new template from scratch
if get(g:, "go_template_autocreate", 1)
autocmd BufNewFile *.go call go#template#create()
endif
augroup END augroup END
" vim: sw=2 ts=2 et " vim: sw=2 ts=2 et

View File

@ -71,12 +71,8 @@ if !exists("g:go_highlight_fields")
let g:go_highlight_fields = 0 let g:go_highlight_fields = 0
endif endif
if !exists("g:go_highlight_structs") if !exists("g:go_highlight_types")
let g:go_highlight_structs = 0 let g:go_highlight_types = 0
endif
if !exists("g:go_highlight_interfaces")
let g:go_highlight_interfaces = 0
endif endif
if !exists("g:go_highlight_build_constraints") if !exists("g:go_highlight_build_constraints")
@ -98,12 +94,10 @@ endif
syn case match syn case match
syn keyword goDirective package import syn keyword goDirective package import
syn keyword goDeclaration var const type syn keyword goDeclaration var const
syn keyword goDeclType struct interface
hi def link goDirective Statement hi def link goDirective Statement
hi def link goDeclaration Keyword hi def link goDeclaration Keyword
hi def link goDeclType Keyword
" Keywords within functions " Keywords within functions
syn keyword goStatement defer go goto return break continue fallthrough syn keyword goStatement defer go goto return break continue fallthrough
@ -129,10 +123,6 @@ hi def link goUnsignedInts Type
hi def link goFloats Type hi def link goFloats Type
hi def link goComplexes Type hi def link goComplexes Type
" Treat func specially: it's a declaration at the start of a line, but a type
" elsewhere. Order matters here.
syn match goDeclaration /\<func\>/
" Predefined functions and values " Predefined functions and values
syn match goBuiltins /\<\v(append|cap|close|complex|copy|delete|imag|len)\ze\(/ syn match goBuiltins /\<\v(append|cap|close|complex|copy|delete|imag|len)\ze\(/
@ -301,38 +291,43 @@ hi def link goOperator Operator
" Functions; " Functions;
if g:go_highlight_functions != 0 if g:go_highlight_functions != 0
syn match goFunction /\(func\s\+\)\@<=\w\+\((\)\@=/ syn match goDeclaration /\<func\>/ nextgroup=goReceiver,goFunction skipwhite skipnl
syn match goFunction /\()\s\+\)\@<=\w\+\((\)\@=/ syn match goReceiver /([^),]\+)/ contained nextgroup=goFunction contains=goReceiverType skipwhite skipnl
syn match goReceiverType /\(\s\|*\)\w\+)/hs=s+1,he=e-1 contained
syn match goFunction /\w\+/ contained
else
syn keyword goDeclaration func
endif endif
hi def link goReceiverType Type
hi def link goFunction Function hi def link goFunction Function
" Methods; " Methods;
if g:go_highlight_methods != 0 if g:go_highlight_methods != 0
syn match goMethod /\(\.\)\@<=\w\+\((\)\@=/ syn match goMethod /\.\w\+(/hs=s+1,he=e-1
endif endif
hi def link goMethod Type hi def link goMethod Type
" Fields; " Fields;
if g:go_highlight_fields != 0 if g:go_highlight_fields != 0
syn match goField /\(\.\)\@<=\a\+\([\ \n\r\:\)]\)\@=/ syn match goVarArgs /\.\.\.\w\+\>/
syn match goField /\.\a\+\([\ \n\r\:\)\[]\)\@=/hs=s+1
endif endif
hi def link goField Type hi def link goField Identifier
" Structs; " Structs & Interfaces;
if g:go_highlight_structs != 0 if g:go_highlight_types != 0
syn match goStruct /\(.\)\@<=\w\+\({\)\@=/ syn match goTypeConstructor /\<\w\+{/he=e-1
syn match goStructDef /\(type\s\+\)\@<=\w\+\(\s\+struct\s\+{\)\@=/ syn match goTypeDecl /\<type\>/ nextgroup=goTypeName skipwhite skipnl
syn match goTypeName /\w\+/ contained nextgroup=goDeclType skipwhite skipnl
syn match goDeclType /\<interface\|struct\>/ contained skipwhite skipnl
else
syn keyword goDeclType struct interface
syn keyword goDeclaration type
endif endif
hi def link goStruct Function hi def link goTypeConstructor Type
hi def link goStructDef Function hi def link goTypeName Type
hi def link goTypeDecl Keyword
" Interfaces; hi def link goDeclType Keyword
if g:go_highlight_interfaces != 0
syn match goInterface /\(.\)\@<=\w\+\({\)\@=/
syn match goInterfaceDef /\(type\s\+\)\@<=\w\+\(\s\+interface\s\+{\)\@=/
endif
hi def link goInterface Function
hi def link goInterfaceDef Function
" Build Constraints " Build Constraints
if g:go_highlight_build_constraints != 0 if g:go_highlight_build_constraints != 0

View File

@ -0,0 +1,7 @@
package main
import "fmt"
func main() {
fmt.Println("vim-go")
}

View File

@ -85,12 +85,12 @@ let s:concealends = ''
if has('conceal') && get(g:, 'markdown_syntax_conceal', 1) == 1 if has('conceal') && get(g:, 'markdown_syntax_conceal', 1) == 1
let s:concealends = ' concealends' let s:concealends = ' concealends'
endif endif
exe 'syn region markdownItalic matchgroup=markdownItalicDelimiter start="\S\@<=\*\|\*\S\@=" end="\S\@<=\*\|\*\S\@=" keepend contains=markdownLineStart' . s:concealends exe 'syn region markdownItalic matchgroup=markdownItalicDelimiter start="\S\@<=\*\|\*\S\@=" end="\S\@<=\*\|\*\S\@=" keepend contains=markdownLineStart,@Spell' . s:concealends
exe 'syn region markdownItalic matchgroup=markdownItalicDelimiter start="\S\@<=_\|_\S\@=" end="\S\@<=_\|_\S\@=" keepend contains=markdownLineStart' . s:concealends exe 'syn region markdownItalic matchgroup=markdownItalicDelimiter start="\S\@<=_\|_\S\@=" end="\S\@<=_\|_\S\@=" keepend contains=markdownLineStart,@Spell' . s:concealends
exe 'syn region markdownBold matchgroup=markdownBoldDelimiter start="\S\@<=\*\*\|\*\*\S\@=" end="\S\@<=\*\*\|\*\*\S\@=" keepend contains=markdownLineStart,markdownItalic' . s:concealends exe 'syn region markdownBold matchgroup=markdownBoldDelimiter start="\S\@<=\*\*\|\*\*\S\@=" end="\S\@<=\*\*\|\*\*\S\@=" keepend contains=markdownLineStart,markdownItalic,@Spell' . s:concealends
exe 'syn region markdownBold matchgroup=markdownBoldDelimiter start="\S\@<=__\|__\S\@=" end="\S\@<=__\|__\S\@=" keepend contains=markdownLineStart,markdownItalic' . s:concealends exe 'syn region markdownBold matchgroup=markdownBoldDelimiter start="\S\@<=__\|__\S\@=" end="\S\@<=__\|__\S\@=" keepend contains=markdownLineStart,markdownItalic,@Spell' . s:concealends
exe 'syn region markdownBoldItalic matchgroup=markdownBoldItalicDelimiter start="\S\@<=\*\*\*\|\*\*\*\S\@=" end="\S\@<=\*\*\*\|\*\*\*\S\@=" keepend contains=markdownLineStart' . s:concealends exe 'syn region markdownBoldItalic matchgroup=markdownBoldItalicDelimiter start="\S\@<=\*\*\*\|\*\*\*\S\@=" end="\S\@<=\*\*\*\|\*\*\*\S\@=" keepend contains=markdownLineStart,@Spell' . s:concealends
exe 'syn region markdownBoldItalic matchgroup=markdownBoldItalicDelimiter start="\S\@<=___\|___\S\@=" end="\S\@<=___\|___\S\@=" keepend contains=markdownLineStart' . s:concealends exe 'syn region markdownBoldItalic matchgroup=markdownBoldItalicDelimiter start="\S\@<=___\|___\S\@=" end="\S\@<=___\|___\S\@=" keepend contains=markdownLineStart,@Spell' . s:concealends
syn region markdownCode matchgroup=markdownCodeDelimiter start="`" end="`" keepend contains=markdownLineStart syn region markdownCode matchgroup=markdownCodeDelimiter start="`" end="`" keepend contains=markdownLineStart
syn region markdownCode matchgroup=markdownCodeDelimiter start="`` \=" end=" \=``" keepend contains=markdownLineStart syn region markdownCode matchgroup=markdownCodeDelimiter start="`` \=" end=" \=``" keepend contains=markdownLineStart

View File

@ -32,8 +32,8 @@ syn cluster pugTop contains=pugBegin,pugComment,pugHtmlComment,pugJavascript
syn match pugBegin "^\s*\%([<>]\|&[^=~ ]\)\@!" nextgroup=pugTag,pugClassChar,pugIdChar,pugPlainChar,pugJavascript,pugScriptConditional,pugScriptStatement,pugPipedText syn match pugBegin "^\s*\%([<>]\|&[^=~ ]\)\@!" nextgroup=pugTag,pugClassChar,pugIdChar,pugPlainChar,pugJavascript,pugScriptConditional,pugScriptStatement,pugPipedText
syn match pugTag "+\?\w\+\%(:\w\+\)\=" contained contains=htmlTagName,htmlSpecialTagName nextgroup=@pugComponent syn match pugTag "+\?\w\+\%(:\w\+\)\=" contained contains=htmlTagName,htmlSpecialTagName nextgroup=@pugComponent
syn cluster pugComponent contains=pugAttributes,pugIdChar,pugBlockExpansionChar,pugClassChar,pugPlainChar,pugJavascript,pugTagBlockChar,pugTagInlineText syn cluster pugComponent contains=pugAttributes,pugIdChar,pugBlockExpansionChar,pugClassChar,pugPlainChar,pugJavascript,pugTagBlockChar,pugTagInlineText
syn match pugComment '\s*\/\/.*$' syn match pugComment '\(\s\+\|^\)\/\/.*$'
syn region pugCommentBlock start="\z(\s*\)\/\/.*$" end="^\%(\z1\s\|\s*$\)\@!" keepend syn region pugCommentBlock start="\z(\s\+\|^\)\/\/.*$" end="^\%(\z1\s\|\s*$\)\@!" keepend
syn region pugHtmlConditionalComment start="<!--\%(.*\)>" end="<!\%(.*\)-->" syn region pugHtmlConditionalComment start="<!--\%(.*\)>" end="<!\%(.*\)-->"
syn region pugAttributes matchgroup=pugAttributesDelimiter start="(" end=")" contained contains=@htmlJavascript,pugHtmlArg,htmlArg,htmlEvent,htmlCssDefinition nextgroup=@pugComponent syn region pugAttributes matchgroup=pugAttributesDelimiter start="(" end=")" contained contains=@htmlJavascript,pugHtmlArg,htmlArg,htmlEvent,htmlCssDefinition nextgroup=@pugComponent
syn match pugClassChar "\." contained nextgroup=pugClass syn match pugClassChar "\." contained nextgroup=pugClass

View File

@ -159,18 +159,18 @@ snippet address
${0} ${0}
</address> </address>
snippet area snippet area
<area shape="${1:rect}" coords="${2}" href="${3}" alt="${0}"> <area shape="${1:rect}" coords="${2}" href="${3}" alt="${0}" />
snippet area+ snippet area+
<area shape="${1:rect}" coords="${2}" href="${3}" alt="${4}"> <area shape="${1:rect}" coords="${2}" href="${3}" alt="${4}" />
area+ area+
snippet area:c snippet area:c
<area shape="circle" coords="${1}" href="${2}" alt="${0}"> <area shape="circle" coords="${1}" href="${2}" alt="${0}" />
snippet area:d snippet area:d
<area shape="default" coords="${1}" href="${2}" alt="${0}"> <area shape="default" coords="${1}" href="${2}" alt="${0}" />
snippet area:p snippet area:p
<area shape="poly" coords="${1}" href="${2}" alt="${0}"> <area shape="poly" coords="${1}" href="${2}" alt="${0}" />
snippet area:r snippet area:r
<area shape="rect" coords="${1}" href="${2}" alt="${0}"> <area shape="rect" coords="${1}" href="${2}" alt="${0}" />
snippet article snippet article
<article> <article>
${0} ${0}
@ -200,7 +200,7 @@ snippet audio
snippet b snippet b
<b>${0}</b> <b>${0}</b>
snippet base snippet base
<base href="${1}" target="${0}"> <base href="${1}" target="${0}" />
snippet bdi snippet bdi
<bdi>${0}</bdo> <bdi>${0}</bdo>
snippet bdo snippet bdo
@ -218,7 +218,7 @@ snippet body
${0} ${0}
</body> </body>
snippet br snippet br
<br> <br />
snippet button snippet button
<button type="${1:submit}">${0}</button> <button type="${1:submit}">${0}</button>
snippet button. snippet button.
@ -240,9 +240,9 @@ snippet cite
snippet code snippet code
<code>${0}</code> <code>${0}</code>
snippet col snippet col
<col> <col />
snippet col+ snippet col+
<col> <col />
col+ col+
snippet colgroup snippet colgroup
<colgroup> <colgroup>
@ -330,7 +330,7 @@ snippet dt+
snippet em snippet em
<em>${0}</em> <em>${0}</em>
snippet embed snippet embed
<embed src="${1}" type="${0}"> <embed src="${1}" type="${0}" />
snippet fieldset snippet fieldset
<fieldset> <fieldset>
${0} ${0}
@ -423,7 +423,7 @@ snippet h6#
<h6 id="${1}">${0}</h6> <h6 id="${1}">${0}</h6>
snippet head snippet head
<head> <head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>${1:`substitute(vim_snippets#Filename('', 'Page Title'), '^.', '\u&', '')`}</title> <title>${1:`substitute(vim_snippets#Filename('', 'Page Title'), '^.', '\u&', '')`}</title>
${0} ${0}
@ -449,7 +449,7 @@ snippet hgroup.
${0} ${0}
</hgroup> </hgroup>
snippet hr snippet hr
<hr> <hr />
snippet html snippet html
<html> <html>
${0} ${0}
@ -462,8 +462,8 @@ snippet html5
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8" />
<meta name="viewport" content="width=device-width"> <meta name="viewport" content="width=device-width" />
<title>${1:`substitute(vim_snippets#Filename('', 'Page Title'), '^.', '\u&', '')`}</title> <title>${1:`substitute(vim_snippets#Filename('', 'Page Title'), '^.', '\u&', '')`}</title>
${2:link} ${2:link}
</head> </head>
@ -475,8 +475,8 @@ snippet html5l
<!DOCTYPE html> <!DOCTYPE html>
<html lang="${1:es}"> <html lang="${1:es}">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8" />
<meta name="viewport" content="width=device-width"> <meta name="viewport" content="width=device-width" />
<title>${2:`substitute(vim_snippets#Filename('', 'Page Title'), '^.', '\u&', '')`}</title> <title>${2:`substitute(vim_snippets#Filename('', 'Page Title'), '^.', '\u&', '')`}</title>
${3:link} ${3:link}
</head> </head>
@ -493,65 +493,63 @@ snippet iframe.
snippet iframe# snippet iframe#
<iframe id="${1}" src="${2}" frameborder="0"></iframe> <iframe id="${1}" src="${2}" frameborder="0"></iframe>
snippet img snippet img
<img src="${1}" alt="${2}"> <img src="${1}" alt="${2}" />
snippet img. snippet img.
<img class="${1}" src="${2}" alt="${3}"> <img class="${1}" src="${2}" alt="${3}" />
snippet img# snippet img#
<img id="${1}" src="${2}" alt="${3}"> <img id="${1}" src="${2}" alt="${3}" />
snippet input snippet input
<input type="${1:text/submit/hidden/button/image}" name="${2}" id="${3:$2}" value="${4}"> <input type="${1:text/submit/hidden/button/image}" name="${2}" id="${3:$2}" value="${4}" />
snippet input. snippet input.
<input class="${1}" type="${2:text/submit/hidden/button/image}" name="${3}" id="${4:$3}" value="${5}"> <input class="${1}" type="${2:text/submit/hidden/button/image}" name="${3}" id="${4:$3}" value="${5}" />
snippet input:text snippet input:text
<input type="text" name="${1}" id="${2:$1}" value="${3}"> <input type="text" name="${1}" id="${2:$1}" value="${3}" />
snippet input:submit snippet input:submit
<input type="submit" name="${1}" id="${2:$1}" value="${3}"> <input type="submit" name="${1}" id="${2:$1}" value="${3}" />
snippet input:hidden snippet input:hidden
<input type="hidden" name="${1}" id="${2:$1}" value="${3}"> <input type="hidden" name="${1}" id="${2:$1}" value="${3}" />
snippet input:button snippet input:button
<input type="button" name="${1}" id="${2:$1}" value="${3}"> <input type="button" name="${1}" id="${2:$1}" value="${3}" />
snippet input:image snippet input:image
<input type="image" name="${1}" id="${2:$1}" src="${3}" alt="${4}"> <input type="image" name="${1}" id="${2:$1}" src="${3}" alt="${4}" />
snippet input:checkbox snippet input:checkbox
<input type="checkbox" name="${1}" id="${2:$1}"> <input type="checkbox" name="${1}" id="${2:$1}" />
snippet input:radio snippet input:radio
<input type="radio" name="${1}" id="${2:$1}"> <input type="radio" name="${1}" id="${2:$1}" />
snippet input:color snippet input:color
<input type="color" name="${1}" id="${2:$1}" value="${3}"> <input type="color" name="${1}" id="${2:$1}" value="${3}" />
snippet input:date snippet input:date
<input type="date" name="${1}" id="${2:$1}" value="${3}"> <input type="date" name="${1}" id="${2:$1}" value="${3}" />
snippet input:datetime snippet input:datetime
<input type="datetime" name="${1}" id="${2:$1}" value="${3}"> <input type="datetime" name="${1}" id="${2:$1}" value="${3}" />
snippet input:datetime-local snippet input:datetime-local
<input type="datetime-local" name="${1}" id="${2:$1}" value="${3}"> <input type="datetime-local" name="${1}" id="${2:$1}" value="${3}" />
snippet input:email snippet input:email
<input type="email" name="${1}" id="${2:$1}" value="${3}"> <input type="email" name="${1}" id="${2:$1}" value="${3}" />
snippet input:file snippet input:file
<input type="file" name="${1}" id="${2:$1}" value="${3}"> <input type="file" name="${1}" id="${2:$1}" value="${3}" />
snippet input:month snippet input:month
<input type="month" name="${1}" id="${2:$1}" value="${3}"> <input type="month" name="${1}" id="${2:$1}" value="${3}" />
snippet input:number snippet input:number
<input type="number" name="${1}" id="${2:$1}" value="${3}"> <input type="number" name="${1}" id="${2:$1}" value="${3}" />
snippet input:password snippet input:password
<input type="password" name="${1}" id="${2:$1}" value="${3}"> <input type="password" name="${1}" id="${2:$1}" value="${3}" />
snippet input:range snippet input:range
<input type="range" name="${1}" id="${2:$1}" value="${3}"> <input type="range" name="${1}" id="${2:$1}" value="${3}" />
snippet input:reset snippet input:reset
<input type="reset" name="${1}" id="${2:$1}" value="${3}"> <input type="reset" name="${1}" id="${2:$1}" value="${3}" />
snippet input:search snippet input:search
<input type="search" name="${1}" id="${2:$1}" value="${3}"> <input type="search" name="${1}" id="${2:$1}" value="${3}" />
snippet input:time snippet input:time
<input type="time" name="${1}" id="${2:$1}" value="${3}"> <input type="time" name="${1}" id="${2:$1}" value="${3}" />
snippet input:url snippet input:url
<input type="url" name="${1}" id="${2:$1}" value="${3}"> <input type="url" name="${1}" id="${2:$1}" value="${3}" />
snippet input:week snippet input:week
<input type="week" name="${1}" id="${2:$1}" value="${3}"> <input type="week" name="${1}" id="${2:$1}" value="${3}" />
snippet ins snippet ins
<ins>${0}</ins> <ins>${0}</ins>
snippet kbd snippet kbd
<kbd>${0}</kbd> <kbd>${0}</kbd>
snippet keygen
<keygen>${0}</keygen>
snippet label snippet label
<label for="${0:$1}">${1}</label> <label for="${0:$1}">${1}</label>
snippet label:i snippet label:i
@ -579,19 +577,19 @@ snippet lia+
<li><a href="${2:#}">${1}</a></li> <li><a href="${2:#}">${1}</a></li>
lia+ lia+
snippet link snippet link
<link rel="${1}" href="${2}" title="${3}" type="${4}"> <link rel="${1}" href="${2}" title="${3}" type="${4}" />
snippet link:atom snippet link:atom
<link rel="alternate" href="${1:atom.xml}" title="Atom" type="application/atom+xml"> <link rel="alternate" href="${1:atom.xml}" title="Atom" type="application/atom+xml" />
snippet link:s snippet link:s
<link rel="stylesheet" href="${1:style.css}"> <link rel="stylesheet" href="${1:style.css}" />
snippet link:css snippet link:css
<link rel="stylesheet" href="${1:style.css}" type="text/css" media="${2:all}"> <link rel="stylesheet" href="${1:style.css}" type="text/css" media="${2:all}" />
snippet link:favicon snippet link:favicon
<link rel="shortcut icon" href="${1:favicon.ico}" type="image/x-icon"> <link rel="shortcut icon" href="${1:favicon.ico}" type="image/x-icon" />
snippet link:rss snippet link:rss
<link rel="alternate" href="${1:rss.xml}" title="RSS" type="application/atom+xml"> <link rel="alternate" href="${1:rss.xml}" title="RSS" type="application/atom+xml" />
snippet link:touch snippet link:touch
<link rel="apple-touch-icon" href="${1:favicon.png}"> <link rel="apple-touch-icon" href="${1:favicon.png}" />
snippet main snippet main
<main role="main"> <main role="main">
${0} ${0}
@ -610,7 +608,7 @@ snippet map#
</map> </map>
snippet map+ snippet map+
<map name="${1}"> <map name="${1}">
<area shape="${2}" coords="${3}" href="${4}" alt="${5}">${6} <area shape="${2}" coords="${3}" href="${4}" alt="${5}" />${6}
</map> </map>
snippet mark snippet mark
<mark>${0}</mark> <mark>${0}</mark>
@ -627,17 +625,17 @@ snippet menu:t
${0} ${0}
</menu> </menu>
snippet meta snippet meta
<meta http-equiv="${1}" content="${2}"> <meta http-equiv="${1}" content="${2}" />
snippet meta:s snippet meta:s
<meta ${0}> <meta ${0} />
snippet meta:d snippet meta:d
<meta name="description" content="${0}"> <meta name="description" content="${0}" />
snippet meta:compat snippet meta:compat
<meta http-equiv="X-UA-Compatible" content="IE=${1:7,8,edge}"> <meta http-equiv="X-UA-Compatible" content="IE=${1:7,8,edge}" />
snippet meta:refresh snippet meta:refresh
<meta http-equiv="refresh" content="text/html;charset=UTF-8"> <meta http-equiv="refresh" content="text/html;charset=UTF-8" />
snippet meta:utf snippet meta:utf
<meta http-equiv="content-type" content="text/html;charset=UTF-8"> <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
snippet meter snippet meter
<meter>${0}</meter> <meter>${0}</meter>
snippet nav snippet nav
@ -665,13 +663,13 @@ snippet movie
<object width="$2" height="$3" classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" <object width="$2" height="$3" classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"
codebase="http://www.apple.com/qtactivex/qtplugin.cab"> codebase="http://www.apple.com/qtactivex/qtplugin.cab">
<param name="src" value="$1" /> <param name="src" value="$1" />
<param name="controller" value="$4"> <param name="controller" value="$4" />
<param name="autoplay" value="$5"> <param name="autoplay" value="$5" />
<embed src="${1:movie.mov}" <embed src="${1:movie.mov}"
width="${2:320}" height="${3:240}" width="${2:320}" height="${3:240}"
controller="${4:true}" autoplay="${5:true}" controller="${4:true}" autoplay="${5:true}"
scale="tofit" cache="true" scale="tofit" cache="true"
pluginspage="http://www.apple.com/quicktime/download/"> pluginspage="http://www.apple.com/quicktime/download/" />
</object> </object>
snippet ol snippet ol
<ol> <ol>
@ -711,7 +709,7 @@ snippet p.
snippet p# snippet p#
<p id="${1}">${0}</p> <p id="${1}">${0}</p>
snippet param snippet param
<param name="${1}" value="${2}"> <param name="${1}" value="${2}" />
snippet pre snippet pre
<pre> <pre>
${0} ${0}
@ -774,7 +772,7 @@ snippet select+
snippet small snippet small
<small>${0}</small> <small>${0}</small>
snippet source snippet source
<source src="${1}" type="${2}" media="${0}"> <source src="${1}" type="${2}" media="${0}" />
snippet span snippet span
<span>${0}</span> <span>${0}</span>
snippet span. snippet span.
@ -853,7 +851,7 @@ snippet tr+
td+${0} td+${0}
</tr> </tr>
snippet track snippet track
<track src="${1}" srclang="${2}" label="${3}" default="${4:default}>${5}</track> <track src="${1}" srclang="${2}" label="${3}" default="${4:default} />${5}
snippet ul snippet ul
<ul> <ul>
${0} ${0}
@ -876,4 +874,4 @@ snippet var
snippet video snippet video
<video src="${1} height="${2}" width="${3}" preload="${5:none}" autoplay="${6:autoplay}>${7}</video> <video src="${1} height="${2}" width="${3}" preload="${5:none}" autoplay="${6:autoplay}>${7}</video>
snippet wbr snippet wbr
<wbr> <wbr />