When removing the argument of an autocompleted block and pressing return will result in multiple carets spread over 3 lines. (see attached video). Anyone else noticed this behavior? Maybe also in other languages/grammars?
Koen
Nice movie!
At first I couldn't reproduce this. I typed in an empty Ruby document:
"a.each do" [Tab]
This generates
a.each do |variable|
end
with "variable" selected. I then hit Delete (backspace) and the cursor is left blinking after "do" and nowhere else. Nesting do-end structures did not cause me to see what your movie shows.
However, then I typed exactly what you had, and I did reproduce the issue.
I conclude that it has to do with the symbol sitting alone on the line. If you will write
namespace(:nginx) do
end
All will be well, I think... m.
On Feb 19, 2014, at 9:36 AM, Koen Punt koen@koenpunt.nl wrote:
When removing the argument of an autocompleted block and pressing return will result in multiple carets spread over 3 lines. (see attached video). Anyone else noticed this behavior? Maybe also in other languages/grammars?
Koen
<ruby-multi-caret.mov> _______________________________________________ textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
-- matt neuburg, phd = matt@tidbits.com, http://www.apeth.net/matt/ pantes anthropoi tou eidenai oregontai phusei Programming iOS 7! http://shop.oreilly.com/product/0636920031017.do iOS 7 Fundamentals! http://shop.oreilly.com/product/0636920032465.do RubyFrontier! http://www.apeth.com/RubyFrontierDocs/default.html TidBITS, Mac news and reviews since 1990, http://www.tidbits.com
Confirm, this and other wrong behaviors are observed after deleting the block argument.
Elia
On Feb 19, 2014, at 6:36 PM, Koen Punt koen@koenpunt.nl wrote:
When removing the argument of an autocompleted block and pressing return will result in multiple carets spread over 3 lines. (see attached video). Anyone else noticed this behavior? Maybe also in other languages/grammars?
Koen
<ruby-multi-caret.mov>
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
On 2014-02-19 18:36, Koen Punt wrote:
When removing the argument of an autocompleted block and pressing return will result in multiple carets spread over 3 lines. (see attached video). Anyone else noticed this behavior? Maybe also in other languages/grammars?
I've noticed something similar when declaring a new method with a command.
1. Type "foo" and press Shift + Enter 2. Press backspace to remove the argument 3. Type something
You'll now have multiple carets.
On Feb 19, 2014, at 11:57 AM, Jacob Carlborg doob@me.com wrote:
- Type "foo" and press Shift + Enter
- Press backspace to remove the argument
- Type something
You'll now have multiple carets.
Ooooh, that's a really great use case. Try this extension:
1 Type "foo" SHIFT-RETURN 2 Press Backspace (Delete) 3 Type "tttt"
Because of the mutiple carets, you have just created a nested mess of parentheses:
def foo(((t(ttt)))t))
end
m.
-- matt neuburg, phd = matt@tidbits.com, http://www.apeth.net/matt/ pantes anthropoi tou eidenai oregontai phusei Programming iOS 7! http://shop.oreilly.com/product/0636920031017.do iOS 7 Fundamentals! http://shop.oreilly.com/product/0636920032465.do RubyFrontier! http://www.apeth.com/RubyFrontierDocs/default.html TidBITS, Mac news and reviews since 1990, http://www.tidbits.com
Aah, and with a little more ingenuity (disingenuity!) a reproducible crash awaits:
1 Type "foo" SHIFT-RETURN 2 Press Backspace (Delete) 3 Type "tt" 4 Type right arrow twice 5 Type RETURN
Bang...
On Feb 19, 2014, at 6:27 PM, Paul McCann paul.mccann@adelaide.edu.au wrote:
Aah, and with a little more ingenuity (disingenuity!) a reproducible crash awaits:
1 Type "foo" SHIFT-RETURN 2 Press Backspace (Delete) 3 Type "tt" 4 Type right arrow twice 5 Type RETURN
Bang...
Nice one! What I got was not a crash, actually, but a spinning cursor of death - I was able to get a sample, which I enclose. I had to force-quit TextMate (it never did crash, but it didn't become responsive either). m.
-- matt neuburg, phd = matt@tidbits.com, http://www.apeth.net/matt/ pantes anthropoi tou eidenai oregontai phusei Programming iOS 7! http://shop.oreilly.com/product/0636920031017.do iOS 7 Fundamentals! http://shop.oreilly.com/product/0636920032465.do RubyFrontier! http://www.apeth.com/RubyFrontierDocs/default.html TidBITS, Mac news and reviews since 1990, http://www.tidbits.com
On 20 Feb 2014, at 2:57, Jacob Carlborg wrote:
On 2014-02-19 18:36, Koen Punt wrote:
When removing the argument of an autocompleted block and pressing return will result in multiple carets spread over 3 lines. (see attached video). Anyone else noticed this behavior? Maybe also in other languages/grammars?
I've noticed something similar when declaring a new method with a command […]
Yeah, it’s a general issue with empty overlapping snippet mirrors, but no-one brought it up until now, so I never bothered looking into it ;)
It will be fixed for next build.
That said, the original do⇥ + ⌫ + ↩ will still give a result where more than one newline is inserted, this has to do with how the snippet is crafted and could be addressed by updating the snippet, so if it’s a desired workflow, let me know.
On 2014-02-24 09:06, Allan Odgaard wrote:
Yeah, it’s a general issue with empty overlapping snippet mirrors, but no-one brought it up until now, so I never bothered looking into it ;)
I reported an issue for the Ruby bundle [1], thinking it was a problem with the snippet ;)
It will be fixed for next build.
Awesome.
[1] https://github.com/textmate/ruby.tmbundle/issues/59