Giter Club home page Giter Club logo

ts-comint's Introduction

ts-comint.el (v0.0.1)

Run a TypeScript interpreter in an inferior process window

This repo is directly forked from js-comint to support TypeScript instead.

Prerequisites

ts-comint depends on the following components:

To use ts-comint these components must be installed on your system.

To install these run the following commands, or whatever equivalents your system provides:

apt-get install node
npm install -g tsun

Installation

From MELPA

To install it all you need to do is issue the following command:

M-x package-install<RET>ts-comint

From Source

You can also download the source and use that directly.

To do that, place the ts-comint.el-file somewhere (say $HOME/mylisp/) and then insert the following code in your $HOME/.emacs.d/init.el-file:

(add-to-list 'load-path "~/mylisp/")
(require 'ts-comint)

Usage

After installation, do M-x run-ts to create a comint buffer with the Typescript interpreter.

You can add the following couple of lines to your .emacs to take advantage of cool key bindings for sending things to the Typescript interpreter inside of typescript-mode.

(add-hook 'typescript-mode-hook
          (lambda ()
            (local-set-key (kbd "C-x C-e") 'ts-send-last-sexp)
            (local-set-key (kbd "C-M-x") 'ts-send-last-sexp-and-go)
            (local-set-key (kbd "C-c b") 'ts-send-buffer)
            (local-set-key (kbd "C-c C-b") 'ts-send-buffer-and-go)
            (local-set-key (kbd "C-c l") 'ts-load-file-and-go)))

repl-toggle compatibility

ts-comint is ~repl-toggle~ compatible. To configure, add run-ts for typescript-mode to rtog/mode-repl-alist like so:

;; when configuring all repl toggle mapping
(setq rtog/mode-repl-alist '((typescript-mode . run-ts)))
;; or later
(push '(typescript-mode . run-ts) rtog/mode-repl-alist)

ts-comint's People

Contributors

josteink avatar stefano-m avatar syohex avatar waymondo avatar bremner avatar wyuenho avatar asmundg avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.