On Wednesday, January 2, 2013 12:24:05 AM UTC-7, Tony Mechelynck wrote:
> Try sourcing it from an autocommand, as follows:
> 
>       au VimEnter * au Syntax * source ~/.vim/ownsyntax.vim

That didn't work, but this did:

if ! exists( "autocmds_loaded" )

  let autocmds_loaded = 1
  autocmd BufEnter * source <sfile>

endif

if has( 'conceal' )

  " How can I use variables for the patterns?
  "syntax region myTimeStamp start="__TS:" end="|" conceal
  syntax match myTimeStamp "__TS:.*|" conceal
  highlight myTimeStamp ctermfg=red ctermbg=blue
  set conceallevel=2

endif


Thank you.

My remaining problems are how to use a variable in the match (or region, I'm 
not sure which is better) and how to make the syntax work in commented sections.

-- 
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

Reply via email to