sponsor Vim development Vim logo Vim Book Ad

pgn.vim : syntax highlighting for .pgn (chess) files

 script karma  Rating 8/5, Downloaded by 1354  Comments, bugs, improvements  Vim wiki

created by
Ryan Sarson
 
script type
syntax
 
description
Highlights tag pairs, movetext and comments of Portable Game Notation (PGN) files, which is the most common format for computer processing of chess games.

Recognizes standard algebraic notation and other commonly used notations, as seen on the Wikipedia page for algebraic notation.

It is a new version of Charles Ford's original script, published on this site on 2003-06-14.
 
install details
Put the file in your $VIMRUNTIME/syntax/ directory.
Then in your $VIMRUNTIME/filetype.vim file, add this line:

au BufNewFile,BufRead *.pgn    setf pgn
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
pgn.vim 2.1 2022-05-01 8.2 Ryan Sarson null move numbers
pgn.vim 2.0 2018-03-27 7.0 Ryan Sarson improved pattern matching, recognizes more commonly used notations
pgn.vim 1.0 2016-09-14 7.4 Ryan Sarson complete rewrite
ip used for rating: 18.191.234.62

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
Vim at Github