Comments
6 comments
-
emails4me wrote:SQL Prompt gives me intellisence on Commented code:
Type in -- NEW PROC CREATED
holding down the shift key while type something in caps and you get the SQL Prompt intellisense? is there a way to tell it to ignore comments ?
I'd like this as an option to turn on/off. Sometimes i write code in commented out parts that i still want intellisense for.
eg.UPDATE Table SET LookupID = x WHERE 1 = 2 /* SELECT * FROM LookupTable */
-
Hello,
for me, there is no need for an option: intellisense should not work inside comments! Indeed, if I want intellisense for code inside comments, I uncomment my comment just for the time while I am writing it, and then I "redo" my comment. While fulfilling my ususal tasks, I expect it would take longer to go in the options and to turn them on/off...
Just my 2cents,
Emmanuel -
Could we have the option to turn the inteli-comments on or off? It could be useful in certain cases when documenting code. Maybe even set the level at which it appears i.e. stored proc names, table names, view names only. Not essential tho...
Great add-in overall!
Cheers
Neil
PS Could it do all my documenting automatically please? javascript:emoticon('')
Wink -
I think what's probably happening here is that SQL Prompt is just putting up the default candidate list (which it tends to do when all else fails). I have a feeling our parser just ignores comments entirely which makes it a little tricky because you don't necessarily know when you're inside one. We'll look into this further though.
Thanks,
Bart -
The candidate list also pops-up when typing literal strings (inside single quotes). I would ask that if you get SQL Prompt to recognize when it is inside a comment section you would also teach it to recognize when it is inside a literal string.
-
nanchen wrote:for me, there is no need for an option: intellisense should not work inside comments!
I'll frequently do something likeSELECT * FROM mytable -- UPDATE mytable SET x=y+1 WHERE z IS null
The idea here is that I can verify that my query targets the right rows by running it as shown. Then I select the bottom two rows (except the "--") in order to make the actual change.
In this situation I don't want to uncomment the UPDATE because that eliminates my protection. But I would like the intellisense help for that part of the query.
Add comment
Please sign in to leave a comment.
Type in -- NEW PROC CREATED
holding down the shift key while type something in caps and you get the SQL Prompt intellisense? is there a way to tell it to ignore comments ?