Skip to content
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 editor color setting for strings #239

Closed
gthijssen opened this issue Aug 10, 2018 · 5 comments
Closed

Add editor color setting for strings #239

gthijssen opened this issue Aug 10, 2018 · 5 comments
Assignees
Milestone

Comments

@gthijssen
Copy link

Hello,

We use the embedded argument syntax with quotes around de values
(e.g. Click mainmenu "Companies" and submenu item "Search companies").

This works like a charm, but it would be more readible if the strings had a different setting in the syntax coloring.

Is it possible to change the editor color settings somehow so that it does include a setting for strings? Or does the code need to be changed for this?

Kind regards,
Gabriëlle

@michalanglart
Copy link
Collaborator

michalanglart commented Aug 10, 2018

Hi,

no it's not possible to achieve this behavior by changing anything in settings. It would require some implementation to be made in code.

Did I understood correctly that you would like to see your example more or less like here?
strings_coloring

@gthijssen
Copy link
Author

Yes, exactly! It now looks like this:
image

Doable, but we feel a color difference would make it a lot easier to read.

@michalanglart
Copy link
Collaborator

I agree - this feature looks reasonable and it would be easy to see the values of parameters passed to embedded keyword.

The only issue is that in the code which is responsible for coloring we don't know if given keyword call is a call of embedded-syntax keyword or not. This can result in a situation where someone have non-embedded keyword which uses " in its name and we would highlight it (since we cannot distinguish between embedded and non-embedded keywords on this level). Like for example with code like this:

*** Test Cases ***
case
  My keyword uses "quotes"

*** Keywords ***
My keyword uses "quotes"
   Log  quotes

However this looks like a real corner case - there are probably not too many users using " in names of their casual keywords. In the end it would be possible to enable/disable this strings highlighting in preferences.

@gthijssen
Copy link
Author

I see your point, but I also think that there would not be many users who use double quotes in their keywords. A single one would not be so trange, at least in the Dutch language (which we use :-D).

So it would be really nice if this could be a new feature!

@michalanglart
Copy link
Collaborator

Closing - released in 0.8.8

In Preferences -> Robot Framework -> Editor -> Syntax Coloring there is a new syntax coloring category Keyword call quotes. By default it has the same color as Keyword calls but can be changed to something different which results in desired effect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants