[TxMt] Announce: Portable Game Notation bundle
Andy Herbert
andy.herbert at gmail.com
Sat Feb 3 18:12:02 UTC 2007
For my own personal use I created the Portable Game Notation bundle,
I hope that it may come in handy for a few people on this mailing
list. I've included text from the Help command at the end of this
message to give details on what the bundle actually does, but just in
case you don't want to wade through all that text -
Portable Game Notation is a file specification which describes a game
of chess which is used in most chess applications, and is a popular
way to transfer games over the internet. As well as a language
definition and a Help command, a couple of snippets are included
which may save time describing the initial state of the game. There
is also a useful command included within the bundle to launch the
current game selected in the symbol list in an external Application.
The bundle is available from http://homepage.mac.com/
andy.herbert/.Public/Portable%20Game%20Notation.tmbundle.zip
I appreciate this bundle may only appeal to a niche interest group,
but any criticism and comments will be appreciated.
Further details included within the Help command follow:
## Portable Game Notation Bundle Help
The ["Portable Game Notation"](http://www.very-best.de/pgn-spec.htm)
specification provides a method for describing a complete game of
chess in human readable form, it is also a popular file format used
in home computer chess programs.
This bundle provides syntax highlighting, snippets, and a command to
view individual games in an external editor.
Syntax highlighting is available for the following scopes:
* Tag pairs for each game (Such as "Event" & "Site")
* Values for each tag pair
* Ply numeric
* Individual moves
* Individual moves involving captures
* King-side, or Queen-side castling
* "Check" notifications
* End-game result
* Comments between moves
In addition the entire move-list for each game can be folded within
TextMate, and spell checking is only enabled for in-game comments.
Individuals games stored in each PGN file can be immediately accessed
through Textmate's Symbol List (⇧⌘T), which displays
the values stored every game's tag pairs. An external editor can also
be used to visually display the moves in the current symbol scope.
### Creating a new game with the "Insert Seven Tag Roster" snippet
Each game described in a PGN file must include seven tags to describe
the setting for the game. The "Insert Seven Tag Roster" snippet
provides an easy way to include this information by typing
"tags⇥".
When the snippet is inserted then navigating through each value can
be achieved by pressing ⇥.
Default values for each tag are generated automatically, but certain
information such as the names of each opponent are expected.
For convenience the current date will be inserted in the required
"YYYY.MM.DD" format, although this can be altered as required.
### Describing each player's strength with the "Insert Elo Tags" snippet
Optional information on the strength of each opponent's play can be
defined by using the "Insert Elo Tags snippet", these values are to
be added with the rest of the tags in each game definition, and
describes the FIDE Elo rating for each player. A default value of "-"
indicates the rating at the time of the game is unknown.
### Viewing the current game in an external application using "View
Game"
An external application may be used to view the game currently
described by the value in the symbol list by defining the environment
variable "$TM\_PGN\_VIEWER" as the name of an installed application
(e.g. "Vektor3"). When the key combination "⌘R" is used
Textmate will launch the specified program as a seperate process.
Defining shell variables used within TextMate can be achieved by
using the key combination "⌘,", selecting the "Advanced"
preference pane by using the mouse, and finally selecting "Shell
Variables" as a sub-option.
More information about the textmate
mailing list