A place for SGML and XML application developers.

September 24, 2005

Setting up VI navigation commands in Firefox 1.0.5 or later

Filed under: Software — cangione @ 1:20 am

vi geeks (Emacs is ok too I guess….) this is tooooooooooo cool! For
those of us that actually remember how to do things before the
invention of the mouse this modification is for you in Firefox! The
following procedure will add keybindings that simulate vi navigation
movements such as the j and k keys.

  1. For versions following 1.0.5 the platformHTMLBindings.xml
    file has moved inside the $firefox_home/chrome/toolkit.jar
    (content/global/platformHTMLBindings.xml within the JAR file)
    • You’ll need to extract the existing file from the archive,
      modify it, then update the archive.
    • The simplest way to modify the file is to move the jar file
      into a working directory, unpack it, modify the file, the repack it
      into the jar. Suggest that you also make a backup of the original toolkit.jar file while you are at it.
  2. Move the JAR file to a working directory:
    <font face="monospace">cd $MOZILLA_HOME/chrome/<br />
    cp toolkit.jar $WORKING_DIRECTORY<br />
    cd $WORKING_DIRECTORY</font>
  3. Unpack the JAR file with the Java Archive Utility:
    <font face="monospace">jar -xf toolkit.jar</font>
  4. Modify the file which will now be located at

    Add the entries listed below as children of the <binding id=”browser”><handlers> element:

    <font face="monospace">&lt;handler event="keypress" key="k"command="cmd_scrollLineUp"/&gt;<br />
    &lt;handler event="keypress" key="j" command="cmd_scrollLineDown"/&gt;<br />
    &lt;handler event="keypress" key="l" command="cmd_scrollRight"/&gt;<br />
    &lt;handler event="keypress" key="h" command="cmd_scrollLeft"/&gt;</font>
  5. Repack the JAR file:
    <font face="monospace">cd $WORKING_DIRECTORY
    jar -cf toolkit.jar content/	</font>
  6. Copy the new JAR file back.
  7. Restart the browser and get away from the dreaded Carpal Tunnel

NOTE: If you have turned on the Advanced Firefox
option “Begin finding when you being typing” this should
be turned off. By typing a /
character you can start a search for any text on the page and by typing
a character you can start a
search for any link on a page. For more info refer to the Firefox
Keyboard Shortcuts

I believe that this is the first page that has been updated to
accomplish this task for vi navigation on Firefox versions after 1.0.5 (HINT:
If you are using a version of Firefox before 1.0.6 YOU ARE NOT
The instructions provided here were
based on instructions for earlier versions of Firefox gathered from the
following pages:

September 20, 2005

Google Alerts

Filed under: Software — @ 9:30 pm

Google Labs is still coming out with great stuff. Google
is worth a look.

The alerts give you targeted search results in an e-mail based on your
choice of query. The results are e-mailed to you based on a schedule
you select. It is a good way of keeping current on a particular
industry or topic. The query can search either the Google news site or
their web search with an additional option to search both.

A nice enhancement to this service would be creating an RSS or ATOM
feed for the results instead of sending it via e-mail.

September 8, 2005

Non breaking space Definition

Filed under: XML — cangione @ 8:09 pm

Lines are broken as result of one of two conditions. The first
condition is the presence of an explicit line breaking
character. The second condition results from a formatting algorithm
having selected among available line break opportunities; ideally the
chosen line break results in the optimal layout of the text.

NO-BREAK SPACE is the preferred character to
use where two words should be visually separated but kept on the same
line, as in the example of a currency value.

Entity defined for a non breaking space:

<tt>&lt;!ENTITY nbsp   "&amp;#160;"&gt; </tt>   


Powered by WordPress