How to make a specific file always visible on the sidebar everytime I open sublime text 3 - sublimetext2

I switched from Notepad++ to Sublime Text 3 last week and I'm loving it. I know Notepad++ don't have a feature like this also, but is there a plugin or setting on Sublime Text 3 that I can use to make a file always visible on my sidebar every time I open it? I have a single text file that has some login info and useful note for my development and I want Sublime to remember to at least add a shortcut on that file on my sidebar so that I can access it anytime I want to.
I want workdocs.php to be always visible on my sidebar when every I open my Sublime Text 3. Thanks in advance!

It's not exactly what you want but you could try Sublime FavoriteFiles:
https://github.com/facelessuser/FavoriteFiles
It's ST3 compatible and works well. You can assign keyboard short-cuts to the various commands or use Control + Shift + P to access them quickly.

Related

Hide one line in Sublime Text 3

I have one line in a html file containing a base64 representation of an image. This line spans thousands of lines in the editor, which is a huge hassle when always scrolling past it.
Is there a good way in ST3 of hiding this line?
Select the text you want to hide, then from the Edit menu -> Code Folding -> Fold.
Note that folding is not stored in the session, and reopening the file or ST will display the text unfolded again.
You could also take a look at plugins designed to help you with this: https://packagecontrol.io/packages/Base64%20Fold
you can simply press ctrl+shift+{ and to revert back just press ctrl+shift+}

Preventing Sublime to Search Automatically

I am working on a XML document that contains huge amounts of data. Whenever I want to make a search regarding to a specific keyword (let's assume a 4-letter-word) by typing just the first letter, the sublimetext 2 automatically stars searching thus freezes for a fair amount of time which is quite disturbing.
Is there any way for me to prevent sublimetext doing so? For example, it may wait for me till I press the "enter", or it may start searching after 3 letters are typed.
The Sublime Text find panel has a little toggle button called "Highlight matches". When this is enabled, Sublime searches instantly as you type. When it is disabled, Sublime won't search until you press Enter or click one of the Find buttons.
Here is a screenshot of ST3 showing the button:
Build 3105, Default theme:
Build 3156, Adaptive theme with orange accent:

Visual cue to know whether a file has unsaved changes in Sublime Text editor

I recently moved to Sublime Text 3 for development and trying to figure out a way in which I can know whether a file is saved or not just by looking at it in the editor. For e.g.
Eclipse puts a star in front of the file name if there are unsaved changes
Notepad++ changes the tab color as red
Is there any such easy to see visual cue in Sublime Text 3 to know if a file has unsaved changes?
By default Sublime Text displays dot (•) instead of x used to close tabs when there are unsaved changes.
You can make this highlighting of modified tabs even more distinctive using following property which causes modified tabs to have different color:
{
"highlight_modified_tabs": true
}
The color of modified tabs with this property enabled will depend on the theme you are using. If you want to change it, either change the theme or change the color manually in your settings. See this answer for more details on that.
In Sublime text there is a indication on the tabs, a full circle is not saved, a cross (x) is a saved file, indicating that you could close it.
Not saved file:
Saved file:

Auto overwrite mode when writing commands in Sublime Text 2

In Sublime Text 2 it's possible to toggle overwrite mode with cmd+alt+o, but what I'd really like is to toggle it automatically on commenting, ie. whenever typing "//"
Is it possible without too much fuss?

Is there a Surround With for aptana studio plugin?

Is there some way to get "surround with" in the Aptana perspective in Eclipse like you have in the Java perspective. I would love to be able to surround text with html tags like eg: <div></div> with a keyboard shortcut. Is there some way of doing that with the snippets rubles?
Thanks,
You can do this with AutoHotKey, which has the added benefit of being available across all apps. I have a script which launches a 'surround' menu when I select some text and press CTRL+SHIFT+C
To use it, install AutoHotKey, and create a new .txt file with the following code, and replace the extension with .ahk
http://pastebin.com/48ipiXsG
At the top of the file you'll find a number of groups of items, in the following format
<h1>~<h1>##</h1>
the ~ character divides the name of the function and the function content. The bit before ~ is what appears on your menu, and after the ~ is the code. ## represents where your selected text will go. So if you select the text 'AutoHotKey' and press CTRL+SHIFT+C, and then select <h1> from the menu, it'll replace the with <h1>AutoHotKey</h1>
There are several menus in the script, set up to launch based on what app you press CTRL+SHIFT+C in. For example, I get different shortcuts if I'm in Visual Studio than if I'm in SQL Server. You can modify these easily enough, but the generic menu should work fine for you. Feel free to chop and change but you have to leave GENERIC at the top of the script.
PS: I use this script everyday, and there is one small bug. The script saves whatever you have in the clipboard in a variable, and then writes it back to the clipboard when it's done. Sometimes, instead of surrounding text it replaces it with whatever you had in the clipboard. This is easily undone with CTRL-Z and usually works the second time you try it. I've never been able to figure out what causes this, maybe some autohotkey heads can help out?
PPS : This script is based on some other scripts from the AHK forums, including this one
http://www.autohotkey.com/docs/scripts/FavoriteFolders.htm
So you may find comments that don't make sense. I've seen a few references to the middle click, as the script above uses the middle mouse button instead of CTRL+SHIFT+C.