Re: [asciidoc-discuss] editor remembering asciidoc markup for me?

2007-02-05 Thread Stuart Rackham
Dag Wieers wrote:
> On Sun, 4 Feb 2007, Stuart Rackham wrote:
> 
>> Stuart Rackham wrote:
>>> Nice work guys!
>>>
>>> I tried it out on the ./doc/asciidoc.txt file which pretty well makes
>>> use of all AsciiDoc syntax. Worked well up to:
>>>
>>>  acute accents to the right\'' are rendered in quotation marks.
>>>
>>> At which point all text following the two single quotes was blue (hit
>>> ^L to refesh and fix).
>>>
>>> - Is there any reason for adoc instead of asciidoc? Personally I
>>>prefer asciidoc rather than creating another name. I'd also prefer
>>>to stick with the existing .txt extension for AsciiDoc source files.
>>>Surely there are ways to have Vim automagically detect file types
>>>other than just file extensions?
>> The Vim filetypes mechanism should work here, or just put:
>>
>> // vim: set syntax=adoc:
>>
>> As the last line in your source file.
> 
> Right, but I would prefer to not have to do that. There is a way to 
> autodetect the file, but it may not be so easy. Especially the 2 line 
> title syntax seems to be hard to do correct (since the length of the line 
> needs to be the exact size).
> 
> We could even make eg. python code blocks use the python syntax files etc.
> 
> Is ^// a proper way of commenting as well ? The syntax file needs to 
> reflect it as well than so I added it to my document.

Yes lines starting with two forward slashes are treated as comments and 
are ignored (it's implemented as a block macro that outputs nothing). 
The other way of commenting is to use a delimited comment block where 
delimiter lines are 4 or more forward slashes.


> 
> What would be the easiest way to work on the same file ? Can we put this 
> in a versioning system where a few people can work on it concurrently 
> until it is close to something we would release ?

Just put the .vim syntax file on you website with a list of todo's and 
solicit patches from interested users.


> 
> Kind regards,
> --   dag wieers,  [EMAIL PROTECTED],  http://dag.wieers.com/   --
> [all I want is a warm bed and a kind word and unlimited power]
> 

Cheers, Stuart

___
Asciidoc-discuss mailing list
[email protected]
http://metaperl.com/cgi-bin/mailman/listinfo/asciidoc-discuss


Re: [asciidoc-discuss] editor remembering asciidoc markup for me?

2007-02-04 Thread Dag Wieers
On Sun, 4 Feb 2007, Stuart Rackham wrote:

> Stuart Rackham wrote:
> > Nice work guys!
> > 
> > I tried it out on the ./doc/asciidoc.txt file which pretty well makes
> > use of all AsciiDoc syntax. Worked well up to:
> > 
> >  acute accents to the right\'' are rendered in quotation marks.
> > 
> > At which point all text following the two single quotes was blue (hit
> > ^L to refesh and fix).
> > 
> > - Is there any reason for adoc instead of asciidoc? Personally I
> >prefer asciidoc rather than creating another name. I'd also prefer
> >to stick with the existing .txt extension for AsciiDoc source files.
> >Surely there are ways to have Vim automagically detect file types
> >other than just file extensions?
> 
> The Vim filetypes mechanism should work here, or just put:
> 
> // vim: set syntax=adoc:
> 
> As the last line in your source file.

Right, but I would prefer to not have to do that. There is a way to 
autodetect the file, but it may not be so easy. Especially the 2 line 
title syntax seems to be hard to do correct (since the length of the line 
needs to be the exact size).

We could even make eg. python code blocks use the python syntax files etc.

Is ^// a proper way of commenting as well ? The syntax file needs to 
reflect it as well than so I added it to my document.

What would be the easiest way to work on the same file ? Can we put this 
in a versioning system where a few people can work on it concurrently 
until it is close to something we would release ?

Kind regards,
--   dag wieers,  [EMAIL PROTECTED],  http://dag.wieers.com/   --
[all I want is a warm bed and a kind word and unlimited power]

___
Asciidoc-discuss mailing list
[email protected]
http://metaperl.com/cgi-bin/mailman/listinfo/asciidoc-discuss


Re: [asciidoc-discuss] editor remembering asciidoc markup for me?

2007-02-03 Thread Stuart Rackham
Stuart Rackham wrote:
> Nice work guys!
> 
> I tried it out on the ./doc/asciidoc.txt file which pretty well makes
> use of all AsciiDoc syntax. Worked well up to:
> 
>  acute accents to the right\'' are rendered in quotation marks.
> 
> At which point all text following the two single quotes was blue (hit
> ^L to refesh and fix).
> 
> - Is there any reason for adoc instead of asciidoc? Personally I
>prefer asciidoc rather than creating another name. I'd also prefer
>to stick with the existing .txt extension for AsciiDoc source files.
>Surely there are ways to have Vim automagically detect file types
>other than just file extensions?

The Vim filetypes mechanism should work here, or just put:

// vim: set syntax=adoc:

As the last line in your source file.


> 
> - Is it possible to highlight the whole of the title (not just the
>underline)?
> 
> - It would be nice to highlight the various block delimiters.
> 
> Great stuff though and I'd be really keen to put it in the next
> release once you're ready to release it.
> 
> BTW I had to :set ff=unix and write the file on my Linux box else I
> got the following errors:
> 
> Error detected while processing /home/srackham/.vim/syntax/adoc.vim:
> line3:
> E492: Not an editor command: ^M
> line4:
> E15: Invalid expression: version < 600^M
> line   76:
> E171: Missing :endif
> 
> 
> Cheers, Stuart
> 
> 
> Dag Wieers wrote:
>> On Sat, 3 Feb 2007, 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 *.txtsource ~/.vim/txt.vimrc
>>> autocmd BufRead*.txtsource ~/.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.
>> Maybe a standardized .adoc extension may help wrt. this ? In that case 
>> calling the file adoc.vim may be fine as well.
>>
>>
 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.
>> No problem, I took the time to improve it slightly. But I'm committed to 
>> work on it on other files I have at work to further improve it in the 
>> future. In my opinion, having it as part of asciidoc or vim will help 
>> scale the work to other people as well.
>>
>>
  - 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]]
