Syntax file for JavaScript libraries. Supports JavaScript libraries I am using (patches welcome). Should work well with other JavaScript syntax files. SyntaxComplete also works well on all supported languages.
- jQuery
- underscore.js
- lo-dash
- Backbone.js
- prelude.ls
- AngularJS
- AngularUI
- AngularUI Router
- React
- Flux
- RequireJS
- Sugar.js
- Jasmine
- Chai
- Handlebars
- Ramda
- Vue
- JavaScript
- CoffeeScript
- LiveScript
- TypeScript
Use pathogen or vundle is recommended.
You can use g:used_javascript_libs to setup used libraries, ex:
let g:used_javascript_libs = 'underscore,backbone'
Support libs id:
- jQuery: jquery
- underscore.js: underscore
- Lo-Dash: underscore
- Backbone.js: backbone
- prelude.ls: prelude
- AngularJS: angularjs
- AngularUI: angularui
- AngularUI Router: angularuirouter
- React: react
- Flux: flux
- RequireJS: requirejs
- Sugar.js: sugar
- Jasmine: jasmine
- Chai: chai
- Handlebars: handlebars
- Ramda: ramda
- Vue.js: vue
Default lib set is: jquery,underscore,backbone
You can use local vimrc to setup libraries used in project. Sample code for local vimrc:
autocmd BufReadPre *.js let b:javascript_lib_use_jquery = 1
autocmd BufReadPre *.js let b:javascript_lib_use_underscore = 1
autocmd BufReadPre *.js let b:javascript_lib_use_backbone = 1
autocmd BufReadPre *.js let b:javascript_lib_use_prelude = 0
autocmd BufReadPre *.js let b:javascript_lib_use_angularjs = 0
- Support future version of SyntaxComplete
SyntaxComplete only accept groups with filetype prefixed. For example, 'javascript' files. Only keywords in groups which's name matches /javascript.*/ will be available. So to make it possible to use SyntaxComplete on CoffeeScript, LiveScript and other compile to JavaScript languages. We must redefine all syntax many times, with different name prefix. SyntaxComplete might have new feature to support a user define pattern for group name to include. All repeat defination will be removed when SyntaxComplete supports this feature.
- Add Vue.js
- Add Ramda
- Add React, Flux, Chai, Handlbars
- Default lib set
- Bug fix
- Add Jasmine, AngularUI
- Update underscore, jQuery
- Add sugar.js support
- b:current_syntax to detect current syntax
- Add $ to iskeyword for jQuery and angular (Issue #4)
- Support linecomment (Issue #6)
- Add augularjs HTML custom attribute support
- No strict mode, better compatibility.
- Fix coffee script compatible
- Update jQuery syntax to latest version
- Support lo-dash
- jQuery selector update
- Minor bug fix
- Fix performance issue
- Supports AngularJS, RequireJS
- Support TypeScript
- Setup used libraries
- Better init way
- Supports library selection
- First release.
- Bruno Michel, jQuery : Syntax file for jQuery
- Peter Renström, for summarize and explain AngularJS stuff.
- Benedict Aas, for summarize Ramda stuff
Copyright (c) 2013 Wei-Ko Kao
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.