On 03 Feb 07 - 13:32, Dag Wieers wrote:
> Is there a way to make this happen ? Eventually I did ':set syntax=adoc' 
> and that gave me some colors.

I'm using

autocmd BufNewFile *.txt            source ~/.vim/txt.vimrc
autocmd BufRead    *.txt            source ~/.vim/txt.vimrc

to get the vim adjustments described at the asciidoc site and to 

set syn=adoc

so the file is expected as syntax file... Thinks that there are lots of
possibilities to get a syntax file working but don't know whats the best and
smartest way.

> Secondly, although the syntax file is a vast improvement, some things are 
> not working. I have no understanding of writing syntax files but it would 
> be desirable if eg.

Let me say that the file was a quick and dirty action. I had to write a small
article with a fellow student and he complained about "the editor interface". It
was the first time he used something different to openoffice and word... So I
took the twiki syntax file and adopted 'partly' to asciidoc. Sure I know that
theres only a very small subset definend and the regex used are crappy over and
over. I've been in doubt about announcing it here because of being ashame...
After sending my previous post I took a look at the file and noticed that some
Twiki elements are also included... :-/. Release often and early...so we're

>  - comments (//// comment ////) were marked as such.
>  - titles are coloured as well (not just the lines) when you use the 
>    syntax
>        this is a title
>        ---------------

I intend to use the ==sometitle format. We should first of all consider which
elements we want to have coloured. Could imagine that a file blinking like a
christmas tree won't be usable anymore. Things what IMHO definitly should be 
  * [[foo]]
  * <<bar>>
  * titles
  * comments
  * maybe links

>  - bullets are coloured (first level is not coloured, second is ?)
> Lastly, I found a problem with the URL syntax where you have named links 
> like eg. http://dag.wieers.com/[Dag Wieers' Homepage]. The current syntax 
> colours only up to [Dag .

As you see - there's something to do...

> Now, what would be required to have the adoc.syntax shipped with the next 
> release of vim (even in an incomplete state) and with the next 
> release of asciidoc ? This way packagers can place the syntax file in the 
> asciidoc package until it gets shipped with vim.

Would be great, but in the current state of the file there's no way to ship it
without driving some people who are familiar with regex and vim to madness ;-)

> Also, what is the reason this is called adoc.vim and not eg. asciidoc.vim ?
> Is adoc going to be the 'standard' extension for asciidoc ?

Ohh. Don't think so. I'll rename to the syntax name defined in the file to 
The binding between file suffix and syntax can be individualy done as decribed

Stuart: did you define any naming conventions?

> Nevertheless, I'm grateful for your initiative :)

Thanks. Take this as ignition spark. As you've seen my vim and regex skills are
quite poor so feel free to rewrite, extend or anything else.



Felix Obenhuber <[EMAIL PROTECTED]>
http://www.obenhuber.de | GPG: F696D489
"felixatobenhuber.de.sig" 4L, 147C written       4,67           All

Attachment: signature.asc
Description: Digital signature

Asciidoc-discuss mailing list

Reply via email to