LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Trailing blanks in source code file

After cutting and pasting a rectangular region in my source code (typically to fix my indenting), I end up with trailing blanks on each pasted line of code.

Then the "End" key puts me way off to the right from the actual code on the line, which is a bit annoying.

Is there a way to get CVI (7.1.1) to strip those trailing blanks?

Thanks,
Ian
0 Kudos
Message 1 of 3
(3,308 Views)
While there is no way to my knowledge to do this automatically, you can easily do it using automatic search/replace.

Bring up Edit -> Replace and use "[ \t]+$" as the string to replace (no quotes); make sure the replacement string is blank.

Make sure "Regular Expression" is checked. Click "Replace All". This will replace all uninterrupted sequences of tabs or spaces at the end of a line with nothing, thereby removing trailing whitespace.

Regards,

Alex
Message 2 of 3
(3,300 Views)
Perfect! That is exactly what I needed. Thanks, Alex.

--Ian
0 Kudos
Message 3 of 3
(3,275 Views)