YAML mode for XML editing

View: New views
3 Messages — Rating Filter:   Alert me  

YAML mode for XML editing

by braver :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

While working with Maven, I've found a maven-yamlpom-plugin, which
allows to edit the pom.xml as pom.yml, by converting one to the other
and keeping them in sync.  The problem with the plugin is it's buggy
and rearranges lines, drops all comments, and can't sync when times
match, such as after a git pull.

While thinking about it, it occurred to me that what matters when
working with such hairy XML in YAML is that YAML is a human-readable
form of XML.  It's not really necessary to keep a pom.yml -- I only
edit it in TextMate anyways.  What's really needed is an XML *editing*
mode... in YAML!

Is it possible to have an XML mode where XML will be converted to YAML
upon loading, then dumped back as XML?

Cheers,
Alexy

_______________________________________________
textmate mailing list
textmate@...
http://lists.macromates.com/listinfo/textmate

Re: YAML mode for XML editing

by Luke Daley :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On 01/11/2009, at 3:57 PM, Alexy Khrabrov wrote:

> While working with Maven, I've found a maven-yamlpom-plugin, which
> allows to edit the pom.xml as pom.yml, by converting one to the other
> and keeping them in sync.  The problem with the plugin is it's buggy
> and rearranges lines, drops all comments, and can't sync when times
> match, such as after a git pull.
>
> While thinking about it, it occurred to me that what matters when
> working with such hairy XML in YAML is that YAML is a human-readable
> form of XML.  It's not really necessary to keep a pom.yml -- I only
> edit it in TextMate anyways.  What's really needed is an XML *editing*
> mode... in YAML!
>
> Is it possible to have an XML mode where XML will be converted to YAML
> upon loading, then dumped back as XML?

This is currently not possible in an elegant way.

It will be possible in future versions of TM2, based on discussions I  
have had with Alan along these lines.

BTW, there is a Maven bundle @ http://github.com/alkemist/Maven.tmbundle

_______________________________________________
textmate mailing list
textmate@...
http://lists.macromates.com/listinfo/textmate

Re: YAML mode for XML editing

by Allan Odgaard-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 1 Nov 2009, at 06:57, Alexy Khrabrov wrote:

> [...] Is it possible to have an XML mode where XML will be converted  
> to YAML upon loading, then dumped back as XML?

As Luke revealed, it is something that will be supported in the  
future, for now though you can make a wrapper around ‘mate -w’ to  
convert input/output and initiate your edits via that wrapper (could  
setup a bundle command to call it).


_______________________________________________
textmate mailing list
textmate@...
http://lists.macromates.com/listinfo/textmate