So I bounced this idea off of Soryu and it seems this hasn't been discussed much. What if you could add multiple carets to the current document by command-clicking? I imaging this to work in a way almost identical to that of the current snippet mechanism. For example: choose three caret locations, start typing, and in each location your text will show up. Press tab and the caret will focus in on the second of the two locations, highlighting the newly typed text (if any). Tab again and it moves to the third.
It would also be ideal to be able to highlight multiple selections in the same way--kind of like a powerful replace mechanism. Command- click and select three words in the document, then type one new word, and incrementally, all three words change to the new one.
Has this been discussed before? It seems plausible given the powerful way we can already "insert as snippet" to the document.
That would be sooo cooool!
On Apr 23, 2006, at 7:43 AM, Duane Johnson wrote:
So I bounced this idea off of Soryu and it seems this hasn't been discussed much. What if you could add multiple carets to the current document by command-clicking? I imaging this to work in a way almost identical to that of the current snippet mechanism. For example: choose three caret locations, start typing, and in each location your text will show up. Press tab and the caret will focus in on the second of the two locations, highlighting the newly typed text (if any). Tab again and it moves to the third.
It would also be ideal to be able to highlight multiple selections in the same way--kind of like a powerful replace mechanism. Command-click and select three words in the document, then type one new word, and incrementally, all three words change to the new one.
Has this been discussed before? It seems plausible given the powerful way we can already "insert as snippet" to the document.
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
:::: DataFly.Net :::: Complete Web Services http://www.datafly.net
On Apr 22, 2006, at 6:43 PM, Duane Johnson wrote:
So I bounced this idea off of Soryu and it seems this hasn't been discussed much. What if you could add multiple carets to the current document by command-clicking? I imaging this to work in a way almost identical to that of the current snippet mechanism. For example: choose three caret locations, start typing, and in each location your text will show up. Press tab and the caret will focus in on the second of the two locations, highlighting the newly typed text (if any). Tab again and it moves to the third.
It would also be ideal to be able to highlight multiple selections in the same way--kind of like a powerful replace mechanism. Command-click and select three words in the document, then type one new word, and incrementally, all three words change to the new one.
Has this been discussed before? It seems plausible given the powerful way we can already "insert as snippet" to the document.
That's good thinking.
I really like that idea. It would be like instantly converting the document to a snippet adding snippet placeholders to the locations you just cmd-clicked (either at those cursor locations or around each of those selections)
Each one would be placeholder $1 surrounded by incremental placeholders, so at first all type as one but then you can tab to each.
That would be stinking awesome.
thomas Aylott—subtleGradient—oblivious@subtleGradient.com
On 23/4/2006, at 0:43, Duane Johnson wrote:
[...] Has this been discussed before? It seems plausible given the powerful way we can already "insert as snippet" to the document.
This is slightly related to discontinuous selections, my view here is, that sure it would be cool, but it would be used by very very few users, it has no good use for keyboard users (which I myself is) and it would make the source code much more complex, and basically every single thing that deals with the caret or selection, would have to deal with considerations arising from this new ability -- so it would not just be one addition, it would hunt me for the rest of eternity.
IOW this is not happening anytime soon -- only if I find some very clever abstraction, would I consider adding it.
[...] Has this been discussed before? It seems plausible given the powerful way we can already "insert as snippet" to the document.
This is slightly related to discontinuous selections, my view here is, that sure it would be cool, but it would be used by very very few users, it has no good use for keyboard users (which I myself is) and it would make the source code much more complex, and basically every single thing that deals with the caret or selection, would have to deal with considerations arising from this new ability -- so it would not just be one addition, it would hunt me for the rest of eternity.
IOW this is not happening anytime soon -- only if I find some very clever abstraction, would I consider adding it.
Excellent points, all. Maybe we'll just come up with some random command to make it work by replacing the document with a snippet. Obviously it couldn't work exactly the same. :D
Thanks for letting us down easily
On Apr 25, 2006, at 10:21 AM, thomas Aylott wrote:
Excellent points, all. Maybe we'll just come up with some random command to make it work by replacing the document with a snippet.
Probably once we get mouse gestures, then the snippet idea might actually work (at least for the first command click), reasonably well. Of course, we could, even now, have a key that inserts a "special character", and once you've inserted all the special characters at each location you want, then have a command that reads the entire document and inserts it as a snippet, replacing those special characters with $1 or something. We could build this as is now, and make it require less keystrokes once mouse gestures are around.
Not sure what the scaling performance of inserting the entire document as a snippet is, but it's worth a try.
Obviously it couldn't work exactly the same. :D
Thanks for letting us down easily
Haris
On Apr 25, 2006, at 9:32 AM, Charilaos Skiadas wrote:
On Apr 25, 2006, at 10:21 AM, thomas Aylott wrote:
Excellent points, all. Maybe we'll just come up with some random command to make it work by replacing the document with a snippet.
Probably once we get mouse gestures, then the snippet idea might actually work (at least for the first command click), reasonably well. Of course, we could, even now, have a key that inserts a "special character", and once you've inserted all the special characters at each location you want, then have a command that reads the entire document and inserts it as a snippet, replacing those special characters with $1 or something. We could build this as is now, and make it require less keystrokes once mouse gestures are around.
Not sure what the scaling performance of inserting the entire document as a snippet is, but it's worth a try.
Obviously it couldn't work exactly the same. :D
Thanks for letting us down easily
Haris
Beautiful--that's an excellent idea. In fact, this would cover almost all of my use cases, since one could highlight and replace any word with this "special character".
On another note, Soryu was suggesting that the new "markers" that Allan is working on might be a useful tool for implementing this. Perhaps command-clicking could add a marker to that spot, and then we could create a "marker-to-snippet" command?
Duane
PS Allan, I don't think this feature would be as unpopular as you think. Mac users are trained and adept at using the mouse in conjunction with the keyboard. This is a long neglected area of "power editing" in the text editor world, as most text editors only implement the most rudimentary of mouse/keyboard interoperation.
On Apr 25, 2006, at 9:51 AM, Duane Johnson wrote:
On Apr 25, 2006, at 9:32 AM, Charilaos Skiadas wrote:
Maybe we'll just come up with some random command to make it work by replacing the document with a snippet.
Probably once we get mouse gestures, then the snippet idea might actually work (at least for the first command click), reasonably well. Of course, we could, even now, have a key that inserts a "special character", and once you've inserted all the special characters at each location you want, then have a command that reads the entire document and inserts it as a snippet, replacing those special characters with $1 or something. We could build this as is now, and make it require less keystrokes once mouse gestures are around.
Not sure what the scaling performance of inserting the entire document as a snippet is, but it's worth a try.
Beautiful--that's an excellent idea. In fact, this would cover almost all of my use cases, since one could highlight and replace any word with this "special character".
I've implemented the idea here: http://blog.inquirylabs.com/ 2006/04/25/textmate-snippets-like-youve-never-seen-them-before/
Will post the bundle there soon.
Duane