I'm wondering about using CTRL-K to cut a line and CTRL-y to paste a line.
Typing ctrl-k seems to cut the line out, but ctrl-y has no effect. I'm used to typing these commands in a terminal and in emacs.
Has anyone else experienced this?
On 6. Nov 2004, at 1:52, Curtis Schofield wrote:
I'm wondering about using CTRL-K to cut a line and CTRL-y to paste a line.
Currently there's no kill-buffer support -- but you can record a macro that selects to end-of-line and cuts, plus one that pastes, and bind these to ctrl-k/y.
neeto
thanks.
I find this editor totally awesome btw.
I'm trying to get used to the automatic () {} behaviour.. sometimes i wrap if/parameterlists around existing code and i get an automatic } or ) when i don't expect.
all and all a very complete program the macros look fun.
On 6. Nov 2004, at 1:52, Curtis Schofield wrote:
I'm wondering about using CTRL-K to cut a line and CTRL-y to paste a line.
Currently there's no kill-buffer support -- but you can record a macro that selects to end-of-line and cuts, plus one that pastes, and bind these to ctrl-k/y.
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/mailman/listinfo/textmate
Another emacs binding that doesn't work right is ctrl-f to advance the cursor forward a character. (ctrl-b, and alt-b for backwards a word work fine, and so does alt-f for forward a *word*, but ctrl-f doesn't.)
(I tried camel-casing a work (EmacsBindingsIssue) to make a page on the wiki, but it didn't create another page--is there some special way to make links in the TextMate wiki?)
--M.
On Fri, 5 Nov 2004 18:20:01 -0700, Curtis Schofield schofiel@telusplanet.net wrote:
neeto
thanks.
I find this editor totally awesome btw.
I'm trying to get used to the automatic () {} behaviour.. sometimes i wrap if/parameterlists around existing code and i get an automatic } or ) when i don't expect.
all and all a very complete program the macros look fun.
On 6. Nov 2004, at 1:52, Curtis Schofield wrote:
I'm wondering about using CTRL-K to cut a line and CTRL-y to paste a line.
Currently there's no kill-buffer support -- but you can record a macro that selects to end-of-line and cuts, plus one that pastes, and bind these to ctrl-k/y.
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/mailman/listinfo/textmate
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/mailman/listinfo/textmate
On 6. Nov 2004, at 2:33, Michael Stillwell wrote:
Another emacs binding that doesn't work right is ctrl-f to advance the cursor forward a character. (ctrl-b, and alt-b for backwards a word work fine, and so does alt-f for forward a *word*, but ctrl-f doesn't.)
Ctrl-f is by default bound to “Reformat Paragraph”. Maybe ctrl-j would have been better? I think I have ctrl-f from CygnusEd on the Amiga...
You can change the default key bindings (Help / Key bindings), or you can record a macro to overwrite it.
(I tried camel-casing a work (EmacsBindingsIssue) to make a page on the wiki, but it didn't create another page--is there some special way to make links in the TextMate wiki?)
Two ways: [[EmacsBindingsIssue]] "Emacs Bindings Issue":EmacsBindingsIssue
The latter is if you want to provide a custom title, by default it splits the word before each case change.
On Sat, 6 Nov 2004 04:18:14 +0100, Allan Odgaard allan@macromates.com wrote:
On 6. Nov 2004, at 2:33, Michael Stillwell wrote:
Another emacs binding that doesn't work right is ctrl-f to advance the cursor forward a character. (ctrl-b, and alt-b for backwards a word work fine, and so does alt-f for forward a *word*, but ctrl-f doesn't.)
Ctrl-f is by default bound to "Reformat Paragraph". Maybe ctrl-j would have been better? I think I have ctrl-f from CygnusEd on the Amiga...
Ah, thanks! I've re-bound formatText to M-q, which is emacs's default.
(I tried camel-casing a work (EmacsBindingsIssue) to make a page on the wiki, but it didn't create another page--is there some special way to make links in the TextMate wiki?)
Two ways: [[EmacsBindingsIssue]] "Emacs Bindings Issue":EmacsBindingsIssue
Righto, I've made a page on the wiki that documents the emacs keybinding issues:
http://wiki.macromates.com/textmate/show/EmacsKeybindings
--M.
On 7. Nov 2004, at 0:31, Michael Stillwell wrote:
Righto, I've made a page on the wiki that documents the emacs keybinding issues:
isearch-forward (C-s) isearch-backward (C-r)
Is this like findNext/Previous but always case-insensitive?
spell-word (M-$)—checks spelling
There is the “checkSpelling:” action method. This will select the next misspelled word (starting from the caret).
backward-paragraph (M-[) forward-paragraph (M-])
How does this differ from moveTo{Beginning|End}OfParagraph? In TM, if you're already at the begin/end it'll go back/forward a paragraph. Although I don't think this is the default for Cocoa (it will remain at the begin/end).
On 6-Nov-04, at 7:17 PM, Allan Odgaard wrote:
On 7. Nov 2004, at 0:31, Michael Stillwell wrote:
Righto, I've made a page on the wiki that documents the emacs keybinding issues:
isearch-forward (C-s) isearch-backward (C-r)
Is this like findNext/Previous but always case-insensitive?
Incremental search is the key here. Hit C-s and start typing and it does a find in the page. C-s again to move to the next match, and yes, it is case-insensitive.
Wayne
On Sun, 7 Nov 2004 02:17:34 +0100, Allan Odgaard allan@macromates.com wrote:
On 7. Nov 2004, at 0:31, Michael Stillwell wrote:
Righto, I've made a page on the wiki that documents the emacs keybinding issues:
isearch-forward (C-s) isearch-backward (C-r)
Is this like findNext/Previous but always case-insensitive?
As someone else has written, the i stands for incremental.
spell-word (M-$)—checks spelling
There is the "checkSpelling:" action method. This will select the next misspelled word (starting from the caret).
spell-word checks the spelling of the word under the cursor; I like this because it's compatible with editing source code. (Unlike the wavy-line method ("Check spelling as you type"), which goes crazy when you're editing source, because just about every word is spelt wrong.) I don't know what the UI would look like though...
backward-paragraph (M-[) forward-paragraph (M-])
How does this differ from moveTo{Beginning|End}OfParagraph? In TM, if you're already at the begin/end it'll go back/forward a paragraph. Although I don't think this is the default for Cocoa (it will remain at the begin/end).
Actually, I'm not sure that they are different; I noticed the moveTo{Beginning|End}OfParagraph in the NSResponder documentation, but I couldn't get them to actually do anything in any of the apps I tested.
Thanks so much for your help with all this--TextMate is so close to being able to replace the only text-mode program I still use since switching to OS X! I didn't think this was every going to happen.
--M.
On 7. Nov 2004, at 13:22, Michael Stillwell wrote:
spell-word (M-$)—checks spelling There is the "checkSpelling:" action method. This will select the next misspelled word (starting from the caret).
spell-word checks the spelling of the word under the cursor; I like this because it's compatible with editing source code.
Okay, checkSpelling: is also sort of compatible, in that it does check the spelling of the word under the caret, but if it's spelled correctly, it moves on to the next, until it finds a misspelled one -- so generally it's usable even when most of the text is code (the “spelled correctly” indication is then just that it selects the next word).
How does emacs indicate correct spelling of a word?
On Sun, 7 Nov 2004 14:34:28 +0100, Allan Odgaard allan@macromates.com wrote:
How does emacs indicate correct spelling of a word?
emacs sort of has two status lines. (I think the second one is usually called the mini-buffer. You can sometimes type in it--the incremental search functions use this.) If the word is spelt correctly you get "WORD is correct" in the second status line. (If it's wrong you get the equivalent of a dialog box.)
So, I'm not sure what a suitable TextMate (or Cocoa) equivalent should be. Maybe the status line could temporarily change? Maybe a green line could appear temporarily under the word?
--M.
On 6. Nov 2004, at 2:20, Curtis Schofield wrote:
I'm trying to get used to the automatic () {} behaviour.. sometimes i wrap if/parameterlists around existing code and i get an automatic } or ) when i don't expect.
What I generally do is type the:
if(...) { }
above the code I want to encapsulate (utilizing the smart-typing) and afterwards I select the code that needs to be “wrapped” and press ctrl-cmd-up to move it (i.e. the selection) up one line, which puts it inside the brackets (generally I also then do a single alt-tab to indent it one extra level).
If you do it a lot, it may be possible to do a snippet that wraps the selection, but I spent 5-10 minutes trying to find an easy solution to adjust the indent, but that's currently not possible to do as a cool one-liner... ;)
What I generally do is type the:
if(...) { }
above the code I want to encapsulate (utilizing the smart-typing) and afterwards I select the code that needs to be “wrapped” and press ctrl-cmd-up to move it (i.e. the selection) up one line, which puts it inside the brackets (generally I also then do a single alt-tab to indent it one extra level).
If you do it a lot, it may be possible to do a snippet that wraps the selection, but I spent 5-10 minutes trying to find an easy solution to adjust the indent, but that's currently not possible to do as a cool one-liner... ;)
hmm interesting.. thanks i'll give it a go!
On 06/11/2004, at 12:20 PM, Curtis Schofield wrote:
I'm trying to get used to the automatic () {} behaviour..
Wait 'till you find yourself back in BBEdit or any other program and *expect* them (and completion, and snippets) to work and they don't. I'm starting to wish everything (Mail.app, where I do the bulk of my typing for example) behaved like TM.
Allan -- plug-in for other programs?
Justin
On 6. Nov 2004, at 8:37, Justin French wrote:
[…] I'm starting to wish everything (Mail.app, where I do the bulk of my typing for example) behaved like TM.
Allan -- plug-in for other programs?
What I probably could do was let TM register a service (Edit in TextMate…), and just “return” the edited text, when the TM window got closed.
So e.g. from Mail.app you'd do cmd-a and cmd-<something>, and TM would then show the text, you make the edits, and simply close the window, to have the text returned to Mail.app.
I can't recall if there are any timeouts to how long TM can work with the text before having to return the result -- but I can look into this.
Of course a better solution would be if I wrote an NSTextView compatible component, but NSTextView exposes a lot of its inner workings, so making a new component which is API-compatible is much more work than writing TextMate itself -- plus I'd have to support full UniCode, proportional fonts, and foreign text input methods (which is currently something I'm thinking won't be before v1.3 at least).
But down the road I wouldn't mind forking out OakTextView as a component other applications could use (though it wouldn't be API-compatible with NSTextView).