Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: eevee/rc
base: 5ef19e54ea
...
head fork: eevee/rc
compare: 95f1a4c261
Checking mergeability… Don't worry, you can still create the pull request.
  • 3 commits
  • 8 files changed
  • 0 commit comments
  • 1 contributor
View
1  .vim/ftdetect/mako.vim
@@ -0,0 +1 @@
+au BufNewFile,BufRead *.mako set filetype=mako
View
1  .vim/ftdetect/scss.vim
@@ -0,0 +1 @@
+au BufRead,BufNewFile *.scss set filetype=scss
View
2  .vim/ftdetect/tt.vim
@@ -0,0 +1,2 @@
+au BufNewFile,BufRead *.tt set filetype=tt2html
+let b:tt2_syn_tags = '\[% %]'
View
282 .vim/indent/html.vim
@@ -0,0 +1,282 @@
+" Description: html5 (and html4) indenter
+" Changed By: Brian Gershon <brian.five@gmail.com>
+" Last Change: 30 Jan 2011
+"
+" 1. Started with vim72 html indent file authored by Johannes Zellner (below)
+" 2. Added html5 list as described here:
+" http://stackoverflow.com/questions/3232518/how-to-update-vim-to-color-code-new-html-elements
+" 3. Added this to a fork of https://github.com/othree/html5.vim
+" which already provides nice html5 syntax highlighting.
+"
+" Description: html indenter
+" Author: Johannes Zellner <johannes@zellner.org>
+" Last Change: Mo, 05 Jun 2006 22:32:41 CEST
+" Restoring 'cpo' and 'ic' added by Bram 2006 May 5
+" Globals:
+" let g:html_indent_tags = ['testag']
+" let g:html_exclude_tags = ['html', 'style', 'script', 'body']
+
+
+" Only load this indent file when no other was loaded.
+if exists("b:did_indent")
+ finish
+endif
+let b:did_indent = 1
+
+" [-- local settings (must come before aborting the script) --]
+setlocal indentexpr=HtmlIndentGet(v:lnum)
+setlocal indentkeys=o,O,*<Return>,<>>,{,}
+
+
+let s:tags = []
+
+" [-- <ELEMENT ? - - ...> --]
+call add(s:tags, 'a')
+call add(s:tags, 'abbr')
+call add(s:tags, 'acronym')
+call add(s:tags, 'address')
+call add(s:tags, 'b')
+call add(s:tags, 'bdo')
+call add(s:tags, 'big')
+call add(s:tags, 'blockquote')
+call add(s:tags, 'button')
+call add(s:tags, 'caption')
+call add(s:tags, 'center')
+call add(s:tags, 'cite')
+call add(s:tags, 'code')
+call add(s:tags, 'colgroup')
+call add(s:tags, 'del')
+call add(s:tags, 'dfn')
+call add(s:tags, 'dir')
+call add(s:tags, 'div')
+call add(s:tags, 'dl')
+call add(s:tags, 'em')
+call add(s:tags, 'fieldset')
+call add(s:tags, 'font')
+call add(s:tags, 'form')
+call add(s:tags, 'frameset')
+call add(s:tags, 'h1')
+call add(s:tags, 'h2')
+call add(s:tags, 'h3')
+call add(s:tags, 'h4')
+call add(s:tags, 'h5')
+call add(s:tags, 'h6')
+call add(s:tags, 'i')
+call add(s:tags, 'iframe')
+call add(s:tags, 'ins')
+call add(s:tags, 'kbd')
+call add(s:tags, 'label')
+call add(s:tags, 'legend')
+call add(s:tags, 'li')
+call add(s:tags, 'map')
+call add(s:tags, 'menu')
+call add(s:tags, 'noframes')
+call add(s:tags, 'noscript')
+call add(s:tags, 'object')
+call add(s:tags, 'ol')
+call add(s:tags, 'optgroup')
+call add(s:tags, 'p')
+" call add(s:tags, 'pre')
+call add(s:tags, 'q')
+call add(s:tags, 's')
+call add(s:tags, 'samp')
+call add(s:tags, 'script')
+call add(s:tags, 'select')
+call add(s:tags, 'small')
+call add(s:tags, 'span')
+call add(s:tags, 'strong')
+call add(s:tags, 'style')
+call add(s:tags, 'sub')
+call add(s:tags, 'sup')
+call add(s:tags, 'table')
+call add(s:tags, 'textarea')
+call add(s:tags, 'title')
+call add(s:tags, 'tt')
+call add(s:tags, 'u')
+call add(s:tags, 'ul')
+call add(s:tags, 'var')
+
+" New HTML 5 elements
+call add(s:tags, 'article')
+call add(s:tags, 'aside')
+call add(s:tags, 'audio')
+call add(s:tags, 'canvas')
+call add(s:tags, 'command')
+call add(s:tags, 'datalist')
+call add(s:tags, 'details')
+call add(s:tags, 'embed')
+call add(s:tags, 'figcaption')
+call add(s:tags, 'figure')
+call add(s:tags, 'footer')
+call add(s:tags, 'header')
+call add(s:tags, 'hgroup')
+call add(s:tags, 'keygen')
+call add(s:tags, 'mark')
+call add(s:tags, 'meter')
+call add(s:tags, 'nav')
+call add(s:tags, 'output')
+call add(s:tags, 'progress')
+call add(s:tags, 'rp')
+call add(s:tags, 'rt')
+call add(s:tags, 'ruby')
+call add(s:tags, 'section')
+call add(s:tags, 'source')
+call add(s:tags, 'summary')
+call add(s:tags, 'time')
+call add(s:tags, 'video')
+call add(s:tags, 'bdi')
+
+call add(s:tags, 'html')
+call add(s:tags, 'head')
+call add(s:tags, 'body')
+
+call add(s:tags, 'thead')
+call add(s:tags, 'tbody')
+call add(s:tags, 'tfoot')
+call add(s:tags, 'tr')
+call add(s:tags, 'th')
+call add(s:tags, 'td')
+
+if exists('g:html_exclude_tags')
+ for tag in g:html_exclude_tags
+ call remove(s:tags, index(s:tags, tag))
+ endfor
+endif
+if exists('g:html_indent_tags')
+ call extend(s:tags, g:html_indent_tags)
+endif
+let s:html_indent_tags = join(s:tags, '\|')
+
+let s:cpo_save = &cpo
+set cpo-=C
+
+" [-- count indent-increasing tags of line a:lnum --]
+fun! <SID>HtmlIndentOpen(lnum, pattern)
+ let s = substitute('x'.getline(a:lnum),
+ \ '.\{-}\(\(<\)\('.a:pattern.'\)\>\)', "\1", 'g')
+ let s = substitute(s, "[^\1].*$", '', '')
+ return strlen(s)
+endfun
+
+" [-- count indent-decreasing tags of line a:lnum --]
+fun! <SID>HtmlIndentClose(lnum, pattern)
+ let s = substitute('x'.getline(a:lnum),
+ \ '.\{-}\(\(<\)/\('.a:pattern.'\)\>>\)', "\1", 'g')
+ let s = substitute(s, "[^\1].*$", '', '')
+ return strlen(s)
+endfun
+
+" [-- count indent-increasing '{' of (java|css) line a:lnum --]
+fun! <SID>HtmlIndentOpenAlt(lnum)
+ return strlen(substitute(getline(a:lnum), '[^{]\+', '', 'g'))
+endfun
+
+" [-- count indent-decreasing '}' of (java|css) line a:lnum --]
+fun! <SID>HtmlIndentCloseAlt(lnum)
+ return strlen(substitute(getline(a:lnum), '[^}]\+', '', 'g'))
+endfun
+
+" [-- return the sum of indents respecting the syntax of a:lnum --]
+fun! <SID>HtmlIndentSum(lnum, style)
+ if a:style == match(getline(a:lnum), '^\s*</')
+ if a:style == match(getline(a:lnum), '^\s*</\<\('.s:html_indent_tags.'\)\>')
+ let open = <SID>HtmlIndentOpen(a:lnum, s:html_indent_tags)
+ let close = <SID>HtmlIndentClose(a:lnum, s:html_indent_tags)
+ if 0 != open || 0 != close
+ return open - close
+ endif
+ endif
+ endif
+ if '' != &syntax &&
+ \ synIDattr(synID(a:lnum, 1, 1), 'name') =~ '\(css\|java\).*' &&
+ \ synIDattr(synID(a:lnum, strlen(getline(a:lnum)), 1), 'name')
+ \ =~ '\(css\|java\).*'
+ if a:style == match(getline(a:lnum), '^\s*}')
+ return <SID>HtmlIndentOpenAlt(a:lnum) - <SID>HtmlIndentCloseAlt(a:lnum)
+ endif
+ endif
+ return 0
+endfun
+
+fun! HtmlIndentGet(lnum)
+ " Find a non-empty line above the current line.
+ let lnum = prevnonblank(a:lnum - 1)
+
+ " Hit the start of the file, use zero indent.
+ if lnum == 0
+ return 0
+ endif
+
+ let restore_ic = &ic
+ setlocal ic " ignore case
+
+ " [-- special handling for <pre>: no indenting --]
+ if getline(a:lnum) =~ '\c</pre>'
+ \ || 0 < searchpair('\c<pre>', '', '\c</pre>', 'nWb')
+ \ || 0 < searchpair('\c<pre>', '', '\c</pre>', 'nW')
+ " we're in a line with </pre> or inside <pre> ... </pre>
+ if restore_ic == 0
+ setlocal noic
+ endif
+ return -1
+ endif
+
+ " [-- special handling for <javascript>: use cindent --]
+ let js = '<script'
+
+ """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+ " by Tye Zdrojewski <zdro@yahoo.com>, 05 Jun 2006
+ " ZDR: This needs to be an AND (we are 'after the start of the pair' AND
+ " we are 'before the end of the pair'). Otherwise, indentation
+ " before the start of the script block will be affected; the end of
+ " the pair will still match if we are before the beginning of the
+ " pair.
+ "
+ if 0 < searchpair(js, '', '</script>', 'nWb')
+ \ && 0 < searchpair(js, '', '</script>', 'nW')
+ " we're inside javascript
+ if getline(lnum) !~ js && getline(a:lnum) != '</script>'
+ if restore_ic == 0
+ setlocal noic
+ endif
+ return cindent(a:lnum)
+ endif
+ endif
+
+ if getline(lnum) =~ '\c</pre>'
+ " line before the current line a:lnum contains
+ " a closing </pre>. --> search for line before
+ " starting <pre> to restore the indent.
+ let preline = prevnonblank(search('\c<pre>', 'bW') - 1)
+ if preline > 0
+ if restore_ic == 0
+ setlocal noic
+ endif
+
+ if 0 == match(getline(a:lnum), '^\s*</')
+ return indent(preline) - (1*&sw)
+ else
+ return indent(preline)
+ endif
+ endif
+ endif
+
+ let ind = <SID>HtmlIndentSum(lnum, -1)
+ let ind = ind + <SID>HtmlIndentSum(a:lnum, 0)
+
+ " Fix for conditional comment
+ if getline(a:lnum) =~ '\c<!--.*<\(html\|body\).*-->'
+ let ind = ind - 1
+ endif
+
+ if restore_ic == 0
+ setlocal noic
+ endif
+
+ return indent(lnum) + (&sw * ind)
+endfun
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
+
+" [-- EOF <runtime>/indent/html.vim --]
View
59 .vim/syntax/html.vim
@@ -0,0 +1,59 @@
+" Vim syntax file
+" Language: HTML (version 5)
+" Maintainer: Rodrigo Machado <rcmachado@gmail.com>
+" URL: http://rm.blog.br/vim/syntax/html.vim
+" Last Change: 2009 Aug 19
+" License: Public domain
+" (but let me know if you like :) )
+"
+" Note: This file just adds the new tags from HTML 5
+" and don't replace default html.vim syntax file
+"
+" Modified: othree <othree@gmail.com>
+" Changes: update to Draft 13 January 2011
+" add complete new attributes
+" add microdata Attributes
+" add bdi element
+
+" HTML 5 tags
+syn keyword htmlTagName contained article aside audio canvas command
+syn keyword htmlTagName contained datalist details dialog embed figcaption figure footer
+syn keyword htmlTagName contained header hgroup keygen mark meter menu nav output
+syn keyword htmlTagName contained progress time ruby rt rp section source summary time track video
+syn keyword htmlTagName contained wbr bdi
+
+" HTML 5 arguments
+" Core Attributes
+syn keyword htmlArg contained accesskey class contenteditable contextmenu dir
+syn keyword htmlArg contained draggable hidden id lang spellcheck style tabindex title
+" Event-handler Attributes
+syn keyword htmlArg contained onabort onblur oncanplay oncanplaythrough onchange
+syn keyword htmlArg contained onclick oncontextmenu ondblclick ondrag ondragend ondragenter ondragleave ondragover
+syn keyword htmlArg contained ondragstart ondrop ondurationchange onemptied onended onerror onfocus onformchange
+syn keyword htmlArg contained onforminput oninput oninvalid onkeydown onkeypress onkeyup onload onloadeddata
+syn keyword htmlArg contained onloadedmetadata onloadstart onmousedown onmousemove onmouseout onmouseover onmouseup
+syn keyword htmlArg contained onmousewheel onpause onplay onplaying onprogress onratechange onreadystatechange
+syn keyword htmlArg contained onscroll onseeked onseeking onselect onshow onstalled onsubmit onsuspend ontimeupdate
+syn keyword htmlArg contained onvolumechange onwaiting
+" XML Attributes
+syn keyword htmlArg contained xml:lang xml:space xml:base
+" new features
+" <body>
+syn keyword htmlArg contained onafterprint onbeforeprint onbeforeunload onblur onerror onfocus onhashchange onload
+syn keyword htmlArg contained onmessage onoffline ononline onpopstate onredo onresize onstorage onundo onunload
+" <video>, <audio>, <source>, <track>
+syn keyword htmlArg contained autoplay preload controls loop poster media kind charset srclang track
+" <form>, <input>, <button>
+syn keyword htmlArg contained form autocomplete autofocus list min max step
+syn keyword htmlArg contained formaction autofocus formenctype formmethod formtarget formnovalidate
+syn keyword htmlArg contained required placeholder
+" <command>, <details>, <time>
+syn keyword htmlArg contained label icon open datetime pubdate
+
+" Custom Data Attributes
+" http://dev.w3.org/html5/spec/elements.html#embedding-custom-non-visible-data
+syn match htmlArg "\<\(data(\-[a-z]\+)\+\)=" contained
+
+" Microdata
+" http://dev.w3.org/html5/md/
+syn keyword htmlArg contained itemid itemscope itemtype itemprop itemref
View
43 .vim/syntax/javascript/html5.vim
@@ -0,0 +1,43 @@
+" Vim syntax file
+" Language: HTML5 New Stuff
+" Maintainer: othree <othree@gmail.com>
+" URL: http://github.com/othree/html5-syntax.vim
+" Last Change: 2011-05-27
+" License: MIT
+" Changes:
+
+syn keyword javaScriptHtmlEvents onabort onblur oncanplay oncanplaythrough onchange
+syn keyword javaScriptHtmlEvents onclick oncontextmenu ondblclick ondrag ondragend ondragenter ondragleave ondragover
+syn keyword javaScriptHtmlEvents ondragstart ondrop ondurationchange onemptied onended onerror onfocus onformchange
+syn keyword javaScriptHtmlEvents onforminput oninput oninvalid onkeydown onkeypress onkeyup onload onloadeddata
+syn keyword javaScriptHtmlEvents onloadedmetadata onloadstart onmousedown onmousemove onmouseout onmouseover onmouseup
+syn keyword javaScriptHtmlEvents onmousewheel onpause onplay onplaying onprogress onratechange onreadystatechange
+syn keyword javaScriptHtmlEvents onscroll onseeked onseeking onselect onshow onstalled onsubmit onsuspend ontimeupdate
+syn keyword javaScriptHtmlEvents onvolumechange onwaiting
+
+" <body>
+syn keyword javaScriptHtmlEvents onafterprint onbeforeprint onbeforeunload onblur onerror onfocus onhashchange onload
+syn keyword javaScriptHtmlEvents onmessage onoffline ononline onpopstate onredo onresize onstorage onundo onunload
+
+" Media Controller
+syn keyword javaScriptDomElemAttrs buffered seekable duration currentTime paused
+syn keyword javaScriptDomElemAttrs played defaultPlaybackRate playbackRate volume muted
+syn keyword javaScriptDomElemAttrs mediaGroup
+syn keyword javaScriptDomElemFuncs load play pause
+
+syn keyword javaScriptHtmlEvents oncanplay oncanplaythrough ondurationchange onemptied
+syn keyword javaScriptHtmlEvents onloadeddata onloadedmetadata onloadstart onpause onplay onplaying onratechange
+syn keyword javaScriptHtmlEvents ontimeupdate onvolumechange onwaiting
+
+" <audio>/<video>
+syn keyword javaScriptDomElemAttrs error src currentSrc networkState preload buffered readyState seeking
+syn keyword javaScriptDomElemAttrs currentTime initialTime duration startOffsetTime paused defaultPlaybackRate playbackRate played
+syn keyword javaScriptDomElemAttrs seekable ended autoplay loop controls volume muted defaltMuted audioTracks videoTracks textTracks
+syn keyword javaScriptDomElemFuncs load addTextTrack
+
+" <video>
+" syn keyword javaScriptDomElemAttrs width height
+syn keyword javaScriptDomElemAttrs videoWidth videoHeight poster
+
+" drag and drop
+syn keyword javaScriptDomElemAttrs onDragStart onDragEnd onDragEnter onDragLeave onDragOver onDrag onDrop draggable dropzone
View
87 .vim/syntax/scss.vim
@@ -0,0 +1,87 @@
+" Vim syntax file
+" Language: SCSS (Sassy CSS)
+" Author: Daniel Hofstetter (daniel.hofstetter@42dh.com)
+" Inspired by the syntax files for sass and css. Thanks to the authors of
+" those files!
+
+if exists("b:current_syntax")
+ finish
+endif
+
+runtime! syntax/css.vim
+
+syn case ignore
+
+syn region scssDefinition transparent matchgroup=cssBraces start='{' end='}' contains=css.*Attr,css.*Prop,cssComment,cssValue.*,cssColor,cssUrl,cssImportant,cssError,cssStringQ,cssStringQQ,cssFunction,cssUnicodeEscape,scssDefinition,scssComment,scssIdChar,scssClassChar,scssAmpersand,scssVariable,scssInclude,scssExtend,scssDebug,scssWarn,@scssControl,scssInterpolation,scssNestedSelector
+
+syn region scssInterpolation start="#{" end="}" contains=scssVariable
+
+syn match scssVariable "$[[:alnum:]_-]\+" nextgroup=scssVariableAssignment
+syn match scssVariableAssignment ":" contained nextgroup=scssVariableValue
+syn match scssVariableValue ".*;"me=e-1 contained contains=scssVariable,scssOperator,scssDefault "me=e-1 means that the last char of the pattern is not highlighted
+syn match scssMixin "^@mixin" nextgroup=scssMixinName
+syn match scssMixinName " [[:alnum:]_-]\+" contained nextgroup=scssDefinition
+syn match scssInclude "@include" nextgroup=scssMixinName
+syn match scssExtend "@extend .*[;}]"me=e-1 contains=cssTagName,scssIdChar,scssClassChar
+
+syn match scssColor "#[0-9A-Fa-f]\{3\}\>" contained
+syn match scssColor "#[0-9A-Fa-f]\{6\}\>" contained
+
+syn match scssIdChar "#[[:alnum:]_-]\@=" nextgroup=scssId contains=scssColor
+syn match scssId "[[:alnum:]_-]\+" contained
+syn match scssClassChar "\.[[:alnum:]_-]\@=" nextgroup=scssClass
+syn match scssClass "[[:alnum:]_-]\+" contained
+syn match scssAmpersand "&" nextgroup=cssPseudoClass
+
+syn match scssOperator "+" contained
+syn match scssOperator "-" contained
+syn match scssOperator "/" contained
+syn match scssOperator "*" contained
+
+syn match scssNestedSelector "[^/]* {"me=e-1 contained contains=cssTagName,cssAttributeSelector,scssIdChar,scssClassChar,scssAmpersand,scssVariable,scssMixin,@scssControl,scssInterpolation,scssNestedProperty
+syn match scssNestedProperty "[[:alnum:]]\+:"me=e-1 contained
+
+syn match scssDebug "@debug"
+syn match scssWarn "@warn"
+syn match scssDefault "!default" contained
+
+syn match scssIf "@if"
+syn match scssElse "@else"
+syn match scssElseIf "@else if"
+syn match scssWhile "@while"
+syn match scssFor "@for" nextgroup=scssVariable
+syn match scssFrom " from "
+syn match scssTo " to "
+syn match scssThrough " through "
+syn cluster scssControl contains=scssIf,scssElse,scssElseIf,scssWhile,scssFor,scssFrom,scssTo,scssThrough
+
+syn match scssComment "//.*$" contains=@Spell
+
+hi def link scssVariable Identifier
+hi def link scssVariableValue Constant
+hi def link scssMixin PreProc
+hi def link scssMixinName Function
+hi def link scssInclude PreProc
+hi def link scssExtend PreProc
+hi def link scssComment Comment
+hi def link scssColor Constant
+hi def link scssIdChar Special
+hi def link scssClassChar Special
+hi def link scssId Identifier
+hi def link scssClass Identifier
+hi def link scssAmpersand Character
+hi def link scssNestedProperty Type
+hi def link scssDebug Debug
+hi def link scssWarn Debug
+hi def link scssDefault Special
+hi def link scssIf Conditional
+hi def link scssElse Conditional
+hi def link scssElseIf Conditional
+hi def link scssWhile Repeat
+hi def link scssFor Repeat
+hi def link scssFrom Repeat
+hi def link scssTo Repeat
+hi def link scssThrough Repeat
+hi def link scssInterpolation Delimiter
+
+let b:current_syntax = "scss"
View
7 .vimrc
@@ -90,13 +90,6 @@ if has("autocmd")
\ endif
endif " has("autocmd")
-" template detection
-" Template Toolkit
-au BufNewFile,BufRead *.tt setf tt2html
-let b:tt2_syn_tags = '\[% %]'
-" Mako
-au BufNewFile,BufRead *.mako setf mako
-
" trailing whitespace; must define AFTER colorscheme, setf, etc!
hi WhitespaceEOL ctermbg=red guibg=red
match WhitespaceEOL /\s\+\%#\@<!$/

No commit comments for this range

Something went wrong with that request. Please try again.