How to prevent smart editing
-
Arrrgghhh! I'm sooo frustrated! I have a construct like this:
if(something)
{
...
}
else
{
...
}And I want to add a comment after the else, thusly:
if(something)
{
...
}
else<tab>//comment
{
...
}As soon as I hit the @$^*(#!+ Tab key, the editor decides to do this:
if(something)
{
...
}
else
{
<tab>
}//comment
{
...
}Usually when the editor reformats things, if you hit Delete, it gives you back what you wanted in the first place, but not in this case. :mad: I have tried every (I think) editor option to prevent it from doing this and haven't figured out how to disable this behavior yet. Does anyone know how to overcome this stupid "smart" feature?
QRZ? de WAØTTN
-
Arrrgghhh! I'm sooo frustrated! I have a construct like this:
if(something)
{
...
}
else
{
...
}And I want to add a comment after the else, thusly:
if(something)
{
...
}
else<tab>//comment
{
...
}As soon as I hit the @$^*(#!+ Tab key, the editor decides to do this:
if(something)
{
...
}
else
{
<tab>
}//comment
{
...
}Usually when the editor reformats things, if you hit Delete, it gives you back what you wanted in the first place, but not in this case. :mad: I have tried every (I think) editor option to prevent it from doing this and haven't figured out how to disable this behavior yet. Does anyone know how to overcome this stupid "smart" feature?
QRZ? de WAØTTN
If I remember correctly the else autocomplete feature is enabled by a code snippet el, you could remove it. Or was that not what you were meaning?
Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”
-
Arrrgghhh! I'm sooo frustrated! I have a construct like this:
if(something)
{
...
}
else
{
...
}And I want to add a comment after the else, thusly:
if(something)
{
...
}
else<tab>//comment
{
...
}As soon as I hit the @$^*(#!+ Tab key, the editor decides to do this:
if(something)
{
...
}
else
{
<tab>
}//comment
{
...
}Usually when the editor reformats things, if you hit Delete, it gives you back what you wanted in the first place, but not in this case. :mad: I have tried every (I think) editor option to prevent it from doing this and haven't figured out how to disable this behavior yet. Does anyone know how to overcome this stupid "smart" feature?
QRZ? de WAØTTN
Hi, you can control the auto-formatting to a large extent. See menu Tools/Options/TextEditor/C#/Formatting :)
Luc Pattyn [Forum Guidelines] [My Articles]
DISCLAIMER: this message may have been modified by others; it may no longer reflect what I intended, and may contain bad advice; use at your own risk and with extreme care.
-
If I remember correctly the else autocomplete feature is enabled by a code snippet el, you could remove it. Or was that not what you were meaning?
Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”
Henry Minute wrote:
If I remember correctly the else autocomplete feature is enabled by a code snippet el
I'm not sure exactly what you meant here, but it gave me an idea. I changed the "else" to "elsex", which disabled the autoformatting so that I could add my tab and comment, then I went back and removed the "x". It's pretty kludgy, but it works. I don't know if this is what you had in mind, but thanks for the idea! I don't mind a couple of extra keystrokes, the tradeoff being testing every stinkin' autoformat option in the editor settings. :mad:
QRZ? de WAØTTN
-
Henry Minute wrote:
If I remember correctly the else autocomplete feature is enabled by a code snippet el
I'm not sure exactly what you meant here, but it gave me an idea. I changed the "else" to "elsex", which disabled the autoformatting so that I could add my tab and comment, then I went back and removed the "x". It's pretty kludgy, but it works. I don't know if this is what you had in mind, but thanks for the idea! I don't mind a couple of extra keystrokes, the tradeoff being testing every stinkin' autoformat option in the editor settings. :mad:
QRZ? de WAØTTN
In that case try else[space][tab]// comment Saves having to go back and delete the 'x'. :)
Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”
-
In that case try else[space][tab]// comment Saves having to go back and delete the 'x'. :)
Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”