Sublime text 2 cannot be set as the default editor

Source: Internet
Author: User

Today, I encountered an interesting thing. When I set the default open method for the CSS style sheet, but it is always unable to be set successfully, the system always selects a random open method to open the file. For example, PDF, DW, and TXT.


Follow these steps to set the default open mode:
1. Right-click the CSS file and select the open mode. Then, select the default open mode in the open mode.

 


2. Select Browse in the pop-up box, find my installed sublime_text.exe, and click open.

 


3. Return to the opening mode dialog box and select "always open this file with the selected program". Then, click "OK ".


However, the strange thing is that the system selects a random open method as the default open method.


Cause:Later, with the help of my colleagues, I found the reason: I installed the sublime text 2 editor twice in C: \ Program Files \ sublime text 2 and D: \ Program Files \ sublime text 2, while c: \ Program Files \ sublime text 2 is set in the registry. Then I deleted the sublime text 2 folder in C: \ Program Files \, And the settings in the Registry are still in the C: \ Program Files \ sublime text 2 location, this is why sublime text 2 fails to be set as the default editor.

 

Solution:
1. Win + R enter Regedit in the running process, and press enter to open the registry.


 

2. Press Ctrl + F and enter sublime in the pop-up box. Click search on the right.

3,You will find hkey_classes-> *-> shell-> open with sublime text 2-> command. Double-click the default value on the right. In the pop-up window, the input value under "value data" should be "D: \ Program Files \ sublime text 2 \ sublime_text.exe "" % 1"

 


4,Then, press F3 to find the next one, hkey_classes-> sublime_text.exe-> shell-> open-> command, double-click the default value on the right, and the "C: \ Program Files \ sublime text 2 \ sublime_text.exe "" % 1 "to" D: \ Program Files \ sublime text 2 \ sublime_text.exe "" % 1 ", and then click OK.


Note: "value data" in the Registry refers to the directory of the editor you installed.

 

5. Click start to set the default open mode.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.