Alexy Khrabrov | 1 Nov 2009 06:57
Picon
Gravatar

YAML mode for XML editing

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

Jonathan Geiger | 1 Nov 2009 18:03

CSS Edit like preview

I'm looking to implement a CSS Edit like "Live Preview" either as a
Textmate Plugin (or something simpler if that's an option). The
problem of updating an HTML document loaded from anywhere is simple
Cocoa and Javascript. The part I'm struggling with is getting access
to the current textmate document as an NSString (or something else
workable).

I'm able to get access to OakTextView instance and OakDocument
instance in the plugin, but I just can't figure out how to get a copy
of the current document. xmlRepresentation is the closest I can get,
but it's not really what I want. Can anyone point me in the right
direction for that?

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

Hans-Jörg Bibiko | 1 Nov 2009 21:18
Picon

Re: CSS Edit like preview


On 01.11.2009, at 18:03, Jonathan Geiger wrote:

> I'm able to get access to OakTextView instance and OakDocument
> instance in the plugin, but I just can't figure out how to get a copy
> of the current document. xmlRepresentation is the closest I can get,
> but it's not really what I want. Can anyone point me in the right
> direction for that?

Try:
id target = [NSApp targetForAction: <at> selector(document)];
NSLog( <at> "% <at> ", [target stringValue]);

[ “target” is an OakTextView ]

Cheers,
--Hans

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

Jonathan Geiger | 1 Nov 2009 23:03

Re: CSS Edit like preview

Excellent. Thanks alot. It's there right at the bottom of the class
dump. Can't believe I missed it.

On Sun, Nov 1, 2009 at 3:18 PM, Hans-Jörg Bibiko <bibiko@...> wrote:
>
> On 01.11.2009, at 18:03, Jonathan Geiger wrote:
>
>> I'm able to get access to OakTextView instance and OakDocument
>> instance in the plugin, but I just can't figure out how to get a copy
>> of the current document. xmlRepresentation is the closest I can get,
>> but it's not really what I want. Can anyone point me in the right
>> direction for that?
>
> Try:
> id target = [NSApp targetForAction: <at> selector(document)];
> NSLog( <at> "% <at> ", [target stringValue]);
>
> [ “target” is an OakTextView ]
>
> Cheers,
> --Hans
>
> _______________________________________________
> textmate mailing list
> textmate@...
> http://lists.macromates.com/listinfo/textmate
>

_______________________________________________
textmate mailing list
(Continue reading)

Alessandro Vernet | 2 Nov 2009 07:18
Gravatar

Re: "Go to last edit" keyboard shortcut


Hans,

Hans-Jörg Bibiko wrote:
> 
> But you can try if the attached tmPlugin works for better and faster ;)
> [...]
> 

The plugin works like a charm! I love it, thank you.

Alex

-----
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
Orbeon's Blog: http://www.orbeon.com/blog/
Personal Blog: http://avernet.blogspot.com/
Twitter - http://twitter.com/avernet
--

-- 
View this message in context: http://old.nabble.com/%22Go-to-last-edit%22-keyboard-shortcut-tp25930612p26156036.html
Sent from the textmate users mailing list archive at Nabble.com.

_______________________________________________
textmate mailing list
textmate <at> lists.macromates.com
http://lists.macromates.com/listinfo/textmate
Luke Daley | 3 Nov 2009 02:12
Gravatar

Re: YAML mode for XML editing


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  <at>  http://github.com/alkemist/Maven.tmbundle

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

(Continue reading)

Dru Kepple | 4 Nov 2009 00:03
Favicon
Gravatar

Re: Ruby + UI.dialog question.

-----Original Message-----
From:
textmate-bounces+dru=summitprojects.com@...
[mailto:textmate-bounces+dru=summitprojects.com@...]
On Behalf Of Allan Odgaard
It is generally a requirement that the command runs "detached" which commands with HTML output does by
default. Regular commands can also be detached http://wiki.macromates.com/HowTo/RunCommandInBackground

_______________________________________________

Thanks, Allan!  I've been trying to figure this one out for a while.  Got it working very easily, thanks to the
Ruby module.  I've got a lot to learn when it comes to this stuff.  I appreciate that you're so available on the
mailing list.

+dru

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

Juan Pablo Aqueveque | 4 Nov 2009 19:06
Picon

shift right don't work via Keyboard Shortcut

Hi there:

This is my problem, ⌘]  suddenly stopped working, however via menu >
Text > Shift Right work perfectly.

Shift left working OK (via shortcut and menu).

Any light?.

Thanks,

--

-- 
juan pablo aqueveque
www.juque.cl

_______________________________________________
textmate mailing list
textmate <at> lists.macromates.com
http://lists.macromates.com/listinfo/textmate
Hans-Jörg Bibiko | 4 Nov 2009 22:01
Picon

Xcode template: general TextMate plugin

Hi,

while writing the GoToLastEdit plug-in I thought about to have a Xcode  
template which set up a general TextMate plug-in.

Attached is such a template.

To install it simply download it, decompress it, and copy it e.g. into:

/Developer/Library/Xcode/Project Templates/Application Plug-in

Then launch Xcode, choose "New Project" > Category "Application Plug- 
in", and enter an unique and adequate name.

You can then simply build it and restart TextMate. Hopefully you will  
find a new menu item "ExamplePluginMenuItem" in TM's Window submenu.  
If you invoke it, the plugin will reload all bundles, add a bookmark  
to line 1, and show an alert with some information.

The template creates a basic skeletal structure based of the chosen  
project name with a NIB containing the menu item definition. In  
addition you will find in the header file a number of TextMate methods  
which could be useful as dummy declarations to avoid compiler  
warnings. After the build process the plug-in will be copied into ~/ 
Library/Application Support/TextMate/PlugIns.

Please note that this template will only work with TextMate 1.x, and  
it's set up as 32bit universal against SDK 10.5.

I tested it on some Macs, but only for 10.6. In other words feedback  
(Continue reading)

Scott Haneda | 4 Nov 2009 23:55
Favicon

How to get tcl script to "run"

I use TM to frame out basic shell scripts all the time, mostly working  
in bash.

I have this
#!/opt/local/bin/tclsh
puts "start of my tcl script"
set lst {{item 1} {item 2} {item 3}}

What bundle item do I need to unfilter out in order to get "Run" to  
work on this?  Currently I use "Shell Script".

I can end the script in .shell and that does it, but I never have had  
to do that with other bash scripts, I just set #!/bin/bash and I am  
usually good to go.  Why is setting of my shebang to #!/opt/local/bin/ 
tclsh not kicking TM into the correct scope?

Thanks.
--

-- 
Scott * If you contact me off list replace talklists <at>  with scott <at>  *

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


Gmane