Chris Nahr
Ketchup Master
92 Posts |
Posted - Jun 14 2004 : 02:57:33 AM
|
VA X automatically inserts closing pair symbols, i.e. )]}"', if an opening symbol is typed and the corresponding option is set. That's a very useful feature but I noticed it won't work if there is another character directly to the right of the cursor.
This is occasionally undesirable, for instance when I'm deleting part of a line and start typing in the middle of it, or when I'm using a C# string indexer that looks like this: foo["bar"].
Typing foo[ gets me the closing bracket, like so: foo[]. But now typing " won't get me the closing quotes because there's now the auto-inserted right bracket at the cursor...
The same thing happens when I'm typing a method call with a string parameter: the closing ) is already there, so no closing " for me.
Optimal solution: I would be great if VA could analyze the program to the right of and below the cursor, and insert a matching symbol exactly if there isn't one already.
That's probably a rather big feature request, though, so I'll settle for the following smaller one!
Strings and characters (double and single quotes in C#) are always contained on a single line, so VA could just check the rest of the current physical line for another quote, and auto-insert a closing quote if one isn't there. That would take care of the string indexer and parameter issues which are my #1 concern here.
Whoops, another edit: you might want to look out for escaped single & double quotes and NOT regard them as string-closers. |
Edited by - Chris Nahr on Jun 14 2004 03:01:30 AM |
|
feline
Whole Tomato Software
United Kingdom
19014 Posts |
Posted - Jun 14 2004 : 06:18:23 AM
|
if this could work fairly reliably for strings in C++ it would be very nice
adding string parameters to function call sis something i quite often do, and i do miss the auto inserted closing " character. |
zen is the art of being at one with the two'ness |
|
|