>>>   * <>
>>>   * titles
>>>   * comments
>>>   * maybe links
>> Right, I just added better support for the '= titles', the 
>> 'titles\n--' seems to be much hard though :)
>>
>>
  - 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...
>> Well, I now understand the complexity :)
>>
>>
 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 
>>> ;-)
>> I understand, but a simple comment at the top stating that this is a work 
>> in progress and contact information may get us a long way. Also 

Re: [asciidoc-discuss] editor remembering asciidoc markup for me?

2007-02-03 Thread Stuart Rackham
Nice work guys!

I tried it out on the ./doc/asciidoc.txt file which pretty well makes
use of all AsciiDoc syntax. Worked well up to:

 acute accents to the right\'' are rendered in quotation marks.

At which point all text following the two single quotes was blue (hit
^L to refesh and fix).

- Is there any reason for adoc instead of asciidoc? Personally I
   prefer asciidoc rather than creating another name. I'd also prefer
   to stick with the existing .txt extension for AsciiDoc source files.
   Surely there are ways to have Vim automagically detect file types
   other than just file extensions?

- Is it possible to highlight the whole of the title (not just the
   underline)?

- It would be nice to highlight the various block delimiters.

Great stuff though and I'd be really keen to put it in the next
release once you're ready to release it.

BTW I had to :set ff=unix and write the file on my Linux box else I
got the following errors:

Error detected while processing /home/srackham/.vim/syntax/adoc.vim:
line3:
E492: Not an editor command: ^M
line4:
E15: Invalid expression: version < 600^M
line   76:
E171: Missing :endif


Cheers, Stuart


