snpsMan2VimSyntax

Syntax-highlighting Synopsys commands.

  • Highlights commands, options, and attributes.
  • Easy to re-compile for new tool versions.
snpsMan2VimSyntax in use

snpsMan2VimSyntax

This Perl script will use man pages of Synopsys commands to compile syntax definitions for the vim text editor.

Rather than providing an out-dated set of syntax definitions, this script will compile them using the tool versions that you have installed on your system.

The compiled syntax file works in conjunction with the Tcl syntax file that is pre-installed with vim-7.x.


How do I use snpsMan2VimSyntax?

Make sure the Synopsys executables (e.g. 'dc_shell') are added to your $PATH variable. Then run:

% snpsMan2VimSyntax ---verbose
The script will search for the 'man' catalogues installed alongside the Synopsys tools, and will parse all commands in the 'cat2' category, compiling them into a syntax file: synopsys.vim.

For more options, use:

% snpsMan2VimSyntax --help


Installing the synopsys.vim File

The aim is not to replace the tcl.vim file that already exists on your system. Instead, the synopsys.vim file is used to extend the Tcl syntax definitions. To do this, place the file here:

~/.vim/syntax/synopsys.vim
Next, create this add-on Tcl syntax definition file:
~/.vim/syntax/after/tcl.vim
and edit it to contain:
" Vim syntax file
" This file is loaded AFTER the standard tcl.vim file.

" Include the Synopsys commands.
source ~/.vim/syntax/synopsys.vim

" Additional syntax definitions:
Now open one of your Tcl scripts in vim and make sure you use :syntax on and :set syntax=tcl.

Specs

snpsMan2VimSyntax
Freeware
Version 1.6.1
26 August 2015
Language: English

Other Info

The Synopsys tools need to be installed.

The script uses man to parse the man pages and col to remove colour codes.

To auto-detect standard Tcl commands, a stand-alone Tcl installation is needed.

The syntax files have been tested with vim 7.3.

Downloads
Features

Synopsys Tools

These tools have been tested:

  • Design Compiler
  • IC Compiler
  • Formality
  • PrimeTime

Other tools may also be supported since man pages usually follow a standard format.

Old tcl.vim Support

If you are using the older tcl.vim syntax files, maintained by SM Smithfield (available on www.vim.org), then run the script with the --old-tcl-vim options.

Known Issues

The DC man page for the 'set_message_info' command contains a typo in the arguments list: -stop_ff. It should be -stop_off. The script does not detect this, sorry.