Victor Leung
Victor Leung
BlogAI SolutionAlphaAlgoFlower shopFX CombineIEESushi ClassifierWealth Agile

How to customize Sublime Text default Auto-complete

December 22, 2014

I use Sublime text 3 everyday, especially the JavaScript autocomplete feature.

For the if-statement, the default completion popup has an unnecessary semicolon at the end.

    if (true) {};

Using JSHint, it gives me an error for most of the code I written.

It is counterproductive to manually delete it everytime.

Here is a solution for this problem:

  1. Go to **Preferences **→ **Browse Packages **to open the Sublime Text Folder.
  2. Find the folder called JavaScript (if it doesn’t exist, create one).
  3. In the folder, open **if.sublime-snippet (**if it doesn’t exist, create one)
  4. Delete the semi-colon so your snippet now looks like this:
    <snippet> <content><![CDATA[if (${1:true}) {${0:$TM_SELECTED_TEXT}}]]></content> <tabTrigger>if</tabTrigger> <scope>source.js</scope> <description>if</description> </snippet>

About Victor Leung

Software development professional with expertise in application architecture, cloud solutions deployment, and financial products development. Possess a Master's degree in Computer Science and an MBA in Finance. Highly skilled in AWS (Certified Solutions Architect, Developer and SysOps Administrator), GCP (Professional Cloud Architect), Microsoft Azure, Kubernetes(CKA, CKAD, CKS, KCNA), and Scrum(PSM, PSPO) methodologies.

Happy to connect
LinkedIn
Github
Twitter
@victorleungtw

Continuous improvement

Copyright © victorleungtw.com 2023.