Git Product home page Git Product logo

typescript-vim's Introduction

Typescript Syntax for Vim

Syntax file and compiler settings for TypeScript. The syntax file is taken from this blog post.

Install

The simplest way to install is via a Vim add-in manager such as Plug, Vundle or Pathogen.

If you want to install manually then you need to copy the files from this repository into your vim path, see the vim docs for :help runtimepath for more information. This might be as simple as copying the files and directories to ~/.vim/ but it depends on your Vim install and operating system.

Indenting

This plugin used to include some indent settings but they were not very good. There are better options around such as vim-js-indent that you should install as well.

Usage

Once the files are installed the syntax highlighting and compiler settings will be automatically enabled anytime you edit a .ts file.

Compiler settings

The compiler settings enable you to call the tsc compiler directly from Vim and display any errors or warnings in Vim's QuickFix window.

To run the compiler, enter :make, this will run tsc against the last saved version of your currently edited file.

Note, you can use something like this in your .vimrc to make the QuickFix window automatically appear if :make has any errors.

autocmd QuickFixCmdPost [^l]* nested cwindow
autocmd QuickFixCmdPost    l* nested lwindow

Obligatory screenshot

typescript-vim's People

Contributors

bx2 avatar dotdash avatar isaachess avatar leafgarland avatar maxbrunsfeld avatar musically-ut avatar shihshen avatar shiwano 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.