-
Notifications
You must be signed in to change notification settings - Fork 93
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
Enhancement of auto add ...
#859
Comments
Agreed. I've just done the change and a |
Actually, VSCode marketplace is having some kind of outage (microsoft/vscode-vsce#810) and I can't publish the pre-release. If you're interested you can get the |
I just checked out the preview, excellent work. One thing I immediately noticed was you can over-indent when pressing enter on certain parts of the line.
If you press enter at the end of |
Suddenly, I remember that I browsed 0e1767c and found there might be some problem if we use Besides, I still want the user have the ability to modify the auto add rule in the settings. But might need some tricks. |
I'll have to thinker a bit more about those. |
@Zoupers can you post your actual expectations? i.e.: in the case of would you expect that to become the following?
|
I did some more improvements on this for tabs and 2 spaces. Please check the latest pre-release and let me know how it fares for you. |
Sorry, I have something else today that I cannot focus on it. I will try to give it a try tomorrow and make some testcase the day after tomorrow at the latest. |
I've tried some cases yesterday, most of them works perfectly. While in some special cases of mixed indent, Here are the testcases. *** Keywords ***
Pass Arguments List
[Arguments] @{args}
FOR ${arg} IN @{args}
Log To Console ${arg}
END
*** Test Cases ***
Test Add ... 1
Pass Arguments List
... arg1
... arg2
... arg2
... | a
...
Test Add ... 1 Result After Enter
Pass Arguments List
... arg1
... arg2
... arg2
...
... a
...
Test Add ... 2
Pass Arguments List
... arg1
... arg2
... arg2
... | a
...
Test Add ... 2 Result After Enter
Pass Arguments List
... arg1
... arg2
... arg2
...
... a
...
Test Add ... 3
Pass Arguments List
... arg1
... arg2
... arg2
... | a
...
Test Add ... 3 Result After Enter
Pass Arguments List
... arg1
... arg2
... arg2
...
... a
... Because of the |
Well, mixed tabs and spaces is a no-no in general (and because |
Found a slightly annoying behaviour; if you're breaking up an inline IF statement, then the plugin auto adds Try converting IF "${GLOBAL_VAR}" == "val_1" RETURN ${VAR_1} ELSE RETURN ${VAR_2} to IF "${GLOBAL_VAR}" == "val_1"
RETURN ${VAR_1}
ELSE
RETURN ${VAR_2}
END |
I have thought of another enhancement to this feature while using it, though it may be controversial. The plugin should delete any trailing This is useful because sometimes the plugin does add a trailing Some Keyword ${var_1} ${var_2}
... ${some_other_var}
... # This continuation was auto-added due to a space that was present after the breakpoint.
# Pressing enter should delete that continuation |
I thought about this, but this just isn't possible the way that the VSCode configuration deals with that (it can just add content on a new line, not remove existing content). So, unfortunately, right now you really need to delete it in this case... the other possibility would be not adding the |
Describe the bug
An example of daily action might like I want to add new argument after arg2. As there is an empty line with
...
in the next line, I think we should auto add...
to the new line when we type enter after arg2.To Reproduce
Expected behavior
As is in the describe.
Screenshots
See Code.
Versions:
Logs
No need.
The text was updated successfully, but these errors were encountered: