Felix Obenhuber wrote:
> 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
> here.
> 
>>  - 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 
> marked
> are:
>  
>   * [[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 
> asciidoc. 
> The binding between file suffix and syntax can be individualy done as decribed
> above...
> 
> Stuart: did you define any naming conventions?

The only file name conventions I observe are:

- The standard text file .txt extension for AsciiDoc source -- AsciiDoc
source files are text and files and are used as human readable text
files so the .txt extension makes sense.

- The text files generated by a2x default to the .text extension to
distinguish them from the .txt source file and so as not to overwrite
the .txt source file.


> 
>> 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.
> 
> cheers,
> 
> Felix
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Asciidoc-discuss mailing list
> Asciidoc-discuss@metaperl.com
> http://metaperl.com/cgi-bin/mailman/listinfo/asciidoc-discuss


Cheers, Stuart

_______________________________________________
Asciidoc-discuss mailing list
Asciidoc-discuss@metaperl.com
http://metaperl.com/cgi-bin/mailman/listinfo/asciidoc-discuss

Reply via email to