Setting up JavaScript autocompletion via SublimeCodeIntel

1. First install the SublimeCodeIntel package.

Enter sublime, enter package management via Ctrl+Shift+P, enter pci (the first letter), and select Package Control:Intall Package, as shown in the figure:

Press Enter, enter the package installation interface, enter the first letter, and select SublimeCodeIntel, as shown in the figure:

Enter, install, and wait for the installation to complete (it takes a long time).

2. Configure SublimeCodeIntel.

Open the configuration file through the path Perferences->Package Settings->SublimeCodeIntel->Setting - Defalut and find the following configuration items:

 

[html]  view plain copy  
 
  1. "codeintel_language_settings": {  
  2.         "Python3": {  
  3.             "python3": "/usr/local/bin/python3.3",  
  4.             "codeintel_scan_extra_dir": [  
  5.                 "/Applications/Sublime Text.app/Contents/MacOS",  
  6.                 "~/Library/Application Support/Sublime Text 3/Packages/SublimeCodeIntel/arch",  
  7.                 "~/Library/Application Support/Sublime Text 3/Packages/SublimeCodeIntel/libs"  
  8.             ],  
  9.             "codeintel_scan_files_in_project": true,  
  10.             "codeintel_selected_catalogs": []  
  11.         },  
  12.         "JavaScript": {  
  13.             "codeintel_scan_extra_dir": [],  
  14.             "codeintel_scan_exclude_dir":["/build/", "/min/"],  
  15.             "codeintel_scan_files_in_project": false,  
  16.             "codeintel_max_recursive_dir_depth": 2,  
  17.             "codeintel_selected_catalogs": ["jQuery"]  
  18.         },  
  19.         "PHP": {  
  20.             "php": "/Applications/MAMP/bin/php/php5.5.3/bin/php",  
  21.             "codeintel_scan_extra_dir": [],  
  22.             "codeintel_scan_files_in_project": true,  
  23.             "codeintel_max_recursive_dir_depth": 15,  
  24.             "codeintel_scan_exclude_dir":["/Applications/MAMP/bin/php/php5.5.3/"]  
  25.         }  
  26.     }  

 

Find the "JavaScript" code snippet, put

[html]  view plain copy  
 
  1. "codeintel_selected_catalogs": ["jQuery"]  

 

Change it to:

 

[html]  view plain copy  
 
  1. "codeintel_selected_catalogs": ["JavaScript"]  

keep.

 

3. Close and restart Sublime, write JavaScript code, and find that auto-completion has taken effect.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325362384&siteId=291194637