Tag Archive: programming

Two Quick Sublime Text Tips

Sublime Text tips

After a long time, I decided to switch back from Coda to using Sublime Text as my main IDE because it has more customize options. Here are two of the quick tips I found during the setup of Sublime Text:

User Settings

By reading through the default settings in Preferences -> Settings – Default, you can see many useful settings which can be modified. Copy the lines on which the settings you wish to be modified, paste into Preferences -> Settings – User, and modify them from there.

Here are my user settings for Sublime Text:

{
	"font_size": 20.0,
	"highlight_modified_tabs": true,
	"indent_to_bracket": true,
	"spell_check": true,
	"tab_size": 2,
	"word_wrap": true
}

Note that normally when you modified a file in Sublime Text, there will be a filled circle replacing the close button on the tab of modified file. With “highlight_modified_tabs” on, not only does it have the filled circle, the tab also changes color.

highlight_modified_tabs in Sublime Text

Once the user settings are saved, the change is immediate. No restart of Sublime Text is needed.

Move User packages folder

One of the benefits of using Sublime Text is that just like Linux, everything is a file, including its settings. On top of that, most changes modified by you is stored in the User folder inside the Packages folder in Sublime Text root folder (/Users/username/Library/Application Support/Sublime Text 2/Packages/User), such as installing a package and adding a snippet. By using this advantage, you can move the User folder to another location (such as an external hard drive or Dropbox folder) and link to it.

Type the following command into the terminal:

ln -s ~/Development/Sublime/Packages/User "/Users/username/Library/Application Support/Sublime Text 2/Packages"

Replace “~/Development/Sublime/Packages/User” to the location you saved the folder to, as well as “username” with your username. Note that you must move the User folder to your desired location first.

As of this writing, I haven’t found a way to link the file using a File Manager.

Make alias in Finder

The Make Alias command in Finder for Mac does not work for this operation.

Please leave a comment below if you have a GUI way of link the User folder successfully.

Do you have any other tips on Sublime Text? Please share them in the comment below.

Some Useful gEdit Plugins for Developers: Part Two – Third-Party Plugins (1)

Introduction

In part 1, I listed some useful development plugins in the default gEdit installation and the gedit-plugins. In this post, I will list the first batch of useful third-party plugins for developers from the third party gEdit plugins list (http://live.gnome.org/Gedit/Plugins).

The List

  • Advanced Find/Replace (http://code.google.com/p/advanced-find/)
    This plugin can search or replace specified characters whether in the current document, opened documents, or selected directory. The search results will be outputted to the Bottom Pane after a search is performed. It also highlights the search results in the document. It is useful to find a specified function or class within a project/directory.
  • AutoComplete (https://github.com/nagaozen/gedit-plugin-autocomplete/)
    This plugin suggests words that exists in the opened documents as you type. According to its website, I think it also suggests custom libraries although I was not tested it yet. It would save me lots of time to retype the function name.
  • Session Autosave (http://sourceforge.net/projects/geditautosaves/)
    Once this plugin is enabled, it will save the current opened tabs/documents on exit and reopen them when gEdit started next time. The feature is the exactly the same with NetBeans default feature for opening up last opened documents to continue editing them. However, I noticed that it only saves opened documents. This means that it will open the previously closed documents when gEdit started. The solution is to select Tools -> Session Save to refresh the session.

To Be Continued …

These are just a couple of plugins I tested. In the next post, I will list some more plugins useful for programming development. All the plugins mentioned in this post and the upcoming posts are available on the gEdit plugin page (http://live.gnome.org/Gedit/Plugins).

Do you have any gEdit plugins that does not list on the gEdit plugin page? Please share them in the comments below.

Free Open Source BIOS

As a GNU/Linux user and my knowledge of open source for nearly one year, I never thought about the openness of BIOS (Basic Input/Output System). In fact, I never thought about the BIOS Programming during my entire programming career. Thanks to davide89v (http://identi.ca/davide89v) at identi.ca (http://identi.ca/), I have begun to interested in learning about how to program BIOS through open source Coreboot BIOS. According to its website, “Coreboot (formerly known as LinuxBIOS) is a Free Software project aimed at replacing the proprietary BIOS (firmware) you can find in most of today’s computers.” It has developed using GNU Development Environment (GCC), Python, and Bash. This means that I have to learn all three of these programming / scripting language in order to learn to program BIOS, because I only know C++ programming language:)