I have two requests that I would REALLY like to see coming soon in textmate:
(1) the most important !!! (and I am probably not alone in that): bring back the proper behaviour for CTRL-Y (yank).
Coming Emacs and using this command in all the Apple programs, I always find myself trying it in textmate, to no avail.
CTRL-Y should cut lines, one after the other, and put them in a buffer. I would recommend that it uses the soft and hard-wrap lines the same way, in a transparent manner.
I have adopted textmates last October as my sole text editor, but I miss sorely CTRL-Y
(2) Indented reformatting.
It would be most useful if the formatting of paragraphs following the indentation of first line. This way, we can format text in a latex file, for example, with the proper visual look.
So, if there is 3 spaces before the first character in the first line of the paragraph, the whole paragraph should be formatted with 3 white spaces in front.
(3) Intelligent-tab in programming-language modes
This is also a feature that I love from emacs and that I miss here. While in a programming mode, hitting TAB anywhere on the line shifts the whole line by a tab (SHIFT-TAB does the same in reverse). This makes it very easy when programming to add loops, etc.
I look forward to having those included in textmate. An otherwise very nice editor.
Greetings,
Normand Mousseau
profprof@mac.com wrote:
(3) Intelligent-tab in programming-language modes
This is also a feature that I love from emacs and that I miss here. While in a programming mode, hitting TAB anywhere on the line shifts the whole line by a tab (SHIFT-TAB does the same in reverse). This makes it very easy when programming to add loops, etc.
This is mapped to Cmd-] and Cmd-[ atm, you might be able to change it using the keybindings.dict list.
Regards,
Martin
On Dec 8, 2004, at 15:58, M Spreij wrote:
[...] hitting TAB anywhere on the line shifts the whole line by a tab (SHIFT-TAB does the same in reverse). [...]
This is mapped to Cmd-] and Cmd-[ atm, you might be able to change it using the keybindings.dict list.
There's also a binding for this on alt-tab and alt-shift-tab.
Regarding reflowing indented paragraphs, you can make a column selection and reformat, that'll restrain the text to inside the left/right column of the selection. Using the indent for the first line may clash with people who do write with indent on the first line of each paragraph.
I'll look into what yank/ctrl-y does in Cocoa text fields, but until then you may be able to place a macro on the key which does similar.
On Wednesday, December 08, 2004, at 10:08AM, Allan Odgaard allan@macromates.com wrote:
On Dec 8, 2004, at 15:58, M Spreij wrote:
[...] hitting TAB anywhere on the line shifts the whole line by a tab (SHIFT-TAB does the same in reverse). [...]
This is mapped to Cmd-] and Cmd-[ atm, you might be able to change it using the keybindings.dict list.
There's also a binding for this on alt-tab and alt-shift-tab.
Thanks.
Regarding reflowing indented paragraphs, you can make a column
selection and reformat, that'll restrain the text to inside the left/right column of the selection. Using the indent for the first line may clash with people who do write with indent on the first line of each paragraph.
I know that I can do that, but it is a bit annoying as it requires the use of a mouse. Maybe this could be an option, for people to chose what they prefer.
I'll look into what yank/ctrl-y does in Cocoa text fields, but until then you may be able to place a macro on the key which does similar.
I am not sure that I could write such a macro. My skills are far below yours, Allan.
Greetings,
Normand
On Dec 8, 2004, at 16:22, profprof@mac.com wrote:
Regarding reflowing indented paragraphs, you can make a column
selection and reformat, that'll restrain the text to inside the left/right column of the selection. Using the indent for the first line may clash with people who do write with indent on the first line of each paragraph.
I know that I can do that, but it is a bit annoying as it requires the use of a mouse.
You can do column selections w/o the mouse. Simply press and release the option modifier to toggle the selection type.
Maybe this could be an option, for people to chose what they prefer.
I'll consider what can be done. I would like to make it simpler to reflow indented paragraphs. I may be able to detect them, but maybe that'll end up seeming inconsistent.
I am not sure that I could write such a macro. My skills are far below yours, Allan.
Ah, but macros do not require you to write any code.
Try this (menu choices): Automation -> Start Macro Recording Edit -> Select -> Line Edit -> Cut Automation -> Stop Macro Recording
Now you have a macro that cuts the current line. You can then select: Automation -> Save Scratch Macro
Name it “Yank” and press ctrl-y while in the key equivalent field. Then you can use ctrl-y to cut the current line.
Remember that TextMate has clipboard history, so while this doesn't append to the kill buffer (as I think emacs do) you can still paste previous cuts by using Paste Previous.
On 9.12.2004, at 01:18, Allan Odgaard wrote:
Ah, but macros do not require you to write any code.
Try this (menu choices): Automation -> Start Macro Recording Edit -> Select -> Line Edit -> Cut Automation -> Stop Macro Recording
Now you have a macro that cuts the current line. You can then select: Automation -> Save Scratch Macro
Name it “Yank” and press ctrl-y while in the key equivalent field. Then you can use ctrl-y to cut the current line.
Ctrl-y is not "cut line" in emacs, that's what ctrl-k does. Ctrl-y then pastes what has been saved to the kill buffer/clipboard by ctrl-k, ctrl-w (cut selection) or M-w (copy selection).
I think what was desired was that if you kill several lines with ctrl-k, you could paste them all with one keystroke using ctrl-y. This would make it a bit harder to record as a macro (and would effectively mean redefining ctrl-k, too, since it doesn't effect clipboard at the moment).
//jarkko
-- Jarkko Laine http://jlaine.net
On Thursday, December 09, 2004, at 02:27AM, Jarkko Laine jarkko@jlaine.net wrote:
On 9.12.2004, at 01:18, Allan Odgaard wrote:
Ah, but macros do not require you to write any code.
Try this (menu choices): Automation -> Start Macro Recording Edit -> Select -> Line Edit -> Cut Automation -> Stop Macro Recording
Now you have a macro that cuts the current line. You can then select: Automation -> Save Scratch Macro
Name it ?Yank? and press ctrl-y while in the key equivalent field. Then you can use ctrl-y to cut the current line.
Ctrl-y is not "cut line" in emacs, that's what ctrl-k does. Ctrl-y then pastes what has been saved to the kill buffer/clipboard by ctrl-k, ctrl-w (cut selection) or M-w (copy selection).
I think what was desired was that if you kill several lines with ctrl-k, you could paste them all with one keystroke using ctrl-y. This would make it a bit harder to record as a macro (and would effectively mean redefining ctrl-k, too, since it doesn't effect clipboard at the moment).
Indeed, I was totally off. I meant ctrl-k, not ctrl-y. At the moment, ctrl-k can only remove lines if they are soft wrapped and do not send them to a buffer to be recalled by ctrl-y. I'll try the suggestion by Allan, though.
Nomand
On Wednesday, December 08, 2004, at 06:19PM, Allan Odgaard allan@macromates.com wrote: Ah, but macros do not require you to write any code.
Try this (menu choices): Automation -> Start Macro Recording Edit -> Select -> Line Edit -> Cut Automation -> Stop Macro Recording
Now you have a macro that cuts the current line. You can then select: Automation -> Save Scratch Macro
Name it ?Yank? and press ctrl-y while in the key equivalent field. Then you can use ctrl-y to cut the current line.
Remember that TextMate has clipboard history, so while this doesn't append to the kill buffer (as I think emacs do) you can still paste previous cuts by using Paste Previous.
I have followed your instructions (and, indeed, macros are easy to set up).
I get the line to be cut, no problem. However, the cut-line is not pasted into the clipboard.
If I perform each of the steps of the macro, the text of the line is placed in the clipboard and I can recover it with Paste command.
However, if I run the macro, then I do not manage to find the text cut. I have look arond with paste, paste previous and paste next, but to no avail. Any idea as to why ?
(I still think that since the behaviour of ctrl-k/ctrl-y is already implemented by defaut on the Mac, it would be preferable to transfer that to textmate -- although, I suspect that there is a good reason why it has not been done).
Normand
On Dec 9, 2004, at 14:56, Normand Mousseau wrote:
However, if I run the macro, then I do not manage to find the text cut. I have look arond with paste, paste previous and paste next, but to no avail. Any idea as to why ?
Doh... that's the new feature about macros having their own local clipboard :( Then I'm afraid there's no real substitute.
(I still think that since the behaviour of ctrl-k/ctrl-y is already implemented by defaut on the Mac [...]
Yes, it's also on my to-do together with Emacs marks. Just haven't gotten around to implementing it yet.
On Dec 9, 2004, at 9:09 AM, Allan Odgaard wrote:
Doh... that's the new feature about macros having their own local clipboard :( Then I'm afraid there's no real substitute.
Hm... But couldn't the selected text, rather than being cut and placed in the clipboard, just be instead sent to a file? Something like this, say:
cat >"/tmp/fakekillbuffer"
You'd have to select 'selected text' as the input and 'replace select text' as the output. (If you want to be appending to the kill buffer rather than having it act like cut-and-paste, you could just append to the file using >>.) And of course the counterpart of yank would just be:
cat "/tmp/fakekillbuffer"
...with input and output set as before... Clearly, this doesn't yet approximate kill and yank---for one thing, you'd still need to put the kill thing in a macro so that it automatically selects to the end of a line---but doesn't it get you part of the way there, or at least overcome this wiping-out-the-clipboard issue?
I'm guessing I'm missing something obvious? Am I a little too enamored of what TM lets you do with shell tools?
On Dec 10, 2004, at 4:06, otheraccount@verizon.net wrote:
Doh... that's the new feature about macros having their own local clipboard :( Then I'm afraid there's no real substitute.
Hm... But couldn't the selected text, rather than being cut and placed in the clipboard, just be instead sent to a file? [...]
Yes it (most likely) can -- but I don't think Normand have any real shell-scripting experience, so maybe someone could create the script/macro and throw it in a bundle ;)
However, it would mean there are two locations for cut/copied text. Although this also seems to be the case with the system kill buffer (which doesn't interfere with the clipboard).
One thing that would need to change for this to be really mimicking the emacs behaviour is that ctrl-k would have to cut also the empty lines. Now when you click it you only get the current line cut and then nothing happens no matter how hard or many times you hit the keystroke. That makes it impossible to use ctrl-k/ctrl-y for multiline cut-pasting.
//jarkko
On 10.12.2004, at 07:42, Allan Odgaard wrote:
On Dec 10, 2004, at 4:06, otheraccount@verizon.net wrote:
Doh... that's the new feature about macros having their own local clipboard :( Then I'm afraid there's no real substitute.
Hm... But couldn't the selected text, rather than being cut and placed in the clipboard, just be instead sent to a file? [...]
Yes it (most likely) can -- but I don't think Normand have any real shell-scripting experience, so maybe someone could create the script/macro and throw it in a bundle ;)
However, it would mean there are two locations for cut/copied text. Although this also seems to be the case with the system kill buffer (which doesn't interfere with the clipboard).
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/mailman/listinfo/textmate
-- Jarkko Laine http://jlaine.net
On Wednesday, December 08, 2004, at 09:59AM, M Spreij nemo@mechintosh.com wrote:
profprof@mac.com wrote:
(3) Intelligent-tab in programming-language modes
This is also a feature that I love from emacs and that I miss here. While in a programming mode, hitting TAB anywhere on the line shifts the whole line by a tab (SHIFT-TAB does the same in reverse). This makes it very easy when programming to add loops, etc.
This is mapped to Cmd-] and Cmd-[ atm, you might be able to change it using the keybindings.dict list.
Great. I had not realised that it was already implemented. Thanks for the information.
Down to two requests....
Normand
Late reply, but I also would really like to see the Emacs CTRL-K, CTRL-Y shortcuts implemented. I've never used them previously, but after 5 seconds of trying this in TextEdit I'm hooked.