View Options - Please stop finishing blocks
I would like to turn off the the feature in the QTP 11 editor that does the second line. For example I write Function. It puts the End Function on the next line with a box around the two lines of code. The up/down arrows move the End Function. I am getting annoyed with it.
Under Tools/view options I see 3 possible items that it could be:
Auto_Expand VBSript Syntax
I Could experiment by turning one off at a time. I was hoping someone had encountered this before and knows the answer.
Dynamic surround Surrounds existing lines of code with a block structure, enabling you to dynamically expand (or collapse) block statements. For example, when you add a surrounding statement (such as if/while) before existing code, you can use the arrow keys to expand the block to include subsequent lines. These lines are then automatically indented to the correct levels.
Auto-expand VBScript syntax Automatically recognizes the first two characters of keywords and adds the relevant VBScript syntax or blocks to the script, when you type the relevant keyword.
For example, if you enter the letters if and then enter a space at the beginning of a line, QuickTest automatically enters:
So, technically, you have two settings here that are causing your irritation. You'll need to uncheck both to get rid of the behavior.
I got rid of both settings. I may turn one on at a time to see what they do individually.
When I saw Dynamic Surround I though I was at a store buying a new Stereo.
Dynamic surround is the one that lets you use the arrow keys to encapsulate blocks of code. Auto-expand VBScript syntax is the one that puts the closing statement in for you.
I have to admit, I thought the same thing when I saw that option name.