Skip to content

Commit b67212f

Browse files
author
othree_kao
committed
Add angularjs custom html attribute
1 parent cbbc894 commit b67212f

3 files changed

Lines changed: 30 additions & 2 deletions

File tree

after/syntax/html.vim

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
" Vim plugin file
2+
" Language:
3+
" Maintainer: othree <othree@gmail.com>
4+
" Last Change: 2013/07/15
5+
" Version: 0.5
6+
" URL: https://github.com/othree/javascript-libraries-syntax.vim
7+
8+
if &filetype == 'html'
9+
call jslibsyntax#load()
10+
endif

autoload/jslibsyntax.vim

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,9 @@ function! jslibsyntax#load()
3939
endif
4040
let index = index + 1
4141
endwhile
42-
if loaded > 0
43-
exe('source '.s:path.'/syntax/postprocess.'.&filetype.'.vim')
42+
let fn = s:path.'/syntax/postprocess.'.&filetype.'.vim'
43+
if loaded > 0 && filereadable(fn)
44+
exe('source '.fn)
4445
endif
4546
endfunction
4647

autoload/syntax/angularjs.html.vim

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
" Vim syntax file
2+
" Language: AngularJS for javascript
3+
" Maintainer: othree <othree@gmail.com>
4+
" Last Change: 2013/04/21
5+
" Version: 1.1.13.1
6+
" URL: http://angularjs.org/
7+
8+
syntax match htmlArg contained "\<ng-\(app\|bind\|bind-html-unsafe\|bind-template\|change\|checked\|class\)\>"
9+
syntax match htmlArg contained "\<ng-\(class-even\|class-odd\|click\|cloak\|controller\|csp\|dblclick\)\>"
10+
syntax match htmlArg contained "\<ng-\(disable\|form\|hide\|href\|include\|init\|keydown\|keypress\)\>"
11+
syntax match htmlArg contained "\<ng-\(key-up\|list\|model\|mousedown\|mouseenter\|mouseleave\|mousemove\)\>"
12+
syntax match htmlArg contained "\<ng-\(mouseover\|mouseup\|multiple\|non-bindable\|pluralize\|readonly\|\)\>"
13+
syntax match htmlArg contained "\<ng-\(repeat\|selected\|show\|src\|style\|submit\|switch\|transclude\)\>"
14+
syntax keyword htmlArg contained expression
15+
16+
17+

0 commit comments

Comments
 (0)