One thing I really miss from vim is the "Copy character above cursor" function. I've looked in the TM docs, but I can't see anything similar, or am I missing it?
Best wishes,
N
On Apr 6, 2006, at 11:51 PM, Nicholas Cole wrote:
One thing I really miss from vim is the "Copy character above cursor" function. I've looked in the TM docs, but I can't see anything similar, or am I missing it?
I don't think TextMate has native support for that, but I've attached a quick-and-dirty macro that closely approximates it. Assign it to Ctrl-Y and it should feel like vim.
Trevor
P.S. Are plists the right way to exchange macros? Snippets, commands, and the like are easy because they're just plain text, but macros are a different beast...
P.S. Are plists the right way to exchange macros? Snippets, commands, and the like are easy because they're just plain text, but macros are a different beast...
Dear Trevor,
It's a good question - I can't actually see how to install your file. But thanks for the hint that macros were the way to achieve what I wanted - my own "quick-and-dirty" effort works well enough for the moment.
Best wishes,
N
On 7/4/2006, at 10:21, Trevor Harmon wrote:
P.S. Are plists the right way to exchange macros? Snippets, commands, and the like are easy because they're just plain text, but macros are a different beast...
That or maybe just create a new bundle, copy it to there and ship the bundle.
In retrospect I should have given snippets, macros, commands, etc. a tmSnippet, tmMacro, tmCommand, etc. extension and allowed TM to open these directly and made them drag-able from teh bundle editor to any app (and I will in the future).
Trevor,
A bit off topic, but your signature is invalid ;)
Unable to verify message signature
The digital signature for this message is incorrect. The message may have been tampered with or corrupted since being signed by "trevor@vocaro.com".
Eric Coleman
http://aplosmedia.com home: 412 399 1024 cell: 412 779 5176
On Apr 7, 2006, at 4:21 AM, Trevor Harmon wrote:
On Apr 6, 2006, at 11:51 PM, Nicholas Cole wrote:
One thing I really miss from vim is the "Copy character above cursor" function. I've looked in the TM docs, but I can't see anything similar, or am I missing it?
I don't think TextMate has native support for that, but I've attached a quick-and-dirty macro that closely approximates it. Assign it to Ctrl-Y and it should feel like vim.
Trevor
P.S. Are plists the right way to exchange macros? Snippets, commands, and the like are easy because they're just plain text, but macros are a different beast...
<Copy character above cursor.plist>
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
On Apr 7, 2006, at 8:41 AM, Eric Coleman wrote:
A bit off topic, but your signature is invalid ;)
Unable to verify message signature
Hmm... There must be a Trevor impostor running loose on the net, submitting macros to mailing lists and trying to make people think I wrote them. :)
Yeah, I saw that, too, but I don't know what happened. I chalked it up to some kind of flakiness with the listserv. The next message I sent seemed to go through okay.
Trevor
On Apr 7, 2006, at 4:51 AM, Andreas Wahlin wrote:
Not to question, but to learn; when would you need this? (and how exactly does it work?)
One typical use case is described here:
http://community.jedit.org/?q=node/view/1860
Trevor
Am 7. Apr 2006 um 18:09 schrieb Trevor Harmon:
On Apr 7, 2006, at 4:51 AM, Andreas Wahlin wrote:
Not to question, but to learn; when would you need this? (and how exactly does it work?)
One typical use case is described here:
A bit too muuch work for something you can do with the autocomplete in Textmate, just hit ESC, not?
Dan
On 7/4/2006, at 18:44, Daniel Käsmayr wrote:
One typical use case is described here: http://community.jedit.org/?q=node/view/1860
A bit too muuch work for something you can do with the autocomplete in Textmate, just hit ESC, not?
Another very nice function is ctrl-shift D which duplicates the current line (or selection) and preserves the carets position.
So for that jedit example, I would place caret before ‘out’ and press ctrl-shift D, and then modify to err etc. (using option forward delete to delete out, or ctrl forward delete to delete rest of the line etc.)
Btw, you don't need a macro to implement this functionality. Just create a command with input the entire document, output "insert as text" and commands:
#!/usr/bin/env ruby a = readlines col = ENV['TM_LINE_NUMBER'].to_i-2 row = ENV['TM_LINE_INDEX'].to_i print a[col][row..row]
I guess the question is what behavior you want when lines are wrapped. This will actually look at the previous code line, not the previous visual line. I haven't tested the macro, so I don't know what it would be doing.
Haris