Thursday, September 5, 2019

Step by step guide to setup Sublime Text 3 with Force.com IDE without Mavensmate

Sublime is awesome and one of the best editor i have used so far for force.com development. It will make your coding easy and save you from code overwrite.

Before Start setup process. Please download and Install sublime from Download Sublime.

Then you need to install package control plugin in sublime. For that you must copy one code snippet from get code snippet to your sublime console(Ctrl+`) and press enter. Below image for help.


Image


 After successful installation of package control press Ctrl+Shift+P and then type package control: install package as given in image 1 and press enter.

Image 1
Then plugin installer popup will come. There you have to type SalesforceXyTools and select same. This plugin will get installed and you will able to see two new menu SXDC-XY and SFDX in top.

Then go to SXDC-XY -->Project--> New Project. Then type project name as shown below in image 2. You can change project folder and give project name of your choice. Here project name is 'My Dev Org'.

Image 2

After pressing enter, a folder will get created with project name and you can see it in top-left side.

Then go to SXDC-XY -->Project--> Change Authentication Type and select password option. You will able to see a sub-folder named xyconfig inside your project folder. Then open xyconfig.json file and input your salesforce org login credential. Make is_sandbox false for production or personal dev org. auto_save_to_server should be true. So whenever you saving file locally ,it should automatically save to salesforce as well. Below image 3 for help.

Image 3

Then go to SXDC-XY -->Project--> Retrieve and select metadata to retrieve in local folder. You will get src folder in left side with metadata in sub-folder. If you want to refresh individual file then open the file and right click-->SFDC-XY Metadata-->Refresh From Server. To save file in server, press Ctrl+S.

If you want to refresh all metadata at once then select metadata folders and right-click-->Sfdc-Xy-->Retrieve Dir from server as shown in image 4.

Image 4


You can run apex script from sublime like anonymous window and get result in sublime. Example given in image 5.

image 5

Similarly you can use SOQL Query editor and do Tooling Query from here. Also able to create new apex class,page or run test classes and get coverage and log here itself. 

You can change theme,font and scheme color from preferences. There is some plugins available for apex/vf/js syntax. Now you can start coding in sublime.


Please comment below if facing any issue related to above topic.