Achieving complete JavaScript auto-completion within Sublime Text

After setting up Sublime Text on my Windows Vista, I followed the advice from this post to explicitly select

View > Syntax > JavaScript > JavaScript
. However, I am still only seeing suggestions based on my previous typing. I even tried installing the SublimeCodeIntel plug-in, but it did not solve the issue.

Shouldn't I be getting options like "parseFloat" and "parseInt" automatically when I start typing "pars," similar to Chrome developer tools?

Thank you!

Answer №1

When it comes to suggestions, they are primarily derived from the text within the current open file along with any defined snippets or completions (reference). For additional text suggestions, here are some recommendations:

  • Create your own snippets for commonly used operations.
  • Generate your own completions for common words.
  • Incorporate other individuals' snippets via Package Control.
  • Explore additional snippets on github.
  • Utilize Zen coding (accessible through Package Control) or Emmet.
  • There are also various packages that modify how code completion functions. I personally enjoy using SublimeCodeIntel, but feel free to explore alternative solutions mentioned in responses to this query.

On a related note, I highly recommend installing Package control to fully leverage the Sublime community. Some of the options mentioned above require Package control. Additionally, I strongly suggest exploring the tutsplus Sublime tutorial videos, which offer a wealth of information on enhancing your efficiency while using Sublime.

Answer №2

Ternjs is a fresh option for obtaining JS autocompletion.

Enhance Your Sublime Experience

If you're using Sublime Text, the most reliable Tern plugin to consider is 'tern_for_sublime'

There is also an outdated plugin called 'TernJS', which is no longer maintained and can cause performance issues leading to crashes in Sublime Text. It's best to steer clear of it.

Answer №3

One innovative tool worth mentioning is tern.js, a project that shows great promise with plugins available for Sublime Text, Vim, and Emacs. Personally, I have been utilizing TernJS for Sublime and have found the suggestions it provides to be far superior to standard ones:

Tern conducts scans on all .js files within your project. To access support for DOM, nodejs, jQuery, and other functionalities, simply include "libs" in your .sublime-project file:

"ternjs": {
    "exclude": ["wordpress/**", "node_modules/**"],
    "libs": ["browser", "jquery"],
    "plugins": {
        "requirejs": {
            "baseURL": "./js"
        }
    }
}

Answer №4

Explore three different methods

  • Try out the SublimeCodeIntel plug-in

  • Experiment with the CTags plug-in

  • Create a .sublime-completion file by hand

You can find more detailed information on these methods in my blog post:

Answer №5

I recently launched a cutting-edge plugin named JavaScript Enhancements, which is available on the widely-used Package Control. This innovative tool leverages Flow - a javascript static type checker developed by Facebook.

What sets it apart is its remarkable smart javascript autocomplete feature, surpassing my previous plugin, JavaScript Completions. Additionally, it provides real-time error detection, code refactoring capabilities, and a plethora of other functionalities for creating, developing, and managing javascript projects.

To explore all the incredible features it offers, refer to the detailed Wiki!

If you're curious to learn more about this plugin, check out this enlightening article on css-tricks.com: Turn Sublime Text 3 into a JavaScript IDE

Here are some quick snapshots showcasing its functionality:

Answer №6

Currently, in November 2019, the TypeScript plugin from Microsoft meets the needs specified by the original poster: .

Answer №7

Ensure that the code snippets do not contain <tabTrigger> attributes that begin with special characters. If they do, these snippets will be excluded from the autocomplete suggestions. This issue is currently affecting Windows users who are working with various jQuery plugins.

For additional information, please refer to my response in this discussion.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Utilize Javascript ES6 to Sort Through Data in a Table

I require assistance with my project using Material UI and React. There are two key implementations that I need: I am looking to create a filtering system for all rows in each column as shown in the attached image. Additionally, I need a button that can a ...

Concealing the Footer on Mobile Websites in Muse UI When the Keyboard Appears

In this project, I am using vue.js along with muse.ui and only incorporating JavaScript and CSS without the jQuery library. Currently, the footer position always ends up on top of the keyboard whenever an input field is focused. Is there a way to ensure th ...

The $mdSticky feature in AngularJS Material seems to be malfunctioning

It's been a challenge for me to get the md-toolbar to stay in the top position. I decided to create a custom directive using the $mdSticky service in AngularJS. var app=angular.module('app',['ngMaterial']); app.controller(&apos ...

What is the best way to create divs that can close and hide themselves when clicked from inside the div itself?

