Skip to content
This repository has been archived by the owner on Nov 12, 2017. It is now read-only.

katspaugh/tj-mode

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

tj-mode

Build Status NPM version MELPA badge

Highlight JavaScript with Tern.

Features

Syntactic Highlighting

  • Keywords + this
  • Variable declarations and function arguments
  • Function names (incl. variables and object properties)
  • Primitive literals (strings, numbers, booleans etc)
  • Comments (inline and block)

Extra Features 💥

  • Syntax errors
  • Trailing commas in array and object literals
  • Missing semicolons

Emacs Mode

tj-mode is a major mode. Apart from syntax highligting, the mode provides:

  • Syntactic beginning-of-defun and end-of-defun
  • Automatic (idle) highlighting of references to the variable at point
  • Bouncing indentation (which is borrowed from the excellent js2-mode).

Other Editors

Contributions of other editor plugins are very welcome.

How to Install

Install like any other Tern plugin. The Tern plugin is called tern-highlight, and it's on npm, so:

npm install -g tern-highlight

You also need to enable the plugin in the .tern-project file in the root of your project directory:

{
    "plugins": {
        "highlight": {}
    }
}

How to Install the Emacs Plugin

The Emacs package is available on MELPA. So M-x package-install RET tj-mode .

(add-to-list 'auto-mode-alist '("\\.js\\'" . tj-mode))

Tests

See here

P.S.

This package is not written by TJ Holowaychuk 😄

About

Highlight JavaScript with Tern

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published