Dag Wieers wrote:
> On Sat, 3 Feb 2007, 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 *.txtsource ~/.vim/txt.vimrc
>> autocmd BufRead*.txtsource ~/.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.
> 
> Maybe a standardized .adoc extension may help wrt. this ? In that case 
> calling the file adoc.vim may be fine as well.
> 
> 
>>> 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.
> 
> No problem, I took the time to improve it slightly. But I'm committed to 
> work on it on other files I have at work to further improve it in the 
> future. In my opinion, having it as part of asciidoc or vim will help 
> scale the work to other people as well.
> 
> 
>>>  - 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]]
>>   * <>
>>   * titles
>>   * comments
>>   * maybe links
> 
> Right, I just added better support for the '= titles', the 
> 'titles\n--' seems to be much hard though :)
> 
> 
>>>  - 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...
> 
> Well, I now understand the complexity :)
> 
> 
>>> 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 
>> ;-)
> 
> I understand, but a simple comment at the top stating that this is a work 
> in progress and contact information may get us a long way. Also important 
> is making sure the syntax get loaded for asciidoc documents automatically.
> This hoewever is practically not possible atm.
> 
> 
>>> 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. 

Re: [asciidoc-discuss] editor remembering asciidoc markup for me?

2007-02-03 Thread Stuart Rackham
Hi Thomas

Thomas Berker wrote:
> Thomas Berker wrote:
>> Yes, a nice cheat sheet would be a good start. Right now I use a
>> little asciidoc text based on the examples that come with asciidoc.
>> Maybe I'll write one my own.
> 
> Ok, now I've made me a cheat sheet, it's here:
> http://liksom.info/blog/?q=node/114

That's really nice -- I've made a note to link it to the AsciiDoc home page.


> 
> Best, Thomas
> 
> ___
> Asciidoc-discuss mailing list
> [email protected]
> http://metaperl.com/cgi-bin/mailman/listinfo/asciidoc-discuss
> 

Cheers, Stuart

___
Asciidoc-discuss mailing list
[email protected]
http://metaperl.com/cgi-bin/mailman/listinfo/asciidoc-discuss


Re: [asciidoc-discuss] editor remembering asciidoc markup for me?

2007-02-03 Thread Stuart Rackham
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 *.txtsource ~/.vim/txt.vimrc
> autocmd BufRead*.txtsource ~/.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]]
>   * <>
>   * 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
> [email protected]
> http://metaperl.com/cgi-bin/mailman/listinfo/asciidoc-discuss


Cheers, Stuart

___
Asciidoc-discuss mailing list
[email protected]
http://metaperl.com/cgi-bin/mailman/listinfo/asciidoc-discuss


Re: [asciidoc-discuss] editor remembering asciidoc markup for me?

2007-02-03 Thread Stuart Rackham
Thomas Berker wrote:
> Hi!
> 
> Felix Obenhuber <[EMAIL PROTECTED]> wrote:
>> I've seen a two pages short reference - thinks it was shipped with
>> 7.x but don't remember exactly...
> 
> Yes, a nice cheat sheet would be a good start. Right now I use a little
> asciidoc text based on the examples that come with asciidoc. Maybe I'll
> write one my own.

AsciiDoc comes with a rudimentary cheat sheet, try running:

   asciidoc -h syntax

You can customize help by adding to or modifying the system wide
/etc/help.conf file or your user ~/.asciidoc/help.conf file.


> 
>> macros? Think about why you use asciidoc. What action should be
>> shorter than typing one or two chars to achieve the desired result?
>> ([[]],'blah')
>  
> Typing the chars is fast if you remember them, and the most common
> markup _is_ easy to remember. But for markup which I use less often, I
> flip back and forth from the (excellent) documentation and the little
> reference file to my text, which is not so fast. I am lazy and asciidoc
> allows me to write docbook with minimal effort. And I was just wondering
> whether this effort could be minimized even further ;-)
> 
>  Thomas
> 
> ___
> Asciidoc-discuss mailing list
> [email protected]
> http://metaperl.com/cgi-bin/mailman/listinfo/asciidoc-discuss
> 

Cheers, Stuart

___
Asciidoc-discuss mailing list
[email protected]
http://metaperl.com/cgi-bin/mailman/listinfo/asciidoc-discuss


Re: [asciidoc-discuss] editor remembering asciidoc markup for me?

