-
Notifications
You must be signed in to change notification settings - Fork 270
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a few BDD/TDD line based executions #107
Conversation
@rgbkrk @intothev01d Would this better fit as a new |
# No selected text on a file that does exist, use filepath | ||
if (not selectedText? or not selectedText) and filepath? | ||
if selection.isEmpty() and filepath? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, this is cleaner.
The grammars file looks a bit complicated now, with most of the grammars still just needing a code block but having to get the text out. I need some time to think on this. |
@rgbkrk let me know what you think. A "Line Number Based" |
filepath = editor.getPath() | ||
|
||
# If no text was selected, either use the file | ||
# or select ALL the code in the editor | ||
|
||
# Brand new file, text not selected, "select" ALL the text | ||
if (not selectedText? or not selectedText) and not filepath? | ||
selectedText = editor.getText() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the brand new file, text not selected case still work with this? I don't see a "grab all" below.
At the very least, I think I'd like to split this up into two PRs. One PR to switch over to using The second PR can be the other half of this PR, doing line based runs, choosing to pass the |
I've updated "Selection Based" support to pass a
Selection
instead of the selection text. The selection block now takesfilename
andselection
instead. To get the selected text nowselection.getText()
is used.