Sublime Text 2 Code Formatting

A similar option in Sublime Text is the built in Edit->Line->Reindent. You can put this code in Preferences -> Key Bindings User: { “keys”: [“alt+shift+f”], “command”: “reindent”} I use alt+shift+f because I’m a Netbeans user. To format your code, select all by pressing ctrl+a and “your key combination”. Excuse me for my bad english. Or … Read more

How to change default code snippets in Sublime Text 3?

Sublime Text 3 stores its packages in .sublime-package zip files (the location varies by OS), so unlike ST2 you can’t just go to the Packages folder and see everything. However, there is an excellent plugin called PackageResourceViewer (available via Package Control) that can, among other things, extract files or whole packages to the Packages directory. … Read more

Go to method declaration

Sublime 3 is the answer! It has a goto_definition function build in which works fine as long as you have a project with your source folder added (so that they can get indexed). I use it with scala+lift, PHP, Python. Per default it is bound to F12 and without project setup it searches only in … Read more

Tell Sublime Text to ignore everything in .gitignore?

I created a quick-and-dirty plugin, sublime-gitignorer, to solve exactly this problem. It is currently tested on Ubuntu and Windows in Sublime Text 2 and 3. I expect it will also work on any other Linux distro or on Mac. To install, assuming you have package control, just: Press CTRL+SHIFT+P (CMD+SHIFT+P on Mac) Select “Install Package” … Read more

How to force folder refresh in Sublime, when “Project > refresh” doesn’t work?

Open Sublime Text. Select Preferences from the top menu and click Key Bindings – User. Here you will see a JSON file that should contain an array of objects (initially the array is empty). Every object will represent a shortcut. Add the following (new shortcut object) entry into the array (between the brackets): { “keys” … Read more