Monday, December 31, 2012

Having trouble using conceal

I have a map I use that inserts a timestamp in the form of

__TS:1356990559|Dec 31, 2012 14:49__

The dual nature allows me to visually parse the date, and process my entries easily with a program that parses the file.

I'm trying to conceal the TS:...| part to make it visually more pleasing. Basically, eye-candy. But I am not succeeding at all.

This is what I have (if you want the context, see it here: http://goo.gl/EDZ3q )

if has( 'conceal' )

" How can I use variables for the patterns?
"syntax region myTimeStamp start="__TS:" end="\|" oneline conceal cchar=_
syntax region myTimeStamp start="__TS:" end="\|"
"highlight link myTimeStamp Conceal
highlight myTimeStamp ctermfg=red ctermbg=blue
set conceallevel=2

endif

Obviously, I'm misunderstanding syntax highlighting in general, because the region isn't being highlighted, let aloned concealed (when uncommented).

What am I doing wrong?

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: