( ESNUG 326 Item 14 ) --------------------------------------------- [8/25/99]
Subject: ( ESNUG 325 #9 ) A Useful Vim Syntax To View Synopsys Logfiles
> I started playing with VIM not long ago and wanted to pretty up what I was
> seeing in my Synopsys scripts, so I started to generate a rudimentary .vim
> syntax file for Synopsys tools. ...
>
> - Gzim Derti
> Intrinsix Corp. Rochester, NY
From: Peter Kamphuis <kamphuis@hl.siemens.de>
Hi John,
I want to thank Gzim Derti for providing us with a basic dc_shell VIM syntax
file. I'm a VIM fan, too, and have asked for this a year ago already and
haven't had the time to set up something by myself. I have been using the
C-mode as workaround up to now.
A few comments to Gzim's syntax file. I added the following lines:
syn keyword synopStatement which
syn region cString start=+"+ end=+"+
and deleted the "^" character from following line
syn region cComment start="^/\*" end="\*/" contains=cTodo,cSpaceError
Maybe I'll find the time (at home) to improve things, add a syntax file for
the new DC Tcl mode, etc. Of course, I'll share this with the ESNUG
community.
Some time ago I created a simple VIM syntax file for reviewing Synopsys log
files. I think this might be useful for other people, too. I've added the
code below:
" Vim syntax file for (dc_shell) log files
" by Peter Kamphuis, Infineon Technologies AG, Munich
" Remove any old syntax stuff
syntax clear
" Message code
syntax match logCode "\s([A-Z]\+-[0-9]\+)\s$"
" Errors
syntax match lError "^\s*Error:\s.\+)" contains=llError
syntax match llError "^\s*Error:\s" nextgroup=logError
syntax region logError start="." matchgroup=logCode end="\s([A-Z]\+-[0-9]\+)" contained
" Warnings
syntax match lWarning "^\s*Warning:\s.\+)" contains=llWarning
syntax match llWarning "^\s*Warning:\s" nextgroup=logWarning
syntax region logWarning start="." matchgroup=logCode end="\s([A-Z]\+-[0-9]\+)" contained
" Informations
syntax match lInfo "^\s*Information:\s.\+)" contains=llInfo
syntax match llInfo "^\s*Information:\s" nextgroup=logInfo
syntax region logInfo start="." matchgroup=logCode end="\s([A-Z]\+-[0-9]\+)" contained
" Comments
syntax region logComment start="/\*" end="*\/"
if !exists("did_log_syntax_inits")
let did_log_syntax_inits = 1
" Message code
highlight logCode term=NONE ctermfg=DarkRed
" Message
highlight logError term=reverse ctermfg=Red
highlight logWarning term=bold ctermfg=DarkMagenta
highlight logInfo term=underline ctermfg=DarkBlue
" The words Error: Warning: Information:
highlight llError term=NONE ctermfg=Red
highlight llWarning term=NONE ctermfg=Red
highlight llInfo term=NONE ctermfg=DarkBlue
" Comment
highlight link logComment Comment
endif
let b:current_syntax = "log"
" EoF
Note that the color information included is a personal touch that can be
changed, of course. Do not forget to add something like the following line
to your VIM setup file.
au BufNewFile,BufRead *.log* so $VIM/syntax/log.vim
Best regards,
- Peter Kamphuis
Infineon (Siemens) Technologies AG Munich, Germany
|
|