2007-02-03 Thread Dag Wieers
On Sat, 3 Feb 2007, Thomas Berker wrote:

> Thomas Berker wrote:
> > Yes, a nice cheat sheet would be a good start. Right now I use a
> > little asciidoc text based on the examples that come with asciidoc.
> > Maybe I'll write one my own.
> 
> Ok, now I've made me a cheat sheet, it's here:
> http://liksom.info/blog/?q=node/114

Now, it would have been really slick if the cheat sheet was written in 
asciidoc itself.

(Sorry, someone had to mention it :))

Kind regards,
--   dag wieers,  [EMAIL PROTECTED],  http://dag.wieers.com/   --
[all I want is a warm bed and a kind word and unlimited power]

___
Asciidoc-discuss mailing list
[email protected]
http://metaperl.com/cgi-bin/mailman/listinfo/asciidoc-discuss


Re: [asciidoc-discuss] editor remembering asciidoc markup for me?

2007-02-03 Thread Thomas Berker
Thomas Berker wrote:
> Yes, a nice cheat sheet would be a good start. Right now I use a
> little asciidoc text based on the examples that come with asciidoc.
> Maybe I'll write one my own.

Ok, now I've made me a cheat sheet, it's here:
http://liksom.info/blog/?q=node/114

Best, Thomas

___
Asciidoc-discuss mailing list
[email protected]
http://metaperl.com/cgi-bin/mailman/listinfo/asciidoc-discuss


Re: [asciidoc-discuss] editor remembering asciidoc markup for me?

2007-02-03 Thread Dag Wieers
On Sat, 3 Feb 2007, 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 *.txtsource ~/.vim/txt.vimrc
> autocmd BufRead*.txtsource ~/.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.

Maybe a standardized .adoc extension may help wrt. this ? In that case 
calling the file adoc.vim may be fine as well.


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

No problem, I took the time to improve it slightly. But I'm committed to 
work on it on other files I have at work to further improve it in the 
future. In my opinion, having it as part of asciidoc or vim will help 
scale the work to other people as well.


> >  - 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]]
>   * <>
>   * titles
>   * comments
>   * maybe links

Right, I just added better support for the '= titles', the 
'titles\n--' seems to be much hard though :)


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

Well, I now understand the complexity :)


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

I understand, but a simple comment at the top stating that this is a work 
in progress and contact information may get us a long way. Also important 
is making sure the syntax get loaded for asciidoc documents automatically.
This hoewever is practically not possible atm.


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

I did, here's my work on it. I lack any git skills so I hope you don't 
mind doing a diff.

Also, if I compare the asciidoc syntax file against the one that ship wit 
vim 7 I see a lot more complexity that is not in the official ones. I 
understand this is to allow backward compatibility with older vim 
releases. (< 5.8)

Given the fact that even RHEL 2.1 ships with vim 6 I wonder if the need 
to be backward compatible with ancient vim's is warranted.

Stuart: How about pushing this into the next asciidoc release so we can 
all advantage from it and can send patches against the upstream syntax 
file ?

Thanks in advance,
--   dag wieers,  [EMAIL PROTECTED],  http://dag.wieers.com/   --
[all I want is a warm bed and a kind word and unlimited power]" Vim syntax file
" Language: Asciidoc style

if version < 600
  syntax clear
elseif 

Re: [asciidoc-discuss] editor remembering asciidoc markup for me?

2007-02-03 Thread Felix Obenhuber
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 *.txtsource ~/.vim/txt.vimrc
autocmd BufRead*.txtsource ~/.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]]
  * <>
  * 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?

> 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

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


signature.asc
Description: Digital signature
___
Asciidoc-discuss mailing list
[email protected]
http://metaperl.com/cgi-bin/mailman/listinfo/asciidoc-discuss


Re: [asciidoc-discuss] editor remembering asciidoc markup for me?

2007-02-03 Thread Thomas Berker
Hi!

Felix Obenhuber <[EMAIL PROTECTED]> wrote:
> I've seen a two pages short reference - thinks it was shipped with
> 7.x but don't remember exactly...

