Sublime Text, Vi, Emacs: TypeScript enabled!
TypeScript is a new open and interoperable language for application scale JavaScript development created by Microsoft and released as open source on CodePlex. You can learn about this typed superset of JavaScript that compiles to plain JavaScript reading Soma’s blog.
At Microsoft Open Technologies, Inc. we are thrilled that the discussion is now open with the community on the language specification: you can play (or even better start developing with TypeScript) with the bits, read the specification and provide your feedback on the discussion forum. We also wanted to make it possible for developers to use their favorite editor to write TypeScript code, in addition to the TypeScript online playground and the Visual Studio plugin.
Below you will find sample syntax files for Sublime Text, Vi and Emacs that will add syntax highlighting to the files with a .ts extension. We want to hear from you on where you think we should post these files for you to be able to optimize them and help us make your TypeScript programming an even greater experience, so please comment on this post or send us a message.
TypeScript support for Sublime Text | TypeScript support for Emacs | TypeScript support for Vim |
Olivier Bloch
Senior Technical Evangelist
Microsoft Open Technologies, Inc.
Comments
Anonymous
October 01, 2012
For Sublime you might want to make package available for wbond.net/.../package_controlAnonymous
October 01, 2012
SublimeText: It would be wonderful if you guys could host a) on GitHub for community contributions; and b) in Sublime's Package Control. Any plan to release a full-featured Sublime Package?Anonymous
October 01, 2012
I'm sure Sublime Text users would love it if you set up the TypeScript language file to be in the default Package Control channel. The simplest way is if it is hosted on GitHub (wbond.net/.../package_developers), but it is also possible to use Package Control to generate a .sublime-package file and host it plus a packages.json file (github.com/.../example-packages.json) on any public URL. Feel free to shoot me an email or tweet (@wbond) if you have any questions.Anonymous
October 01, 2012
The comment has been removedAnonymous
October 01, 2012
The comment has been removedAnonymous
October 01, 2012
Very interesting and it's great how open you guys are. Given the traction sublime has it'd be interesting to see if people take advantage of TS to add features like refactoring (something like github.com/.../SublimeRope).Anonymous
October 01, 2012
It seems that in Sublime, method names do not get highlighted if there is an argument specified. Also, I think this is really cool. I didn't expect it to be supported in anything except Visual Studio. So, I can dig it! So far, seems like a great alternative to coffeescript.Anonymous
October 01, 2012
awesome work! thanks for the Sublime plugin, but it looks like it will also work for TextMate (which is a big plus as well).Anonymous
October 01, 2012
And WebMatrix? =/Anonymous
October 01, 2012
Github, please!!!Anonymous
October 01, 2012
What about NetBeans support?Anonymous
October 01, 2012
+1 for Sublime Package Control. Thanks for the Sublime Text extension. It would be super awesome if MS would release some sort of static analysis libraries on an open source basis (in JS/TS, preferably!), and from there the community could go about integrating them with common editors.Anonymous
October 01, 2012
in addition to Eran's question: Are there plans to support the Eclipse-Maven toolchain? In order to be able to integrate it into a continuous integration environment typically used in our organization for enterprise scale application development, both an Eclipse plugin as well as Maven build plugins are required.Anonymous
October 01, 2012
Cool, thanks for supporting Sublime! Would be cool, as others mentioned, to include it into Sublime package manager (wbond)! Thanks!Anonymous
October 01, 2012
Any plans for netbeans?Anonymous
October 01, 2012
I am not sure why not this for webmatrix. do you ownself don't believe that webmatix and expression studio or marketing guys is just died for webmatrix and expression studio/Anonymous
October 01, 2012
installer should install some help file or just link to a help website.Anonymous
October 01, 2012
Looking forward to see a Netbeans plugin.Anonymous
October 01, 2012
For Vim you could upload to http://www.vim.org/scripts, or make it available as a git repository somewhere (as an example I have created one at github.com/.../typescript-vim and added simple filetype detection). With either of those options then the syntax can easily be added using Vim package managers like Pathogen or Vundle.Anonymous
October 01, 2012
A zip file? srsly?Anonymous
October 02, 2012
Thanks all for your comments and suggestions. We are looking into the next steps and will definitively let you know rapidly what we will do based on your input. Stay tuned and keep the good feedback and suggestions coming, this helps a lot.
- Olivier
Anonymous
October 02, 2012
Could you provide VS2010 support?Anonymous
October 02, 2012
+1 for Eclipse PluginAnonymous
October 02, 2012
+1 for Visual Studio support, but Notepad++ would also be cool. :)Anonymous
October 02, 2012
Great to see that there is Sublime Text 2 Support, I love this editor, as the other commenters said, please publish it through Package Control (wbond). Anyway, I'll give it a try these days.Anonymous
October 03, 2012
It would be nice if you supported people stuck on Windows XP with VS2010 or VS2k8. As with the non-Microsoft editors, just syntax highlighting would do...Anonymous
October 03, 2012
Jetbrains WebstormAnonymous
October 05, 2012
Could you provide VS2008 support?Anonymous
October 05, 2012
Are the copyright headers from typescript.el correct? "Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. [...] This file is part of GNU Emacs." plus.google.com/.../3P9dFY9jUxuAnonymous
October 06, 2012
Anyone have a Sublime build system configuration? I have node, and the TypeScript node package installed on Windows 7. This does not work: { "cmd": ["node", "tsc", "$file"], "file_regex": "(..ts?)\s(([0-9]+),([0-9]+)):\s(...?)$", "path":"C:\Windows\system32\cmd.exe", "shell": false }Anonymous
October 08, 2012
Yes please add a Package Control version for Sublime Text.Anonymous
October 16, 2012
Please build an Eclipse plug-in and a TextMate package. Thanks!Anonymous
October 17, 2012
Where is the emacs file? It's not in the zip.Anonymous
October 19, 2012
So the emacs zip hasn't been updated in weeks; are we going to get an emacs version again? 'The file is temporarely unvailable. We will return soon with an updated version.' The spelling of temporarily, and unavailable is incorrect as well....Anonymous
October 19, 2012
Hi all The Emacs support is still in the works and we hope to be able to bring it back rapidly. Sorry for the delay and thanks for your interest and feedback! We are also looking into the best way to deliver these extensions for you to be able to get the most out of them. Stay tuned.
- Olivier
Anonymous
October 20, 2012
Thanks for the quick reply, hope to get the emacs version soon!Anonymous
October 22, 2012
The README-vim-typescript.txt should say to append these to the $HOME_vimrc file syntax on filetype on au BufNewFile,BufRead *.ts set filetype=typescript Or modifying the $VIMRUNTIMEfiletype.vim to recognize the *.ts extension.Anonymous
October 22, 2012
@Eljay Thanks for the tip. I will look into this.
- Olivier
Anonymous
October 25, 2012
what do I do with the sublime file to get it to work?Anonymous
October 31, 2012
It's really unfortunate that the decision was made not to support VS2010. Now instead of being able to learn and begin using TypeScript, a large number of developers are cut off from it until their organizations finally make the decision to allow their people to migrate to VS2012. Really unfortunate!Anonymous
November 02, 2012
Here's another option, use C# that you already know, that works in Visual Studio 2005, 2008, 2010 and 2012, and convert it JavaScript during build, now that's interoperability for you! ;-) http://sharpkit.net/Live.aspxAnonymous
November 08, 2012
Sublime text plugin doesn't work as is on Linux. You need to rename the file in the zip to typeScript.tmLanguage (Linux is case sensitive!)Anonymous
November 09, 2012
can anyone tell if and when we'll have the netbeans plugin?Anonymous
November 14, 2012
@Ville Vainio Thanks for the heads up. I have fixed the Sublime Text plug in changing the extension of the file to tmLanguage with a capital "L".
- Olivier
Anonymous
November 14, 2012
Olivier, Thanks for providing these plugins. It helps TypeScript to fit in my workflow pretty smoothly. This article was very useful for me on how to set up a new build system within Sublime Text 2. Pasting here in case others can use it: www.andrewrowland.com/.../typescript-sublime-text-integrationAnonymous
November 16, 2012
I've gathered the syntax highlighting for sublime text 2 here with a build system (based on examples from others) feel free to comment and improve it: github.com/.../sublime-text-2-typescriptAnonymous
November 16, 2012
@Eran Medan Thanks a lot, this is great!
- Olivier
Anonymous
November 25, 2012
I added the [TypeScript syntax highlighting][1] to Packagist[2] for SublimeText 2. Now it's as easy as doing: "Cmd+Shift+P, Install Package, TypeScript" [1]: github.com/.../sublime-typescript [2]: github.com/.../810 As for building, I'd recommend using grunt.js instead, but it looks like someone has already started work for the build system before me.Anonymous
November 26, 2012
@Eric Great job! I'll make sure to follow up with you offline to see how we can work together on maintaining this project. -OlivierAnonymous
December 05, 2012
Installing with Sublime Package ControlAnonymous
January 22, 2013
+1 for WebStormAnonymous
February 12, 2013
+1 for Eclipse plugin and Maven build plugin Great job!Anonymous
February 27, 2013
How can we use Database in typescript?Anonymous
February 28, 2013
@Nitin TypeScript is JavaScript, therefore you can access Databases the same way you do with JavaScript code. There is a sample that shows typed usage of MongoDB for server-side database access in the samples here: typescript.codeplex.com/.../ac38ce9e29b3
- Olivier
- Anonymous
August 25, 2013
The comment has been removed - Anonymous
August 27, 2013
@bunnyhero We are working on updating all these extensions. You should hear from us soon on our new blog: msopentech.com/blog
- Olivier
- Anonymous
December 20, 2013
Create for Notepad++ please