Hi,
I have what may be a simple question about Smart typing. How do you all "finish" typing something that has smart typing characters? Here's a simple example:
Typing in some HTML, an input tag.. type <input type="
and TextMate helpfully enters the second " character. Thank you TM. Now I enter the type: text
Now my cursor is still within the quotes. By habit, I type the closing quote, but now I'm just defeating the purpose of smart typing. My option, as I see, is to read and hit the right-arrow key.
A slightly more complicated example - in PHP:
array["something"]
As soon as I type [" it looks like: array["|"] (where "|" is my cursor. Again, thanks TM. But now, after typing 'something', I have to move past the " and ].
Am I missing some simple navigation? It's a simple thing that's making my want to turn off Smart typing.
Thanks!
On May 16, 2006, at 5:04 PM, John Tsombakos wrote:
Am I missing some simple navigation? It's a simple thing that's making my want to turn off Smart typing.
What I usually do is hit Ctrl-e (go to end-of-line). Saves me n-1 keystrokes where n is the number of smart typed characters I entered.
-- pgp fingerprint: BC64 2E7A CAEF 39E1 9544 80CA F7D5 784D FB46 16C1
On 5/16/06, Oscar Bonilla ob@bitmover.com wrote:
On May 16, 2006, at 5:04 PM, John Tsombakos wrote:
Am I missing some simple navigation? It's a simple thing that's making my want to turn off Smart typing.
What I usually do is hit Ctrl-e (go to end-of-line). Saves me n-1 keystrokes where n is the number of smart typed characters I entered.
Hm. That'd work. As long as what I just typed is on the end of the line ;)
If I typed td then did control - < to automatically enter the <td></td> tags then continued to type style=" .. hitting Ctrl-e would go to the very end. Oh well, I thought there may be a "jump out of the current "smart typing space" " keystroke that I missed :)
Thanks
jt
It would be most helpful if TextMate would track this a little better...
When I type a smart pair key, TM should take note of the position of the closing character. If I type additional smart pair keys, it keeps track of each position. These positions are kept as long as I'm on that line. If I navigate away, the list is lost. Hitting the tab key would take me to the last position recorded. Tabbing again would go to the next, etc.
So, typing "(", would yield (numbers are used to show tab positions, in order of where you'd go next if hitting the tab key; "|" is the caret position):
(|)1
Then, typing ":
("|"1)2
Then typing "Testing"
("Testing|"1)2
Then hitting tab:
("Testing"|)1
Then typing ", 10":
("Testing", 10|)1
Then hitting tab:
("Testing", 10)|
That feels rather natural to me. Maybe tab isn't the right key since it could have side effects with other tab triggers... I'm not sure what would be a better alternative though.
-Brad
On May 16, 2006, at 5:34 PM, John Tsombakos wrote:
On 5/16/06, Oscar Bonilla ob@bitmover.com wrote:
On May 16, 2006, at 5:04 PM, John Tsombakos wrote:
Am I missing some simple navigation? It's a simple thing that's
making
my want to turn off Smart typing.
What I usually do is hit Ctrl-e (go to end-of-line). Saves me n-1 keystrokes where n is the number of smart typed characters I entered.
Hm. That'd work. As long as what I just typed is on the end of the line ;)
If I typed td then did control - < to automatically enter the
<td></td> tags then continued to type style=" .. hitting Ctrl-e would go to the very end. Oh well, I thought there may be a "jump out of the current "smart typing space" " keystroke that I missed :)
Thanks
jt
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 May 16, 2006, at 7:34 PM, John Tsombakos wrote:
On 5/16/06, Oscar Bonilla ob@bitmover.com wrote:
On May 16, 2006, at 5:04 PM, John Tsombakos wrote:
Am I missing some simple navigation? It's a simple thing that's
making
my want to turn off Smart typing.
What I usually do is hit Ctrl-e (go to end-of-line). Saves me n-1 keystrokes where n is the number of smart typed characters I entered.
Hm. That'd work. As long as what I just typed is on the end of the line ;)
If I typed td then did control - < to automatically enter the
<td></td> tags then continued to type style=" .. hitting Ctrl-e would go to the very end. Oh well, I thought there may be a "jump out of the current "smart typing space" " keystroke that I missed :)
I use smart-typing more when I do something with a selection, like select a word and type " to have it quoted, or to parenthesize selection. Same with parentheses. But when just writing a new line I just type over the characters, or press cmd-right arrow or something like that.
Of course there's also the EOL+LF commands from the source bundle. And the smart navigation commands with the impossible names that people have written lately.
I guess it really depends where you want to go after having just filled in. It's not necessarily the case that you want to move forward, and if you don't need to move forward you've saved yourself a keystroke.
Thanks
jt
Haris
The big savings of smart pairs is not that it saves you typing (it can in some cases, but that is beside the point). The big savings is that it prevents you from leaving something that should be closed open by accident.
-David
Charilaos Skiadas wrote:
On May 16, 2006, at 7:34 PM, John Tsombakos wrote:
On 5/16/06, Oscar Bonilla ob@bitmover.com wrote:
On May 16, 2006, at 5:04 PM, John Tsombakos wrote:
Am I missing some simple navigation? It's a simple thing that's
making
my want to turn off Smart typing.
What I usually do is hit Ctrl-e (go to end-of-line). Saves me n-1 keystrokes where n is the number of smart typed characters I entered.
Hm. That'd work. As long as what I just typed is on the end of the line ;)
If I typed td then did control - < to automatically enter the
<td></td> tags then continued to type style=" .. hitting Ctrl-e would go to the very end. Oh well, I thought there may be a "jump out of the current "smart typing space" " keystroke that I missed :)
I use smart-typing more when I do something with a selection, like select a word and type " to have it quoted, or to parenthesize selection. Same with parentheses. But when just writing a new line I just type over the characters, or press cmd-right arrow or something like that.
Of course there's also the EOL+LF commands from the source bundle. And the smart navigation commands with the impossible names that people have written lately.
I guess it really depends where you want to go after having just filled in. It's not necessarily the case that you want to move forward, and if you don't need to move forward you've saved yourself a keystroke.
Thanks
jt
Haris
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