sponsor Vim development Vim logo Vim Book Ad

gdl.vim : GDL/VCG syntax highlighting file

 script karma  Rating 78/23, Downloaded by 2335  Comments, bugs, improvements  Vim wiki

created by
Alexander Evstiougov
 
script type
syntax
 
description
gdl.vim is a syntax highlighting package for the graph description language GDL (fka VCG).

Whenever you open a .gdl or .vcg file, the package automatically analyzes the text and marks keywords, attribute specifications, comments, etc. using customizable colors. Whenever you start writing a new GDL document, it automatically analyzes the new text for the proper spelling/syntax, highlighting correct items.

Benefit to you: your GDL file is easier to read and you can understand GDL source code faster.

gdl.vim is intended to go beyond simple syntax and spell-checking. It should also check attribute-value pairs for type correctness. In some cases, it will even check if a specified number is within the valid range.

The package was tested under Vim 5.6/Linux, gVim 6.1/WinNT4.0, gVim 6.2/Win2000, and gVim6.3/Win2000.

For further information, screenshots, etc., visit http://www.aiSee.com/gdledit

Your feedback is appreciated.
 
install details
Unix users:
-------------------------
You can simply copy the downloaded VIM file to your home directory and then use the Vim command
:source ~/gdl.vim

Alternatively, perform the following steps:

1. Copy the downloaded VIM file to the directory $VIMRUNTIME/syntax/
2. Add the following line to your .vimrc file (this file is usually to be found in your home directory):
:autocmd BufNewFile,BufRead *.{gdl,vcg} source $VIMRUNTIME/syntax/gdl.vim

If you are not sure about the value of $VIMRUNTIME, try ~/.vim or type
:help runtime

Now, Vim should automatically recognize GDL and VCG files. You can switch highlighting off and on in the editor by using the commands
:syn off
:syn on

There may be some highlighting irregularities if you use an old Vim version which is not capable of matching the new line character \n. (Type ":help \n" if you are not sure.) As a work-around, it is sufficient to begin each new line of your GDL code with one or several white spaces. If you use Vim 6.x, don't bother.

For further details about Vim syntax highlighting, see
:help syntax

Windows users:
-------------------------
You can simply copy the downloaded VIM file to C:\ and then use the Vim command
:source C:\gdl.vim
to switch highlighting on.

If you would like Vim to automatically recognize GDL and VCG files, add the following two lines:

" Graph Description Language
au BufNewFile,BufRead *.{gdl,vcg} source C:\gdl.vim

to your filetype.vim file, which is usually to be found in the directory C:\Vim\vim63\ or C:\Program Files\Vim\vim63\.

This script also works fine in conjunction with vimscript #750.
 

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
gdl.vim 1.9 2005-02-17 5.7 Alexander Evstiougov Added support for custom composite edge arrows.
gdl.vim 1.9win 2005-02-17 6.0 Alexander Evstiougov This one's for those who work under Windows.
gdl.vim 1.8 2005-01-13 5.7 Alexander Evstiougov Added support for the new edge arrow styles.
gdl.vim 1.8win 2005-01-13 6.0 Alexander Evstiougov This one's for those who work under Windows.
gdl.vim 1.6 2003-09-11 5.7 Alexander Evstiougov Added support for new GDL attributes which will be introduced in the next aiSee release.
gdl.vim 1.6win 2003-09-11 6.0 Alexander Evstiougov This one's for those who work under Windows.
ip used for rating: 18.116.51.117

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