[prev in list] [next in list] [prev in thread] [next in thread]
List: vim
Subject: RE: Very simple syntax highlighting
From: "Dave Silvia" <dsilvia () mchsi ! com>
Date: 2004-09-30 8:10:54
Message-ID: PLEIKIGPNODDMNJGDJCPAEDLCDAA.dsilvia () mchsi ! com
[Download RAW message or body]
Try
Vive:
syn match xDate '\d\d\.\d\d\.\d\d'
hi link xDate Identifier
let today='09.30.04'
highlight Identifier
echo today
Results:
Identifier xxx term=underline ctermfg=3 guifg=DarkCyan
09.30.04
Vive:
When I ran this in Vive, the 09.30.04 in the Results: was displayed as
DarkCyan
HTH:
thx,
Dave S.
*** -----Original Message-----
*** From: Gabriel Birke [mailto:strauchdieb@gmx.de]
*** Sent: Thursday, September 30, 2004 2:14 AM
*** To: vim@vim.org
*** Subject: Very simple syntax highlighting
***
***
*** Hello!
***
*** I've got a text file with the following format: A date in the format
*** dd.mm.YY, linebreak, some text lines with breaks, an empty line.
***
*** I want to highlight the dates with a syntax file but until now I had no
*** success.
***
*** The syntax file looks like this:
***
*** syn clear
*** syn match xDate +\d\+\.d\+\.d\++
*** syn sync minlines=50
*** hi def xDate Identifier
***
*** it is in ~/.vim/syntax/Journal.vim and I can load it with ":set
*** syntax=Journal". The ":syntax list" command lists the xDate element
*** correctly. What am i doing wrong?
***
*** Gabriel
***
*** --
*** "The more laws and order are made prominent, the
*** more thieves and robbers there will be." --Lao Tzu
***
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic