• Stars
    star
    639
  • Rank 70,436 (Top 2 %)
  • Language
    Vim Script
  • Created over 9 years ago
  • Updated over 1 year ago

Reviews

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

Repository Details

Yet Another TypeScript Syntax: The most advanced TypeScript Syntax Highlighting in Vim

YATS: Yet Another TypeScript Syntax

Build Status

screenshot

Yet Another TypeScript Syntax file for Vim, adapted from YAJS. Key differences:

  • Exuberant Highlighting. The most elaborate or byzatine syntax highlighting for TypeScript.
  • Bundled with snippets for UltiSnips!
  • Builtin Support for tagbar!
  • Use 'typescript' as group name's prefix, not 'typeScript' nor 'TypeScript'. Works great with SyntaxComplete.
  • Inherit Web API and DOM keywords from YAJS
  • Syntax fold. Fold long code block, semantically!
  • Remove old, unused syntax definitions.

Config

  • let g:yats_host_keyword = 1: configure yats to highlight host specific keywords like addEventListener. Default is 1. Set it 0 to turn off highlighting.

  • Note: set re=0 explicitly in your vimrc. Old regexp engine will incur performance issues for yats and old engine is usually turned on by other plugins.

Concealing Characters

You can customize concealing characters, if your font provides the glyph you want, by defining one or more of the following variables:

let g:typescript_conceal_function             = "Æ’"
let g:typescript_conceal_null                 = "ø"
let g:typescript_conceal_undefined            = "¿"
let g:typescript_conceal_this                 = "@"
let g:typescript_conceal_return               = "⇚"
let g:typescript_conceal_prototype            = "¶"
let g:typescript_conceal_super                = "Ω"

You can enable concealing within VIM with:

set conceallevel=1

OR if you wish to toggle concealing you may wish to bind a command such as the following which will map <LEADER>l (leader is usually the \ key) to toggling conceal mode:

map <leader>l :exec &conceallevel ? "set conceallevel=0" : "set conceallevel=1"<CR>

Credits

  • othree, whose YAJS is the most up-to-date js syntax for Vim
  • Jose Elera, Enhanced Javascript syntax
  • Zhao Yi, Claudio Fleiner, Scott Shattuck (This file is based on their hard work)
  • gumnos (From the #vim IRC Channel in Freenode) (Who helped me figured out the crazy Vim Regexes)

License

The same as Vim

More Repositories

1

vue-compiler

Vue's template compiler reimplemented in Rust!
Rust
1,004
star
2

av-ts

A modern, type-safe, idiomatic Vue binding library
TypeScript
218
star
3

typescript-repl

An upgraded TypeScript REPL
TypeScript
209
star
4

vue-ts-loader

Type-check your script in your vue-loader
JavaScript
90
star
5

vue-advanced-programming

A collection of tricks in Vue
JavaScript
82
star
6

kilimanjaro

typed vuex 2.0
TypeScript
62
star
7

gulp-progeny

Make Gulp Fast Again
CoffeeScript
53
star
8

vue-ts-example

An example repo for Vue2.0 and TypeScript2.0
Vue
39
star
9

vim-worksheet

Worksheet for Vim
Python
34
star
10

ts-css-plugin

TypeScript
28
star
11

compositional-xstate

XState's hook/compositional API
TypeScript
20
star
12

Pat-Mat

pattern match in Javascript
CoffeeScript
7
star
13

atom-vue

vue-language-server demo for Atom
JavaScript
6
star
14

vivio

TypeScript
6
star
15

awesome-tree-sitter

A curated list of tree-sitter resources.
6
star
16

av-ts-template

av-ts template for vue-cli
JavaScript
6
star
17

herringtondarkholme.github.io

HTML
4
star
18

jedi-syntax

vim syntax for jedi lang
Vim Script
4
star
19

JS-regex

A collection of useful RegExp
JavaScript
3
star
20

Python-SignatureSal

Python implementation of signature saliency
Python
2
star
21

gulp-jedi

Compile jedi templates to PHP
PHP
2
star
22

angry.im

prototype
TypeScript
2
star
23

rs-perf-talk

Slides for Rust performance in JavaScript land
Vue
2
star
24

lovelive

mock Google+ Valentine effect
JavaScript
2
star
25

js-crush

Vue
2
star
26

diana

TypeScript
1
star
27

Vimfile

JavaScript
1
star
28

scalatra-activerecord-boilerplate

template repo
Scala
1
star
29

byon

Angular2 demo
HTML
1
star
30

paranoid-router

typed router for vue
1
star
31

ast-grep

placeholder
HTML
1
star
32

HerringtonDarkholme

1
star
33

sponsors

Appreciate all my sponsors for helping me make web faster!
TypeScript
1
star
34

syn-checker

syn-checker
JavaScript
1
star
35

ImgSearchGesture

JavaScript
1
star
36

SharePicToGp

This repo is under construction !
CoffeeScript
1
star
37

rectangular

TypeScript
1
star
38

printheart

Happy Birthday!
CSS
1
star
39

Vim--Monokai-Terminal

Terminal Color Palette for Monokai Theme
Vim Script
1
star
40

android-example

scala example
Scala
1
star