Closed agarzola closed 8 years ago
Hi, thank you for the report, I will try to look into that, but can't promise quick fix.
No worries. Thank you for the prompt reply!
I tried to look into it, but don’t know my way around Python. If you point me in the right direction, though, I’d be happy to look into it and submit a PR if I find a solution.
Let me start by saying, that I'm not sure how to fix this without experimenting. The original problem is that Sublime syntax are not powerful enough to correctly handle indentation-based language like Stylus, especially because in Stylus almost everything that you write could be a variable and code blocks don't differ from rules much from the grammar standpoint.
Despite that I still wanted to provide auto-indentation for the cases that was possible to recognise by inspecting current line. This is what this code is for, and any fixes will probably be around there, but it also might be completely unfixable, depending on how Sublime handles these commands.
Using Sublime Text 2,
Cmd+Shift+Return
from anywhere on a line works as expected: it enters a new line just above the current line, indented at the current line’s level. But when I useCmd+Return
from anywhere on a line, I get this:This only happens when the line from which the keystroke is used does not have a semicolon at the end. When a semicolon is present, the same command behaves as expected. See this GIF for an illustration of the problem.
What I expect from
Cmd+Return
is the opposite ofCmd+Shift+Return
: it enters a new line just below the current line, indented at the current line’s level.