I have a situation in my code where clicking a link reveals a div, and then the same link must be clicked again to hide it. However, I want to modify this so that any link within the div can also hide it when clicked. I currently have eight divs set up lik ...

"Exploring the possibilities of Ajax in conjunction with Sol

I recently completed a tutorial on Ajax Solr and followed the instructions in step one. Below is the code I wrote: header.php: <script type="text/javascript" src="static/js/ajax-solr/core/Core.js"></script> <script type="text/javascript" s ...

Resolving the issue of encountering 'Failed to load resource: the server responded with a status of 500' in React and express

Attempting to upload an image to a local folder using multer and React resulted in an Internal Server Error. The chrome debugger indicated that the server responded with a status of 500. It seems like the data format being sent to the server side is incorr ...

Retrieving the variable value instead of a reference using Ajax in ASP

After spending nearly two days trying to figure out this code and researching every possible solution, I still haven't been able to get it to work properly. It's likely that I'm implementing it incorrectly or missing something, so I've ...

What are the steps to compile Sencha Touch using sencha-touch.jsb3?

I've been working on modifying the bundled sencha-touch.jsb3 file in an effort to decrease the size of the framework code. Here's what I've done so far: First, I downloaded the Sencha SDK Tools from I then made edits to SenchaTouch/sen ...

Calculating the percentage difference between two dates to accurately represent timeline chart bar data

I am in the process of creating a unique horizontal timeline chart that visually represents the time span of milestones based on their start and finish dates. Each bar on the timeline corresponds to a milestone, and each rectangle behind the bars signifies ...

Tips for effectively interpreting a json string

Trying to extract specific fields from a JSON string and display them on an HTML page, but encountering the following error: SyntaxError: JSON.parse: unexpected character at line 1 column 2 of the JSON data This is the JSON being sent: { "Order0& ...

Having trouble incorporating Duo Web SDK into angular application

We are currently working on incorporating Duo Two-factor authentication into our Angular application. For instructions, you can take a look at the documentation available here. The issue we are encountering is that their JavaScript file searches for an i ...

What could be the reason for the initial response appearing blank?

How can I retrieve all the comments of a post using expressjs with mongodb? I am facing an issue where the first response is always empty. Below is the code snippet: const Post = require("../models/posts"), Comment= require("../model ...

I'm looking for a compiler that can convert R code into JavaScript. Where can I find one

Recently, I have transitioned to coding solely in R after delving into the functionalities of dplyr and ggplot2. Now, I am on the lookout for an R-to-JavaScript compiler that would enable me to create extensions for Google Chrome. Do you know where I can f ...

What could be the reason for my post jQuery Ajax request sending JSON data?

After downloading some code, I came across the following fragment: function FetchCommentsBySessionIDWCF_JSON() { varType = "POST"; varUrl = "service/CommentSessionIDWCFService.svc/FetchCommentsByPost"; varData = ' ...

The form is not being submitted due to issues with JavaScript/JQuery

In the process of creating a JavaScript function that can detect links in text and trigger a JqueryUI dialog box with options like "Yes", "No", and "Cancel", I encountered an issue. While everything seemed to be functioning properly - displaying the dial ...

Issue with nested views in Angular UI-Router not displaying properly

The issue I'm facing is that the template <h1>HELLO</h1> is not loading into the nested ui-view in analysis.client.view.html. However, the ui-view in the analysis.client.view.html file is being loaded successfully. I've tried naming t ...

Is there a maximum size limit for the Fabric.js Path Array?

Has anyone tried plotting a line graph using Fabric.js and encountered issues with the fabric.Path? I've noticed that it stops drawing after 8 segments even though I have attempted different methods like loops and individually coding each segment. co ...

Ajax request results in a 400 error code

Here is the structure of my Ajax call: function Submit() { var objectData = { email: $("#email").val(), firstName: $("#firstName").val(), lastName: $("#lastName").val(), loginMode: $("#login ...

Encountering a problem where updating the selected option in a dropdown does not properly refresh the HTML

I am currently working with a dropdown menu containing countries. Initially, the selected item is set to Ukraine. <select id="country" name="country"> <option value="US">USA</option> <option value="UG">Uganda</option> ...

Vue-moment displaying incorrect time despite timezone setting

Feeling a bit puzzled about my Laravel 8 application. I store time in UTC with timestamp_no_timezone in my PostgreSQL database. When I check the time in the database, it displays today's date with 13:45 as the time. However, when I use vue-moment and ...