Java and….and Sublime Text (MAC OS X) Part 1

Hello everyone, are you looking for a good text editor then i guess you might try Sumlime.

Here is the link for download.
Select OS X.

After opening Sublime you will see the following window.

Screen Shot 2013-05-15 at 8.31.54 PM

After that you can drag and drop your project folder

Screen Shot 2013-05-15 at 9.06.19 PM

In the picture you can see i opened a java code. If you want to highlight syntax like mine follow the steps below

Screen Shot 2013-05-15 at 9.10.51 PM

go to view -> Syntax -> Java -> java

Well now i am going to talk about code formatting.

For this you have to install wbond

Installation is through the Sublime Text 2 console. This is accessed via the ctrl+` shortcut. Once open, paste the following command into the console.

import urllib2,os; pf='Package Control.sublime-package'; ipp=sublime.installed_packages_path(); os.makedirs(ipp) if not os.path.exists(ipp) else None; urllib2.install_opener(urllib2.build_opener(urllib2.ProxyHandler())); open(os.path.join(ipp,pf),'wb').write(urllib2.urlopen(''+pf.replace(' ','%20')).read()); print('Please restart Sublime Text to finish installation')

After the installation press, command + shift + P then type “Install” and select “Package Control: Install Package”. After that Select “SublimeAStyleFormatter” from list.


If everything goes write press

Ctrl+Alt+F: Format current file.
⌘+K, ⌘+F: Format current selection.

Enjoy …

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s