Categories: Javascript

AngularJS – How to Code Quickly with Sublime Text Editor

After working on AngularJS for sometime now, I was looking for an editor which helps to code efficiently and effectively with AngularJS. This is when I discovered Sublime Text Editor. This article presents tips on what needs to be done to write AngularJS code with Sublime Text Editor.

I have to confess that it has been a fulfilling experience to code in AngularJS with Sublime once installation and configuration is done. I was able to complete my AngularJS hello world program within few minutes. Trust me, it is worth your time. Let me know what you think about it.


Do the following and enjoy the Angular ride much more than ever:

  • Download and install Sublime Text Editor from http://www.sublimetext.com/.
  • Download Angular Sublime package (zip file) developed by Angular-UI team from this page: https://github.com/angular-ui/AngularJS-sublime-package. This page consists of greater details on further customizing the Sublime for AngularJS.
  • Unzip and name the root package (angularjs-sublime-packager-master) as “AngularJS”. Make sure you have all the files just within this package.
  • Copy AngularJS folder.
  • Open Sublime Text Editor and paste “AngularJS” folder by opening “Preferences > Browse Packages”
  • Paste some of the following configuration (JSON format) by opening the “Preferences > Settings – User”. The file would look like following:
    // Settings in here override those in "Default/Preferences.sublime-settings", and
    // are overridden in turn by file type specific settings.
    {
     "auto_complete_selector": "source - comment, meta.tag - punctuation.definition.tag.begin",
     "auto_complete_triggers":
            [
                {
                "characters": "ng-controller=\"*",
                "selector": "punctuation.definition.string"
                }
            ]
    }
  • Close Sublime and open it again. And, try your AngularJS hello world program. You could check the preferences related with AngularJS and customize appropriately as shown in following screenshot.

    Sublime AngularJS Preferences


Ajitesh Kumar

I have been recently working in the area of Data analytics including Data Science and Machine Learning / Deep Learning. I am also passionate about different technologies including programming languages such as Java/JEE, Javascript, Python, R, Julia, etc, and technologies such as Blockchain, mobile computing, cloud-native technologies, application security, cloud computing platforms, big data, etc. For latest updates and blogs, follow us on Twitter. I would love to connect with you on Linkedin. Check out my latest book titled as First Principles Thinking: Building winning products using first principles thinking. Check out my other blog, Revive-n-Thrive.com

View Comments

  • Nice post. Very useful.
    Sorry, but I could not understand one of the points in your post.

    That is:
    "Paste some of the following configuration (JSON format) by opening the “Preferences > Settings – User”.

    • There has to be an escape character before double quote for sublime to understand the auto triggering of angular controller as shown below. This will take care of issue while saving the settings.
      "characters": "ng-controller=\"*",

Share
Published by
Ajitesh Kumar
Tags: angularjs

Recent Posts

Feature Engineering in Machine Learning: Python Examples

Last updated: 3rd May, 2024 Have you ever wondered why some machine learning models perform…

3 days ago

Feature Selection vs Feature Extraction: Machine Learning

Last updated: 2nd May, 2024 The success of machine learning models often depends on the…

4 days ago

Model Selection by Evaluating Bias & Variance: Example

When working on a machine learning project, one of the key challenges faced by data…

4 days ago

Bias-Variance Trade-off in Machine Learning: Examples

Last updated: 1st May, 2024 The bias-variance trade-off is a fundamental concept in machine learning…

5 days ago

Mean Squared Error vs Cross Entropy Loss Function

Last updated: 1st May, 2024 As a data scientist, understanding the nuances of various cost…

5 days ago

Cross Entropy Loss Explained with Python Examples

Last updated: 1st May, 2024 In this post, you will learn the concepts related to…

5 days ago