Showing posts with label Sublime Text. Show all posts
Showing posts with label Sublime Text. Show all posts
Thursday, July 14, 2016

Angular 2 packages for sublime text 3

Recently, I have written a blog post about Angular 1.5 Packages for the sublime text 3. It was a great hit and lots of people were asking for packages for the Angular 2. So I thought it would be a good idea to write a blog post about it. So let’s get started. We have already learned that how we are going to install packages on the sublime text 3. So Followings are packages that are good for angular 2.

As we all know that Angular2 is built with TypeScript and So first thing we need is a Typescript package.

Typescript:

This plugin is developed by Microsoft it self. You can find more information at their Github Repository.

https://github.com/Microsoft/TypeScript-Sublime-Plugin

There are code editing services provided by this package. You can do lots many things with the package like Rename, Format document i.e where different shortcuts are already defined in the GitHub repository. This package is a must for Angular 2 development.

typescript-package-for-sublime-text

Angular 2 snippets:

This package provides code completion and snippets for the angular 2. It has been imported from John Papa’s code completion for visual studio code.

https://github.com/pjlamb12/st3-ng2-snippets

It provides various snippets and code completion for Angular 2.

angular2-component-sublime-text

Once you type ng2 it will have snippets for various things in Angular 2.

angular-2-snippets-demo-for-sublime-text

That’s it. Hope you like it. Stay tuned for more!.
Share:
Wednesday, July 6, 2016

Angular 1.5 packages for Sublime Text 3

One of my friends was using Sublime text 3 as  editor for the Angular.js application but he was using it without packages so he has to do manually all the things. I suggested him few packages and now he is much more productive than ever. So in the blog post, I’m going to share few tips and packages working with Sublime text.

Installing package on Sublime Text 3:

Sublime Text 3 support packages that make Sublime Text 3 a great choice for any kind of Web Development project. This makes developer’s life easy and developers will be much more productive than ever. Sublime Test does not come with inbuilt package manager but there is a third party package manager called “Package Control”. You can find more information about that on the following location.

 https://packagecontrol.io/

There is instruction provided for installation at the following link.

https://packagecontrol.io/installation

Angular.js 1.5 packages for Sublime text:

JS Hint:
If you have ever work with JavaScript you should be knowing about linter for JavaScript. JS Hint is a JavaScript linter which will look your code and verify that it has proper styling, proper syntax, and error related to JavaScript best practices.

To make sure that this plugin works correctly. You need to install JS Hint installed globally via npm:
npm install -g jshint
Then type Ctrl+ Shift + P and select install package.

package-control-sub-lime-text3

Once you click on Install it will load the extension from the repository and you can install the extension you choose.

image

AngularJS:
This package is developed by Angular UI Team. It contains lots of functionality like
  • Code completion for Inbuilt angular libraries.
  • Angular-Related Snippets.
  • Directive completion of Custom Defined Directives
To Take advantage of this plugin’s syntax highlighting You need to change the view type of your HTML page file View-> Syntax-> HTML(Angular.js).

angular-html-package

And then you can code completion like following.


code-completion-angular-js

JSFormat:
This package helps you format your Javascript and JSON. It is based on JS Beautifier. It highly configurable and you can also define your preferences. There are plenty of options available you can see that on the following link.

https://github.com/beautify-web/js-beautify#options

John Papa’s Angular Snippets for Sublime Text:
John Papa has created great snippets for Angular.js and it’s very useful. He has written a nice blog post about how to install it with Sublime Text. You can refer that from the following link and refer that.

https://johnpapa.net/angularjs-snippets-for-sublime-visual-studio-and-webstorm/

After installing that you can create lots of angular boilerplate code very easily. For example, If you want to create an angular controller just type ngcontroller.

ng-controller-sub-lime-text

Once press tab it will create an angular controller like below. It will also follow best practices written in John Papa’s style guide also.

controller-created-sublime-text

That’s it. Now you should be much more productive with angular and sublime text editor. Hope you like it. Stay tuned for more!!.
Share:

Support this blog-Buy me a coffee

Buy me a coffeeBuy me a coffee
Search This Blog
Subscribe to my blog

  

My Mvp Profile
Follow us on facebook
Blog Archive
Total Pageviews