Stop Formatting for End-Cap while Coding?

Whenever I type an “if” statement in the middle of my code it re-formats the entire damn sheet - I keep ending up with random end-caps everywhere because of this after I’m finished editing.

look, I just don’t want it to choose what “end” to use. is there a way to turn off this damn feature? if I type “if” “select” or any parameter - I don’t want it looking for an end spot, LET ME DO IT, I’LL GET TO IT WHEN I GET TO IT JEESH!!!

thanks :wink:

check your preferences… I don’t have such a problem

this video shows it… I recorded the problem.

https://youtu.be/VCzwtPjjxIg

^ i know its annoying, but wait until I type “while”

no preference exists?

and a small shoutout - @Dave S - it was one of your posts that got me motivated to start learning how to code 6+ years ago on the old real-basic forums. :slight_smile: thank you. I still suck, but I’ve come a long way.

merry christmas brotha’

That’s a feature from Xojo and not a bug.

@Beatrix Willius i know - but I’d like to put a stop to it. sucks that there’s so few options in the IDE for how you work with the code.

in fact - EVERY IDE i’ve used had the ability to edit some of these minor options - they don’t hurt the compile process at all.

Android Studio - disable shift-enter complete is even an option.

it’s just an un-needed hinderance IMO. should we put this on a feature request?

I know there’s a way in scripting, could someone help me out ? i don’t even know where to start

I think I have to disable in script and then add a constant? or attribute to do it?

referencing @ and his amazing script addition that Im still trying to use appropriately. sadly this isn’t an option I see.

https://forum.xojo.com/47389-xojo-ide-reformat-code-script/0

I mis understood… I thought when you typed “IF” that Xojo INSERTED the END, (which is does not).

What your video shows is (as Beatrix mentioned), a “feature”. and I have to admit one, that I it seems give little thought to… as it does not ever seem to be a distraction.

I looked at the video and like Dave S, I never gave it much thought. However, in my case, I find it useful and makes code more readable.

But I agree with you, everybody should have the option to decide about this feature active or not. We all have our personal preferences and habits.

When working in very long runs of code - it becomes annoying. I backspace and think I fixed it, but now all the other statements re-scan and all-a-sudden, I try to run and ERROR - multiple end caps at the bottom or randomly in the code.

We also all know how Xojo often lags a bit. When it does, this one feature feels debilitating - by that I mean a simple 2 second additional paint in the rear.

Don’t get me wrong, it’s not the biggest issue… but considering the situation - this IDE is lacking on options and the only other, even feasible code writer is Arbed… Older, outdated and no preview or visual aspects. Auto-complete is a must when thinking things out and I just feel stuck.

is scripting not an option? or am I right in assuming that the scan would run but scripting would just auto undo it?

example - I have a problem with my right pinky - after pressing shift so many times (oh an hour on the computer) … it hurts (carpal tunnel anyone?) - so I solved the problem by using a hotkey app - ctrl bracket gives me my parenthesis (thumb,index V. pinky,9). It sucks I won’t be able to solve this little problem with the same type of ingenuity… ie, scripting

I really want to just stop it from happening.

thanks for the responses guys!

[quote=469184:@Dave S]I mis understood… I thought when you typed “IF” that Xojo INSERTED the END, (which is does not).

What your video shows is (as Beatrix mentioned), a “feature”. and I have to admit one, that I it seems give little thought to… as it does not ever seem to be a distraction.[/quote]

I’d almost prefer that… cause at least then I know the scan wouldn’t mess up all the other treed’ statements…

i would insert If Then End If with a short cut key tool or input xif and remove the x later, or make a feature request
that the start & end only viewd at if and then have the same count.

@Markus Rauch actually - had that exact idea - sadly, windows 10 has a very limited amount of shortcuts that I can actually use - secondly, Xojo seems to cancel out almost every key combo I’ve tried making.

3 different HotKey apps have failed me. I think because xojo is taking precedence when in focus. I am in search for a new one. I’m just thankful, for my pinky’s sake, that the parenthesis shortcut is working.

any suggestions would be greatly appreciated. I tried making hotkeys for If, Select and even DB actions. just, don’t have the keys apparently to do it, and CTRL-ANYTHING in xojo seems to open the bottom panel rolls eyes

Feedback Case 58703 Submitted - <https://xojo.com/issue/58703>

Maybe if I make a hotkey app itself - but I lack the direction here…

I have a really cool app that works everywhere, no matter what app is in focus. if I press CTRL-ALT-W my WordWeb dictionary with synonyms and antonyms pops up. I’d like the same dependency for this, but how to actually code that, and how long it’ll take me are another thing. I don’t even know how to listen for the keystrokes when the app is out of focus yet -_-. Never had to play with that.

i saw there is a context menu wrap in if then , just open it with right mouse at source code.
at menu edit options general menu for short cuts it seems the wrap in did not exists there.

The video is not available (from me, France).

The “feature” is not in Xojo 19r2.1 (apparently).

Is it a Xojo 2019r3 feature ?

Let’s call it a by-design bug

Emile, this feature (of connecting IF/END For/Next etc) has been in Xojo for many versions… It was “enchanced” in one of the later versions. but it has been there for a long long time