Sorry if this has been discussed before, but I couldn't find anything using the limited search terms.
Sometimes using the Tab key in the Script Editor moves the cursor over 2 characters positions. Other times it moves the the cursor 4 characters.
It appears that if the previous line was created using Code Builder, the previous line will have a tab of 2 characters. When Tab is inserted in the following line, it will be tabbed 2 characters.
Pressing tab on a line where the previous line is not indented, will move the cursor over 4 characters.
This is not a major issue, but I'm a bit of a neat freak and it drives me crazy to have some lines indented 2 characters while others are 4 characters.
Tab Spacing in Script Editor
Moderators: Dorian (MJT support), JRL
Re: Tab Spacing in Script Editor
Yeah, this happens to me too. Makes me slightly batty.
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Re: Tab Spacing in Script Editor
I'm not sure I understand how to replicate this issue - Code Builder doesn't insert ANY tabs. It leaves you to do that. So I'm not sure why you are seeing two spaces after using code builder. As far as I can see, the Tab key always inserts 4 spaces.
Maybe what you are seeing is if you use the space bar to enter say 3 spaces before some code, when you hit return at the end of that line it will line you up in the same place - so 3 preceding spaces again.
But if you start a new line and hit tab you'll get the 4 spaces again.
This isn't an issue with the Tab key but just a result of using a different indentation with your text. The editor correctly lines up the text. If you ALWAYS use the Tab key you wouldn't have an issue, but if you mix and match tab with some other number of spaces then you might see an inconsistency. But that's down to how you choose to indent.
Or have I missed something?
Maybe what you are seeing is if you use the space bar to enter say 3 spaces before some code, when you hit return at the end of that line it will line you up in the same place - so 3 preceding spaces again.
But if you start a new line and hit tab you'll get the 4 spaces again.
This isn't an issue with the Tab key but just a result of using a different indentation with your text. The editor correctly lines up the text. If you ALWAYS use the Tab key you wouldn't have an issue, but if you mix and match tab with some other number of spaces then you might see an inconsistency. But that's down to how you choose to indent.
Or have I missed something?
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
Re: Tab Spacing in Script Editor
One case where it doesn't work as I expected:
If you highlight a bunch of lines and then block indent, it only indents them 2 spaces. If you do the same and hit the tab key it also only indents them 2 spaces. You have to indent them again to match the normal indent.
Another case is when you start a subroutine and press enter. It only indents by 2 spaces.
The code builder for FindImage indents after the If>NumFound>0 only by 2 spaces.
If you highlight a bunch of lines and then block indent, it only indents them 2 spaces. If you do the same and hit the tab key it also only indents them 2 spaces. You have to indent them again to match the normal indent.
Another case is when you start a subroutine and press enter. It only indents by 2 spaces.
The code builder for FindImage indents after the If>NumFound>0 only by 2 spaces.
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Re: Tab Spacing in Script Editor
Ah, you mean the wizards. Ok, got it thanks.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
Re: Tab Spacing in Script Editor
Also the indenting inside of SRT statements seems to default to 2 spaces.Marcus Tettmar wrote:Ah, you mean the wizards. Ok, got it thanks.
Code: Select all
SRT>abc
first indent always starts here
END>abc
Re: Tab Spacing in Script Editor
Seems to be working better with the update. Woo hoo!
Re: Tab Spacing in Script Editor
I agree, it's working great!
This is awesome for my OCD self.
This is awesome for my OCD self.