.NET Forum / Visual Studio.NET / IDE / March 2005
Lose Ctrl key when editing comments in SQL file
|
|
Thread rating:  |
Tim Werth - 29 Oct 2004 19:46 GMT When I edit a SQL file in VS.NET's IDE, I cannot use the Ctrl key in combination with the left arrow, right arrow, delete... Is this by design?
Gary Chang[MSFT] - 30 Oct 2004 07:27 GMT Hi Tim,
> When I edit a SQL file in VS.NET's IDE, I cannot use the Ctrl key in > combination with the left arrow, right arrow, delete... When I edit a .SQL file in the VS.NET IDE, there has no difference with editing other type files.
What do you mean you could not use the Ctrl key in combination with the left arrow, right arrow, delete? The cursor moves by word per direction key hit?
Thanks!
Best regards,
Gary Chang Microsoft Online Partner Support
 Signature Get Secure! - www.microsoft.com/security This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
Tim Werth - 01 Nov 2004 16:38 GMT By using the Ctrl key with the left or right arrow, I am trying to move left or right a word at a time. When used with the delete or backspace, I am trying to delete a word at a time.
I mentioned the word "comments" in the subject, but failed to reiterate it in the body of my original post. So, I'll restate my problem.
When I edit lines that are comments (lines inside a /*...*/ block or lines that start with --) in an .SQL file in VS.NET IDE, holding the Ctrl key down when the left or right arrow is pressed will put the cursor at the beginning (left arrow) or end (right arrow) of the line - not the word. To reproduce, cut and paste the following lines into a new file in the IDE and save it to a filename with a .SQL extention. Then do what the comments say.
/*
Pressing Ctrl+Left Arrow anywhere on this comment line will put the cursor at the beginning of the line not at the beginning of the next word to the left.
Pressing Ctrl+Right Arrow anywhere on this comment line will put the cursor at the end of the line not at the beginning of the next word to the right.
Pressing Ctrl+Backspace anywhere on this comment line will delete from the cursor to the beginning of the line.
Pressing Ctrl+Delete anywhere on this comment line will delete from the cursor to the end of the line.
*/
-- Using Ctrl with one of the above mentioned keys on the following SELECT line will work as expected.
select a from b;
Tim
Gary Chang[MSFT] - 02 Nov 2004 08:57 GMT Sorry Tim, I misunderstand the "comment" in your first message.
I think your suppose is right in this issue, the VS.NET IDE parses the SQL's comment block differently with other files, it should be by design.
If you have any other concerns on this issue, please feel free to reply this message.
Thanks for your understanding!
Best regards,
Gary Chang Microsoft Online Partner Support
 Signature Get Secure! - www.microsoft.com/security This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
Tim Werth - 02 Nov 2004 15:51 GMT Thanks, Gary, for the reply.
Is there any way to change that behavior? An option somewhere?
Tim
Gary Chang[MSFT] - 03 Nov 2004 04:12 GMT Hi Tim,
> Is there any way to change that behavior? An option somewhere? Those short-cut key are mapped as Edit.WordNext, Edit.WordPrevious in the VS.NET IDE, for the IDE applies a different kind of behavior to these Edit command with a .SQl file, I am afraid it is a built-in feature and could be changed inside VS.NET 2003.
Thanks for your understanding!
Best regards,
Gary Chang Microsoft Online Partner Support
 Signature Get Secure! - www.microsoft.com/security This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
Boris Nikolaevich - 08 Mar 2005 21:05 GMT Tim has such a good point, but I have seen only two relevant posts about what I think is a *major* inconsistency. Surely others have noticed it. And surely the SQL Editor team knew Microsoft's standard UI functions. But it's amazing that no one has done more complaining about the problem.
To recap the "standard" functionality for navigating and selecting words: - CTRL-LeftArrow moves to the beginning of the previous word (or current word, if the caret is in the middle of a word) - CTRL-RightArrow moves to the beginning of the next word - CTRL-Shift-LeftArrow selects all the characters to the beginning of the previous word (or current word, if the caret is in the middle of a word) - CTRL-RightArrow selects all the characters to the beginning of the next word
This behavior has become consistent through all Microsoft products, and is even consistent in the VS.NET IDE for nearly every language supported--except SQL!
In the SQL editor, the behavior inside a comment is: - CTRL-LeftArrow moves to the beginning of the commented line, ignoring word breaks & whitespace - CTRL-RightArrow moves to the end of the commented line, ignoring word breaks & whitespace - CTRL-Shift-LeftArrow selects all the characters to the beginning of the commented line, ignoring word breaks & whitespace - CTRL-RightArrow selects all the characters to end of the commented line, ignoring word breaks & whitespace
...and the behavior inside a string (e.g. a single-quoted varchar value) is: - CTRL-LeftArrow moves to the beginning of the string, outside the quote, ignoring word breaks & whitespace - CTRL-RightArrow moves to the end of the string, outside the quote, ignoring word breaks & whitespace - CTRL-Shift-LeftArrow selects all the characters to the beginning of the string, outside the quote, ignoring word breaks & whitespace - CTRL-RightArrow selects all the characters to end of the string, outside the quote, ignoring word breaks & whitespace
This needs to be fixed; it drives me nuts. --Boris Nikolaevich
> Hi Tim, > [quoted text clipped - 15 lines] > This posting is provided "AS IS" with no warranties, and confers no rights. > -------------------- Gary Chang[MSFT] - 09 Mar 2005 03:28 GMT OK Boris, we got it!
Best regards,
Gary Chang Microsoft Community Support -------------------- Get Secure! ??C www.microsoft.com/security Register to Access MSDN Managed Newsgroups! http://support.microsoft.com/default.aspx?scid=/servicedesks/msdn/nospam.asp &SD=msdn
This posting is provided "AS IS" with no warranties, and confers no rights.
Boris Nikolaevich - 17 Mar 2005 11:35 GMT Sorry to be so verbose about it--I wanted to be very detailed to make sure (a) the problem was clear and (b) others could find a post about the problem.
Thanks for watching the thread!
> OK Boris, we got it! > [quoted text clipped - 5 lines] > Get Secure! ¡§C www.microsoft.com/security > Register to Access MSDN Managed Newsgroups! http://support.microsoft.com/default.aspx?scid=/servicedesks/msdn/nospam.asp
> &SD=msdn > > This posting is provided "AS IS" with no warranties, and confers no rights. Gary Chang[MSFT] - 18 Mar 2005 06:59 GMT You are welcome Boris, your valuble feedback and concern are very important to the improvement of our product's quality.
Thanks!
Best regards,
Gary Chang Microsoft Community Support -------------------- Get Secure! ??C www.microsoft.com/security Register to Access MSDN Managed Newsgroups! http://support.microsoft.com/default.aspx?scid=/servicedesks/msdn/nospam.asp &SD=msdn
This posting is provided "AS IS" with no warranties, and confers no rights.
Free MagazinesGet these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...
|
|
|