NI TestStand Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
Mr._Jim

Support Tabs and Indentation in Expression Editor

In instances of nested expressions, it would be useful to be able to press tab to indent a line. I propose inserting "n" spaces when pressing tab.

 

Coding style of course varies, but for readability, I rather dislike the following

 

Trim(Locals.SomeLocal) == "" ? (Locals.SomeLocal = "foo",Locals.AnotherLocal = "bar", Locals.SomethingOrRather = "zoo") : False

 ...and much prefer this styling:

 

Trim(Locals.SomeLocal) == "" ? (
                Locals.SomeLocal = "foo",
                Locals.AnotherLocal = "bar",
                Locals.SomethingOrRather = "zoo" ) : False

...but at present the latter is tedious because one has to insert a lot of whitespace manually or worse yet, use another text editor and paste it into TestStand. It would be nice if TestStand's expression editor supported this basic feature available in almost every text editor or IDE.

 

Thanks,

 

Mr. Jim

 

 

 

4 Comments
nclark
Member

This would be soooo helpful, especially when you're dealing with containers and your variable names start to get pretty long.

 

Readability is key to success.

bienieck
Active Participant

It would be great if the editor could also format (pretty print) expressions in a way similar to how code is formatted in C# within a typical IDE. Additionally, NI could fix the font mixing issue in the expression field. Ever since monospaced font support was introduced, I often find myself struggling with parts of the expression being displayed in the old font while other parts use the new one.

Michał Bieńkowski
CLA, CTA, CPI

  1. Did someone devote their time to help solve your problem? Appreciate it and give kudos.
  2. Problem solved? Accept as a solution so that others can find it faster in the future.
  3. Contribute to the development of TestStand by voting on the TestStand Idea Exchange.
Mr._Jim
Active Participant

Hey there.

 

So, since I last posted this idea, I figured out that you can use ALT + "09" to insert a tab. I use the number pad and I haven't tried it with the numbers above the QUERTY. (I'd try it, but I'm typing on my phone in a waiting room)

 

ALT + 09 for the win.

 

I use it all day long.

It's definitely a clumsy interim solution, though.

HarshaBhushan
Member
Status changed to: Under Consideration