{The jabbrevs Abbreviation Manager

Introduction
The jabbrevs application is a tool for maintaining lists of abbreviations, which works with jedit.  It is distributed as part of the jstools package.

jabbrevs was designed for use with jedit's static abbreviation feature, which allows you to have abbreviations which you define for words (and phrases) automatically expanded as you type.  However, it could easily be used by other Tk­ or Tcl­based editors, and it could conceivably be used for other purposes as well.

This document describes jabbrevs version 4.0/4.0.

Copyright and contact information is available in the jstools documentation.

Invocation
	jabbrevs

jabbrevs is typically called by jedit when you choose `Edit Static Abbreviations' from the Abbrev menu, but you can also start it yourself from the Unix command line by typing `jabbrevs'.  In either case, it needs to be found in your path.

If you have trouble starting jabbrevs, see the Usage documentation for jstools.

Working with Abbreviations
Defining a New Abbreviation
To define a new abbreviation, type the abbreviation into the top text field, marked Abbreviation, and press Tab to move the cursor to the Expansion text field.  Type the word or phrase your abbreviation should expand to in the Expansion text field and press Return or click Add to define the abbreviation.  (The insertion cursor will be moved back to the Abbreviation field so you can enter another abbreviation if you choose.)

Clicking Add (or pressing Return in the `Expansion:' text field) tells jabbrevs itself to remember the abbreviation, but doesn't save it to disk or let other applications know about it.  To save any new abbreviations to disk, click the Save button.

Finding the Expansion for an Abbreviation
To find out what the current expansion for a (potential) abbreviation is, type the abbreviation in the Abbreviation text field and press Return (or click Add - but leave the Abbreviation field empty).  If you've typed a valid, existing abbreviation, the Expansion field will be filled in with its expansion.  (If no such abbreviation exists, you'll get an message to that effect.)

Changing an Abbreviation
Changing an abbreviation is just like adding a new one.  Type the (presumably already defined) abbreviation in the Abbreviation field, type its (changed) expansion in the Expansion field, and click Add or press Return.  The abbreviation's old expansion will be replaced with the new one.

When making a minor change to an abbreviation, such as correcting a typo, you may find it convenient to press Return with the Expansion field empty, and let jabbrevs fill in the Expansion field with the old expansion.  You can then edit it as you choose before pressing Return again (or clicking Add) to change it.

A Shortcut for Plurals
(This description is specific to English, but the idea may be applied to other inflected languages.)

jedit doesn't have any built­in understanding of English plurals or suffixes, so just because you have an abbreviation `abbr' defined to expand to `abbreviation', jedit won't automatically expand `abbrs' to `abbreviations'.  So you may wish to define abbreviations for plurals (or other inflected forms) of words.  You can do that easily, though, by typing the singular abbreviation and pressing Return, letting jabbrevs fill in the singular expansion.  Your insertion cursor is left at the end of the singular form of the expansion, so you can add `s' (or otherwise edit the expansion) and press Tab to move the insertion cursor back to the end of the  Abbreviation field.  (It's important not to press Return at this point, or you'll be overwriting the singular abbreviation.)  Then you can add an `s' or otherwise distinguish the plural abbreviation from the singular version, and press Return to add the new plural abbreviation.  The same principle can be applied to other inflectional endings.

Deleting Abbreviations
To delete an abbreviation, type it in the Abbreviation field and click Delete.  (It doesn't matter whether there's anything in the Expansion field or not.)  jabbrevs will forget the abbreviation, and the next time you write the abbreviations out to disk, the deleted abbreviation will be removed from  the disk file.

Saving and Reloading Abbreviations
Saving the Abbreviations
To save your abbreviations to disk, click the Save button.  Until you do this, other applications have no way of seeing the new abbreviations you have defined.  (Also, if you quit jabbrevs without saving your changes, they will be lost.)

Reloading the Abbreviations from Disk
To reload the abbreviations from disk (for instance if you've accidentally deleted or changed an abbreviation you wanted to keep), choose `Reload' from the `File' menu.  Any changes you have not yet written will be lost.

Your abbreviations are always loaded in when jabbrevs starts up, so you only need to choose `Reload' to recover from mistakes.

Quitting jabbrevs
You can quit jabbrevs either by clicking the Quit button or by choosing Quit from the `File' menu.  (jabbrevs will ask for confirmation first if you've chosen `Confirm Actions' on the Global Preferences panel).  If you started jabbrevs from within jedit by choosing `Edit Static Abbrevs' from jedit's `Abbrevs' menu, then jedit will re­read your (probably changed) abbrevs file from disk when you quit jabbrevs.

The Abbrevs Menu
The `Abbrevs' menu has commands to get information about jabbrevs and for a few miscellaneous tasks.

Help
The `Help' command displays this help file.  (It uses the jdoc command, so in order for it to work that command must be installed on your system and in your path.  The help file must also be installed, or be in the current directory.)

About the Abbrevs Manager...
The `About the Abbrevs Manager...' command displays an information panel with copyright information.  The panel also lets you get more information about the author, and about the Tk/Tcl scripting environment.

Global Preferences...
This command brings up the jstools Global Preferences panel.  Preferences which are particularly relevant to jabbrevs are `Confirm Actions', which controls whether you're asked to confirm before quitting, and the key bindings preferences, which control which keyboard commands you have available for working in the two entry fields.

Issue Tcl Command...
This brings up a panel that prompts you for a Tcl command to be executed.  This is an advanced feature intended primarily for use in designing and debugging configuration files; it's not normally useful for manipulating abbreviations.

Issue Unix Command...
This brings up a panel that prompts you for a Unix command to be executed.  If the command produces any output, it will be displayed; otherwise you'll see a notice to that effect.  If there are any errors in the execution of the command, you'll see an error dialogue box with the error message returned by the command.  This command doesn't have any effect on your abbreviations; it's just a convenience.

Customising the Abbrevs Manager
jabbrevs supports the standard jstools customisation mechanisms.  You should consult the general jstools customisation documentation as well as the description below.

The ~/.tk/jabbrevsrc.tcl Startup Script
In addition to the limited customisation you can do through the Global Preferences panel, you can customise the behaviour of jabbrevs by putting Tcl code in the startup script ~/.tk/jabbrevsrc.tcl.  While you probably don't need to customise an application as simple as jabbrevs, you can if you want to.

Future Directions
* It should be possible to specify other files to use than the default ~/.tk/abbrevs.tcl.

* I hope to give jabbrevs the ability (optionally) to write abbreviation definitions to Emacs' ~/.abbrev_defs file and to vi's ~/.exrc file, so if you use multiple editors you can have the same abbreviations available in all of them.
} {{{jdoc:xref:link {4.92 4.97 4.133 4.140 6.35 6.40 10.0 10.33 10.50 10.75 15.32 15.37 17.43 17.78 36.0 36.5 36.163 36.168 51.180 51.208 51.248 51.253 57.58 57.62 63.23 63.59 72.18 72.63 72.85 72.132 75.60 75.88}} {jdoc:anchor:anchorname {3.0 4.0 12.0 13.0 19.0 20.0 41.0 42.0 50.0 51.0 53.0 54.0 62.0 62.21 71.0 72.0}} {richtext:font:roman {2.0 3.0 4.0 4.4 4.12 4.92 4.97 4.133 4.140 6.0 6.8 6.35 6.40 8.24 8.32 10.54 10.61 12.0 13.9 15.0 15.8 15.32 15.37 15.177 15.185 17.29 17.37 17.47 17.52 17.71 17.78 19.0 21.0 21.108 21.111 21.258 21.264 23.26 23.32 23.71 23.79 25.0 26.0 26.137 26.143 28.0 29.0 29.211 29.217 31.110 31.116 31.157 31.165 31.270 31.276 33.0 34.0 36.0 36.5 36.120 36.124 36.148 36.160 36.163 36.168 36.197 36.202 36.208 36.221 36.396 36.402 36.412 36.420 36.550 36.551 36.597 36.600 36.704 36.710 36.801 36.802 36.890 36.896 38.0 39.0 39.157 39.165 41.0 43.0 43.180 43.188 45.0 46.0 48.45 48.53 50.0 51.0 51.13 51.21 51.101 51.109 51.227 51.235 51.248 51.253 51.293 51.298 51.322 51.327 51.402 51.410 53.0 54.0 54.57 54.65 56.0 57.0 57.58 57.62 58.0 60.0 62.0 63.0 63.27 63.34 63.109 63.117 65.0 66.0 68.0 69.0 71.0 72.8 72.31 72.38 72.97 72.104 74.0 74.39 75.125 75.133 75.176 75.196 75.270 75.278 77.0 78.0 78.71 78.88 80.17 80.25 80.95 80.109 80.122 80.124 80.127 80.134 81.0}} {richtext:font:bold {4.133 4.140 10.54 10.61 17.71 17.78 21.108 21.111 21.258 21.264 23.26 23.32 26.137 26.143 29.211 29.217 31.110 31.116 31.270 31.276 36.396 36.402 36.597 36.600 36.704 36.710 36.890 36.896 63.27 63.34 72.31 72.38 72.97 72.104 75.176 75.196 78.71 78.88 80.95 80.109 80.127 80.134}} {richtext:font:bolditalic {17.47 17.52}} {richtext:font:typewriter {4.4 4.12 4.92 4.97 6.0 6.8 6.35 6.40 8.24 8.32 13.0 13.9 15.0 15.8 15.32 15.37 15.177 15.185 17.29 17.37 23.71 23.79 31.157 31.165 36.0 36.5 36.120 36.124 36.148 36.160 36.163 36.168 36.197 36.202 36.208 36.221 36.412 36.420 36.550 36.551 36.801 36.802 39.157 39.165 43.180 43.188 48.45 48.53 51.13 51.21 51.101 51.109 51.227 51.235 51.248 51.253 51.293 51.298 51.322 51.327 51.402 51.410 54.57 54.65 57.58 57.62 58.0 59.0 63.109 63.117 72.0 72.8 75.125 75.133 75.270 75.278 80.17 80.25 80.122 80.124}} {richtext:font:heading0 {1.0 2.0}} {richtext:font:heading1 {3.0 4.0 12.0 13.0 19.0 20.0 41.0 42.0 50.0 51.0 53.0 54.0 71.0 72.0 77.0 78.0}} {richtext:font:heading2 {20.0 21.0 25.0 26.0 28.0 29.0 33.0 34.0 38.0 39.0 42.0 43.0 45.0 46.0 56.0 57.0 59.0 60.0 62.0 63.0 65.0 66.0 68.0 69.0 74.0 74.39}} {jdoc:anchorname:Introduction {3.0 4.0}} {jdoc:link:jdoc.jdoc {57.58 57.62}} {jdoc:link:jedit.jdoc {4.92 4.97 6.35 6.40 15.32 15.37 36.0 36.5 36.163 36.168 51.248 51.253}} {jdoc:anchorname:Global_Preferences {62.0 62.21}} {jdoc:link:jstools.jdoc {4.133 4.140 10.50 10.75}} {jdoc:topic:jstools {4.133 4.140 63.27 63.34}} {jdoc:topic:jedit {6.35 6.40 15.32 15.37 36.0 36.5 36.163 36.168 51.248 51.253}} {jdoc:topic:jdoc {57.58 57.62}} {jdoc:link:jstools.jdoc#Usage {17.43 17.78}} {jdoc:anchorname:Invocation {12.0 13.0}} {jdoc:anchorname:Working_with_Abbreviations {19.0 20.0}} {jdoc:anchorname:Saving_and_Reloading_Abbreviations {41.0 42.0}} {jdoc:anchorname:Quitting_jabbrevs {50.0 51.0}} {jdoc:anchorname:The_Abbrevs_Menu {53.0 54.0}} {jdoc:anchorname:Customising_the_Abbrevs_Manager {71.0 72.0}} {jdoc:link:panels/prefs.jdoc {51.180 51.208 63.23 63.59 75.60 75.88}} {jdoc:link:jstools/customisation.jdoc {72.18 72.63 72.85 72.132}} {jdoc:link:jstools.jdoc#Credits_and_Copyright {10.0 10.33}}} {{matchend 76.0} {abbrevstart 51.123} {richptr 70.0} {abbrevend 51.210} {insert 1.0} {del_to 80.17} {emacs_mark 81.0} {matchstart 76.0} {anchor 8.13} {current 6.193}}}