Yes, a nice cheat sheet would be a good start. Right now I use a little
asciidoc text based on the examples that come with asciidoc. Maybe I'll
write one my own.

> macros? Think about why you use asciidoc. What action should be
> shorter than typing one or two chars to achieve the desired result?
> ([[]],'blah')
 
Typing the chars is fast if you remember them, and the most common
markup _is_ easy to remember. But for markup which I use less often, I
flip back and forth from the (excellent) documentation and the little
reference file to my text, which is not so fast. I am lazy and asciidoc
allows me to write docbook with minimal effort. And I was just wondering
whether this effort could be minimized even further ;-)

 Thomas

___
Asciidoc-discuss mailing list
[email protected]
http://metaperl.com/cgi-bin/mailman/listinfo/asciidoc-discuss


Re: [asciidoc-discuss] editor remembering asciidoc markup for me?

2007-02-03 Thread Dag Wieers
On Sat, 3 Feb 2007, Felix Obenhuber wrote:

> On 03 Feb 07 - 01:50, Thomas Berker wrote:
>
> > Or has someone written a set of macros or an "asciidoc-mode" for some
> > existing editor (besides emacs and vim)?
> 
> Beside you don't want to use vi, I think the asciidoc syntax file I've started
> some times ago fits in here. [1] [2]. Maybe someone can take a look at and 
> hopefully
> send me corrections...
> 
> [1] git://obenhuber.de/pub/git/adocvim.git
> [2] http://www.obenhuber.de/cgi-bin/gitweb.cgi?p=adocvim.git;a=summary 

Hi Felix,

I was delighted to find out about your vim syntax file. However I have 
some questions/remarks about the usage.

First of all, I dropped it in ~/.vim/syntax/ but it didn't get loaded. I 
tried using the .adoc extension (hoping there was some mapping between 
extension and syntax file). The syntax file was not loaded automatically.

Is there a way to make this happen ? Eventually I did ':set syntax=adoc' 
and that gave me some colors.

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.

 - comments ( comment ) were marked as such.

 - titles are coloured as well (not just the lines) when you use the 
   syntax

   this is a title
   ---

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

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.

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 ?

Nevertheless, I'm grateful for your initiative :)

Kind regards,
--   dag wieers,  [EMAIL PROTECTED],  http://dag.wieers.com/   --
[all I want is a warm bed and a kind word and unlimited power]

___
Asciidoc-discuss mailing list
[email protected]
http://metaperl.com/cgi-bin/mailman/listinfo/asciidoc-discuss


Re: [asciidoc-discuss] editor remembering asciidoc markup for me?

2007-02-03 Thread Felix Obenhuber
On 03 Feb 07 - 01:50, Thomas Berker wrote:
> ("Know your editor"), but I am just no vim-person. Is there anybody out
> there who knows about an editor which helps me to write asciidoc
> documents? My problem is remembering the markup since I write in
> asciidoc only once in a while.

I've seen a two pages short reference - thinks it was shipped with 7.x but
don't remember exactly...

>There are so many editors out there, so
> what I am searching for should not be so difficult to find: An editor
> which allows the assignment of asciidoc markup while having - how
> should I put this - a flatter learning curve than emacs or vi(m).

What do you mean when with "assignment of asciidoc markup"? Syntax highlighting?
Some buttons to press in order to insert asciidoc macros?
Think about why you use asciidoc. What action should be shorter than typing
one or two chars to achieve the desired result? ([[]],'blah')

> Or has someone written a set of macros or an "asciidoc-mode" for some
> existing editor (besides emacs and vim)?

Beside you don't want to use vi, I think the asciidoc syntax file I've started
some times ago fits in here. [1] [2]. Maybe someone can take a look at and 
hopefully
send me corrections...


cheers,

Felix

[1] git://obenhuber.de/pub/git/adocvim.git
[2] http://www.obenhuber.de/cgi-bin/gitweb.cgi?p=adocvim.git;a=summary 

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

___
Asciidoc-discuss mailing list
[email protected]
http://metaperl.com/cgi-bin/mailman/listinfo/asciidoc-discuss