• Stars
    star
    624
  • Rank 69,549 (Top 2 %)
  • Language
    Vim Script
  • Created over 11 years ago
  • Updated over 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Syntax for JavaScript libraries

javascript-libraries-syntax.vim

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.

Libraries

File Types

Install

Use pathogen or vundle is recommended.

Config

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
  • d3.js: d3
  • tape: tape

Default lib set is: jquery,underscore,backbone,react

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

Todo

  • Support future version of SyntaxComplete

Known Issue

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.

Changes

Version 0.7

  • Add tape

Version 0.6

  • Add Vue.js
  • Add d3.js

Version 0.5

  • Add Ramda

Version 0.4

  • Add React, Flux, Chai, Handlbars
  • Default lib set
  • Bug fix

Version 0.3.6

  • Add Jasmine, AngularUI
  • Update underscore, jQuery

Version 0.3.5

  • Add sugar.js support
  • b:current_syntax to detect current syntax

Version 0.3.4

  • Add $ to iskeyword for jQuery and angular (Issue #4)
  • Support linecomment (Issue #6)
  • Add augularjs HTML custom attribute support

Version 0.3.3

  • No strict mode, better compatibility.

Version 0.3.2

  • Fix coffee script compatible
  • Update jQuery syntax to latest version
  • Support lo-dash
  • jQuery selector update
  • Minor bug fix

Version 0.3.1

  • Fix performance issue

Version 0.3

  • Supports AngularJS, RequireJS
  • Support TypeScript
  • Setup used libraries
  • Better init way

Version 0.2

  • Supports library selection

Version 0.1

  • First release.

Credits

License

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.

More Repositories

1

html5.vim

HTML5 omnicomplete and syntax
Vim Script
932
star
2

markdown-syntax-zhtw

Markdown 語法說明中文版
HTML
749
star
3

eregex.vim

Perl/Ruby style regexp notation for Vim
Vim Script
205
star
4

xml.vim

helps editing xml (and [x]html, sgml, xslt) files
Vim Script
132
star
5

es.next.syntax.vim

ES.Next syntax for Vim
Vim Script
127
star
6

node-r3

r3 binding on node.js
JavaScript
95
star
7

360-panorama

360-panorama for happy designer mini#2
Shell
75
star
8

vim-autocomplpop

Automatic trigger complete popup menu
Vim Script
73
star
9

jspc.vim

JavaScript Parameter Complete
Vim Script
64
star
10

html5-syntax.vim

HTML5 syntax file for vim.
Vim Script
61
star
11

csscomplete.vim

Update the bult-in CSS complete function to latest CSS standard.
Vim Script
61
star
12

taipei-mrt

41
star
13

rc

Backup of my rc files.
Vim Script
22
star
14

smartypants.js

JavaScript port of SmartyPants.pl
JavaScript
22
star
15

tern-coffee

Use a work around way to let tern.js play with CoffeeScript.
JavaScript
19
star
16

jsdoc-syntax.vim

Standalone JSDoc syntax for vim
Vim Script
18
star
17

golang-protobuf-websocket

Golang -> protobuf -> websocket -> protobuf.js
Go
15
star
18

fecompressor.vim

Automatic executing YUI Compressor, Closure Compiler, UglifyJS, SASS, LESS
Makefile
12
star
19

coffee-check.vim

Automatic CoffeeScript syntax validation checker for Vim
Vim Script
12
star
20

jquery.rtl-scroll-type

Detect scrollLeft type under RTL language
JavaScript
11
star
21

fetcher

WHATWG fetch helper, inspired by jQuery.ajax
JavaScript
11
star
22

webidl

WebIDL files from Mozilla
IDL
7
star
23

f2e-courses

JavaScript
7
star
24

vroom-syntax.vim

Vim Syntax for Vroom
Vim Script
6
star
25

javascript-syntax.vim

To improve better support for jsdoc-toolkit and upgrade keyword to current standards.
Vim Script
5
star
26

i18ncsv2json

i18n csv file to json convetor
JavaScript
5
star
27

WritePub

WritePub is a project similar to tiddlyWiki. It helps author can write and publish e-book easily.
JavaScript
5
star
28

css-tidy

The fork.
PHP
5
star
29

tern-webidl

TernJS definition based on WebIDL from Mozilla Firefox
Makefile
4
star
30

tern_for_vim_coffee

Vim Script
4
star
31

git-graph

Collection of Git diagram samples drawed by gitdags
TeX
4
star
32

fonts

4
star
33

othree.github.com

othree's github page
JavaScript
4
star
34

mootools-deferred

Deferred object from jQuery
JavaScript
4
star
35

immutable-quadtree-js

Immutable Quadtree in JS
JavaScript
3
star
36

tern-fetch

https://www.npmjs.com/package/tern-fetch
3
star
37

pinboardto

Sync process from pinboard to (twitter, telegram)
Python
3
star
38

ofrontend

Web Front-End News Broadcast Service
3
star
39

javascript-on-vim-slide

COSCUP 2013 talk
Vim Script
3
star
40

simple-search-query

Simple logic search query matcher
JavaScript
3
star
41

rison.dev

Rison Playground
JavaScript
3
star
42

robust-video

HTML5 video have various implement in different platform. With different behaviors. This library trying to sync it.
JavaScript
3
star
43

blog

My blog files
HTML
2
star
44

wtoj

WebIDL to JSON string command
JavaScript
2
star
45

svg-properties-syntax.vim

SVG style property syntax highlight for editing CSS file using Vim
Vim Script
2
star
46

flickr-share-template

Template based Flickr share photo function
JavaScript
2
star
47

flask-command-websocket

Use Flask execute command on server and live update result via Web Socket
Python
2
star
48

vim-license

A web app to help generate Vim License text for your project.
Svelte
2
star
49

webidl-to-tern-def

Translate WebIDL to TernJS def
JavaScript
2
star
50

foxmosa-telegram-bot

Go
2
star
51

eslint-plugin-pep8-blank-lines

An ESLint blank line rule supports rule for different level. Inspired by PEP8.
JavaScript
2
star
52

spider-screenshot

Web spider and take screenshot
JavaScript
2
star
53

es6-skeleton

ES6 project seed
JavaScript
2
star
54

css-prefers-color-test

HTML
1
star
55

web-component-test

JavaScript
1
star
56

sandbox-hogan

Hogan in sandbox, simple interface design
JavaScript
1
star
57

dpr-cookie

Write Device Pixel Ratio to Cookie
JavaScript
1
star
58

webidl-to-vim-syntax

Vim Script
1
star
59

hexagons

Hexagons lib for js based on Red Blob Games's impl, “odd-r” horizontal layout
JavaScript
1
star
60

scroll3quarter.vim

Vim Script
1
star
61

Pixnet-Image-Uploader-Extension

Upload webpage image to Pixnet album by context menu
JavaScript
1
star
62

eslint-config-othree-style

semistandard + trailing comma on multiline
JavaScript
1
star
63

cn-code-mirrors

Code repository mirrors in China
1
star
64

redmine_zenedit_pandoc_help

HTML
1
star
65

redmine-to-slack

Redmine issue feed to slack channel
Go
1
star
66

rails-practice-forum

Ruby
1
star
67

require-demo

JavaScript
1
star
68

vim-syntax-enhanced

Vim Script
1
star
69

po-writer

A simple gettext Po file writer.
JavaScript
1
star
70

json-blue

Collection of JSON stuff
HTML
1
star
71

redmine_pandoc_formatter

A redmine plugin for supporting Pandoc's Markdown as a wiki format
Ruby
1
star
72

webidl-and-mdn

Mapping webidl to mdn document
JavaScript
1
star
73

babel-es6-webpack-starter-kit

JavaScript
1
star
74

gulp-attr-remover

Remove element attribute if predicate is true
JavaScript
1
star
75

eslint-plugin-no-parameter-e

Not allow parameter named e, confused with event and error
JavaScript
1
star