GIT Tip: Saving current changes to a patch

September 7th, 2011

If you use GIT for revision management, you might run into situations where you need to save your current changes without committing them.  While you can use the “git stash” command, the stash command applies to your entire working directory.  Sometimes it is useful to save changes from a particular sub-directory or project.

You can create a patch from your local changes:

git diff -p . > filename.patch

Note that the “.” can be any file specification (including wild-cards).

To apply the patch:

git apply filename.patch

n2 version 2.0051

February 5th, 2010

The latest update to n2 supports the following new features:

  1. Command window will now scroll horizontally when needed.
  2. You can now paste into the command window (or the active document) by using the system menu (Alt+Space -> ‘E’ -> ‘P’) similar to console windows.
  3. Command window completion allows you to complete a path without a specified command.  This allows you to use the command window to locate and execute commands similar to the normal Windows command prompt.
  4. When the replace tabs with spaces option is enabled, the backspace key handling recognizes the deletion of leading spaces on the current line.  In this case n2 now deletes enough characters to put the insertion point on the previous tabstop.  In cases where this behavior is not desired, you can select the characters you want to delete using Shift+Left arrow (or any other selection method) and then pressing backspace or delete.

n2 version 2.0050 published

November 7th, 2009

The latest update to n2 supports the following new features:

  1. Improved accuracy of selection when using the mouse to select.
  2. Improved handling of Ctrl+Tab.  It now behaves just like Alt+Tab in the shell, allowing the user to quickly Ctrl+Tab back to the previously active document.
  3. Improved handling of the escape key when an output window has the focus. It now switches back to the previously active document.  Previously it switch to the document that preceded the output window in the window menu.
  4. New icon.

SBVH – a simple BVH file viewer

October 27th, 2009

We’ve created a simple BVH file viewer.  BVH files are commonly used for exporting the results of motion capture.  The animations can later be applied to models in video games.  You can read more about BVH files on wikipedia.

See the SBVH product page for more information.  SBVH can be freely downloaded from here.

You can search the web for public motion-capture databases. One popular database can be found here: CMU Graphics Lab.

Searching the web from n2

October 19th, 2009

You can add a tool that launches a web search on the currently selected word.  This can be useful to quickly lookup documentation for functions that you use in your code.

To add the custom tool, follow these steps:

  1. Click on Tools->Customize->Add
  2. Enter the following information:
    1. Title: &Help
    2. Command: c:\program files\Internet Explorer\iexplore
    3. Hot Key: F1 (click in the field and press F1)

You can now select a word while in n2 and press F1 to launch Internet Explorer on the selection.  If the selection is empty, n2 will automatically use the word under the insertion point.

You can modify the URL from step 2.2 to specify a specific site or additional restrictions.  For example using the following: c:\program files\Internet Explorer\iexplore will append “(Windows)” to your search string.

Needless to say, you can customize the commands to use your favorite browser and search engine.

Binary file editing with n2

October 18th, 2009

There are 2 ways to open a binary file with n2:

  1. On the command line: n2 /b filename
  2. Using the command window (Alt+C): eb filename

You can edit very large binary files with n2 since it only loads a small portion of the file into memory at any one time.  If the binary file you open is currently in use, n2 will open the file for read-only access.  This allows you to still view and search in the file.

When editing binary files, n2 supports multi-level undo and copy / paste.  To make it easy to spot changes, bytes that have been modified since the last time you saved are displayed in red (by default).  You can change the color for modified bytes using Tools->Options->Colors->Modified Binary.


n2 version 2.0048 published

October 18th, 2009

The latest update to n2 supports the following new features:

  • Changes to Ctrl+X and Ctrl+C.  n2 will now cut / copy the current line if the selection is empty.
  • Added support for selecting the current word using Ctrl+W.

You can download the latest update from: