sublime text ide

18
Sublime Text is a sophisticated text editor for code, markup and prose. Ajay Dubedi Salesforce Expert www.cloudanalogy.com

Upload: cloudanalogy

Post on 17-Feb-2017

253 views

Category:

Software


0 download

TRANSCRIPT

Page 1: Sublime Text IDE

Sublime Text is a sophisticated text editor for code, markup and prose.

Ajay Dubedi

Salesforce Expertwww.cloudanalogy.com

Page 2: Sublime Text IDE

The Sublime Text

Sublime Text is a sophisticated text editor for code, markup and prose.You'll love the slick user interface, extraordinary features and amazing performance.We are familiar with the Force.com IDE which is based on the Eclipse platform which we use to code, compile, test, package and deploy Salesforce projects. Today we can look forward to another cool tool for Salesforce Developers – MavensMate. It is a powerful open source tool for building Force.com IDEs. It helps us to develop Salesforce applications easily regardless of the platform or text editor. Most of us are using the beloved Sublime Text for coding our projects. Let’s see how to integrate MavensMate with Sublime Text to make it a powerful development environment like (or better than) the Force.com IDE.

www.cloudanalogy.com

Sublime Text

Page 3: Sublime Text IDE

What Sublime Text can do

❖ GoTo AnythingUse Goto Anything to open files with only a few keystrokes, and instantly jump to symbols, lines or words.Triggered with Ctrl+P, it is possible to:● Type part of a file name to open it.● Type @ to jump to symbols, # to search within the file, and : to go to a line number.

These shortcuts can be combined, so tp@rf may take you to a function read_file within a file text_parser.py. Similarly, tp:100 would take you to line 100 of the same file.

❖ Multiple SelectionsMake ten changes at the same time, not one change ten times. Multiple selections allow you to interactively change many lines at once, rename variables with ease, and manipulate files faster than ever.Try pressing Ctrl+Shift+L to split the selection into lines and Ctrl+D to select the next occurrence of the selected word. To make multiple selections with the mouse, take a look at the Column Selection documentation.

www.cloudanalogy.com

Sublime Text

Page 4: Sublime Text IDE

❖ Command PalletteThe Command Palette holds infrequently used functionality, like sorting, changing the syntax and changing the indentation settings. With just a few keystrokes, you can search for what you want, without ever having to navigate through the menus or remember obscure key bindings.Show the Command Palette with Ctrl+Shift+P.

❖ Distraction Free ModeWhen you need to focus, Distraction Free Mode is there to help you out. Distraction Free Mode is full screen, chrome free editing, with nothing but your text in the center of the screen. You can incrementally show elements of the UI, such as tabs and the find panel, as you need them.You can enter Distraction Free Mode using the View/Enter Distraction Free Mode menu.

www.cloudanalogy.com

Sublime Text

Page 5: Sublime Text IDE

❖ Instant Project SwitchProjects in Sublime Text capture the full contents of the workspace, including modified and unsaved files. You can switch between projects in a manner similar to Goto Anything, and the switch is instant, with no save prompts - all your modifications will be restored next time the project is opened.

❖ Plugin APISublime Text has a powerful, Python based plugin API. Along with the API, it comes with a built in Python console to interactively experiment in real time.

❖ Cross PlatformSublime Text is available for OS X, Windows and Linux. One license is all you need to use Sublime Text on every computer you own, no matter what operating system it uses.

www.cloudanalogy.com

Sublime Text

Page 6: Sublime Text IDE

Latest Features:

❖ Added new Syntax Definition file format, sublime-syntax❖ Added a custom regex engine that matches multiple regexps in parallel, for faster file

loading and indexing❖ Improved Unicode support, including combining character rendering, character

classification in regex searches, and case insensitivity in Goto Anything matching❖ Packages are now on GitHub❖ Incorporates many community provided improvements to the above packages, with

significant improvements to HTML, CSS, JavaScript, Go, D and SQL❖ Added Panel Switcher to status bar❖ Better handling of troublesome files during indexing❖ Improved file change detection❖ Added "Profile Events" to the Command Palette, to help identify slow plugins❖ Build Systems may now define a list of file name wildcard patterns to trigger on, via the

file_patterns key.

www.cloudanalogy.com

Sublime Text

Page 7: Sublime Text IDE

❖ prompt_open_file and related commands now accept an initial_directoryargument❖ Improved indenting behavior when indent_to_bracket is enabled❖ Spell Checker now reads from manually edited user preferences on the fly❖ Stability improvements for Find in Files when using regular expressions that result in significant

backtracking❖ Fixed file truncation when using hexadecimal encoding❖ Fixed brackets in strings influencing auto indent❖ Fixed inconsistencies in Goto Anything when selecting symbols❖ Fixed tab completion regression in 3081, where h1..h6 HTML completions were not triggering❖ Fixed Goto Definition command not working when placed in a submenu❖ OSX: Fixed Emoji & Symbols popup failing to insert text in some cases❖ Windows: Added support for inserting characters from outside of the BMP

www.cloudanalogy.com

Sublime Text

Page 8: Sublime Text IDE

Download and InstallationIf you don’t already have Sublime Text 3, download it from http://www.sublimetext.com/3Now we need to install the Sublime Text Package Control.Open Sublime Text, and open console from View -> Show Console.

www.cloudanalogy.com

Sublime Text

Page 9: Sublime Text IDE

Now copy the python code appropriate for your Sublime version from https://sublime.wbond.net/installation and paste it on the console.You may need to restart Sublime Text for completing the installation.Now go to Preferences->Package Control.

www.cloudanalogy.com

Sublime Text

Page 10: Sublime Text IDE

Enter Install Package and select it.A list of available packages will be displayed.

www.cloudanalogy.com

Sublime Text

Page 11: Sublime Text IDE

Search for MavensMate and hit Enter.MavensMate will get installed and a welcome text will be displayed in the editor. You will also get a new MavensMate menu!

www.cloudanalogy.com

Sublime Text

Page 12: Sublime Text IDE

www.cloudanalogy.com

Sublime Text

Page 13: Sublime Text IDE

Creating a New Project:

Now it’s time to create a new project and download metadata from our Salesforce org to MavensMate.Before creating a project, you have to specify the path to your workspace folder where you will be storing the project files. Just open MavensMate -> Settings -> User and search for mm_workspace. Enter the absolute path to your workspace folder (Eg: “mm_workspace” : “E:\\MavensmateWorkspace “) and save the settings file.

Now we can create our project by going to MavensMate -> Project -> New Project.

www.cloudanalogy.com

Sublime Text

Page 14: Sublime Text IDE

A browser window will open where you need to specify your Salesforce credentials. The Advanced tab allows you to customize the metadata subscription list and the Project Metadata tab allows you to choose the components to be downloaded.

www.cloudanalogy.com

Sublime Text

Page 15: Sublime Text IDE

Choose your preferences and click Create Project.MavensMate will download the specified metadata components from the salesforce org.After completing this process, the project will load in Sublime.

www.cloudanalogy.com

Sublime Text

Page 16: Sublime Text IDE

Now you can develop your salesforce app inside MavensMate IDE. It works faster than Eclipse and deploy the components directly to the org.

www.cloudanalogy.com

Sublime Text

Page 17: Sublime Text IDE

After development, we can validate and deploy our application to the Salesforce org. Reference http://mavensmate.com/Getting_Started/Users

www.cloudanalogy.com

Sublime Text

Page 18: Sublime Text IDE

Ajay DubediSalesforce Expert

www.cloudanalogy.com

+1 (415) [email protected]