Recently I start to work a lot with JS and I often have to edit files with extensions like .js and .jsx. I am using Sublime Text 3 (Build 3176) to do the editing work.
Problem
Every file and folder on your Mac has a configurable set of permissions. Permissions control three types of access: reading, writing, and executing. You can mix and match any of the types to grant seven levels of access, as illustrated below. Now, to fix them, we must delete them — Clean up these Mac preference files makes the app create a new, default preference file. This can help your app(s) operate correctly again. So, today, we'll go over two ways on how to remove system preference files: the easy way (with a utility), and the hard way (manually). To choose which apps launch which types of media or link by the type of file, select the “Choose Default Apps by File Type” option. Here you’ll be greeted by a two-tiered menu, the first containing every file type that Windows 10 is designed to handle, and the second with the list of apps you currently have installed on the machine.
As I am working with these files more and more frequently, I want to change the default application for opening the two types of file above (and indeed any other related files like .html) to Sublime Text 3. However, I have found that the traditional methods of doing so (i.e. choosing the application preference by Right click -> Open with -> Choose another app -> Choose Sublime Text -> Click 'Always use this app to open .js files, as well as going to the Properties and then doing the same, also tried using the Default App setting in Control Panel (default app by file type)) didn't work. The default app was still set to something called 'Microsoft (R) Console Based Script Host'.
Other methods attempted
How to Change Default Font in Word for Mac Changing the default font in any template means that the font is used in every new document that is based on that template. For example, the default font for new blank documents is based on the Normal template.
How to change the default Mac app for specific file types. Right-click on a file that uses the file type you'd like to change the default for. For example, one with a.jpg extension (a photo). Click on Get Info in the pop-up. Click Open With if the section isn't already expanded. Click the dropdown and choose an app.
After reviewing several websites I also tried to modify the Registry. Specifically, I navigated to 'HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionExplorerFileExts.jsOpenWithList'. There I saw several entries as following:
Name 'a' -> sublime_text.exe Free text to speech softawre for mac.
I attempted to delete an entry containing something called CScript.exe, and remained an entry of name 'a' -> data 'sublime_text.exe', and 'MRUList' -> 'a'. However, when I switched to another entry (for example the entry for .html) and go back to that one (.js entry) again, the setting was automatically reverted to the one as above. I also tried to change the value for 'MRUList' to 'ab' and it was still like this.
I am quite frustrated by this because it seems Windows 10 really like to stick to that thing called 'Microsoft (R) Console Based Script Host' (which I believe to be the 'CScript.exe' thing in the registry) and it is very annoying when a CMD window just flashes when I want to open my script for editing. It seems Windows 10 is ignoring my settings and keep reverting what I was trying to change. What should I do (and try) to either force Windows to dismantle the CScript.exe thing, or force Windows to keep my default application preference?
Other observations
I also attempted to set Adobe Dreamweaver CS6 as the default app for editing .js files using the traditional methods as stated above. All didn't work.