Downloading Sublime Text Editor
Before we get started lets first “if you haven’t already download the latest version of Sublime Text editor. Once you get to the page go to the navigation bar at the top and click on “Download”,then download the latest version of sublime.
Creating a folder
Alright cool, next what we want to do is to create a folder called “p5project”, “p5” or “project” whatever you my call it call it something and place it where you can find it. Inside that folder right click and create a file called “index.html” and “main.js”.Lastly create an empty folder called “libraries”
Downloading the p5 libraries
Now lets take a visit to the p5.js and at the top you will see downloads and go there. At the download page you will see in big bold letters “Compete Library” click below and it should download in your browser.Open up your “P5-zip” folder inside that folder you will see another called “addons”.Inside your addons folder all you need there are two files “p5.dom.js” and “p5.sound.js”, copy those files and go back to your recently create projects folder and paste them inside your “libraries”. Now ahead over to your p5 zip folder and copy the “p5.js” file (that contains the main p5 library API ) and do the same as you did for the other files.
Now head on to your Sublime text editor and go to the File and Open then find your project file and double-click on that. Great!! now we are in business you are now using p5.js in the sublime text editor.