[WORKAROUND] What's wrong with my autoindent?

Just starting out? Need help? Post your questions and find answers here.
Randy Walker
Addict
Addict
Posts: 1109
Joined: Sun Jul 25, 2004 4:21 pm
Location: USoA

[WORKAROUND] What's wrong with my autoindent?

Post by Randy Walker »

This is driving me crazy. I must be missing something in preference settings.
If I paste this in to the PB editor:
Procedure dummy()
If a=b
If 1=1
If 2=2
Else
EndIf
EndIf
EndIf
EndProcedure
I get this:

Code: Select all

Procedure dummy()
If a=b
If 1=1
If 2=2
Else
EndIf
EndIf
EndIf
EndProcedure
No change!! :(
If I paste it into JaPBe I get this:

Code: Select all

Procedure dummy()
  If a=b
    If 1=1
      If 2=2
      Else
      EndIf
    EndIf
  EndIf
EndProcedure
Nicely indented :)
I also get nice autoinddent as I type in JaPBe. Now I find myself editing in JaPBe and doing copy paste into the PB IDE just to get proper indentation. What am I missing (aside from JaPBe compatible with PB v6.12 x64) ?
Last edited by Randy Walker on Wed Sep 18, 2024 12:30 am, edited 1 time in total.
- - - - - - - - - - - - - - - -
Randy
I *never* claimed to be a programmer.
User avatar
idle
Always Here
Always Here
Posts: 6026
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: What's wrong with my autoindent?

Post by idle »

it doesn't indent automatically, you need to do
ctrl + A
crtl + I
User avatar
ChrisR
Addict
Addict
Posts: 1484
Joined: Sun Jan 08, 2017 10:27 pm
Location: France

Re: What's wrong with my autoindent?

Post by ChrisR »

In addition, it will indent automatically if you write it line by line. Paste respects the original formatting
boddhi
Enthusiast
Enthusiast
Posts: 524
Joined: Mon Nov 15, 2010 9:53 pm

Re: What's wrong with my autoindent?

Post by boddhi »

Hello,
Randy Walker wrote: If I paste it into JaPBe I get this:
:shock: JaPBe?
Do older JaPBe versions support recent versions of PB, or is there a maintained version somewhere?
(Personally, I think I remember stopping using JaPBe with PB versions 5+)
If my English syntax and lexicon are incorrect, please bear with Google translate and DeepL. They rarely agree with each other!
Except on this sentence...
Randy Walker
Addict
Addict
Posts: 1109
Joined: Sun Jul 25, 2004 4:21 pm
Location: USoA

Re: What's wrong with my autoindent?

Post by Randy Walker »

boddhi wrote: Tue Sep 17, 2024 11:50 pm Hello,
Randy Walker wrote: If I paste it into JaPBe I get this:
:shock: JaPBe?
Do older JaPBe versions support recent versions of PB, or is there a maintained version somewhere?
(Personally, I think I remember stopping using JaPBe with PB versions 5+)
Sorry, no maintained version of JaPBe so my main project is trapped inside 5.xx until someone can pick up JaPBe and run with it. I have the source but cannot get it to compile.
I've had limited success compiling any of my codes with 6.xx for various reasons I just haven't had the patients to deal with so I'm in no big rush, fortunately.
- - - - - - - - - - - - - - - -
Randy
I *never* claimed to be a programmer.
Randy Walker
Addict
Addict
Posts: 1109
Joined: Sun Jul 25, 2004 4:21 pm
Location: USoA

Re: What's wrong with my autoindent?

Post by Randy Walker »

ChrisR wrote: Tue Sep 17, 2024 11:08 pm In addition, it will indent automatically if you write it line by line
I'm not seeing that happen at all.
- - - - - - - - - - - - - - - -
Randy
I *never* claimed to be a programmer.
Randy Walker
Addict
Addict
Posts: 1109
Joined: Sun Jul 25, 2004 4:21 pm
Location: USoA

Re: What's wrong with my autoindent?

Post by Randy Walker »

idle wrote: Tue Sep 17, 2024 10:56 pm it doesn't indent automatically, you need to do
ctrl + A
crtl + I
THANKS Idle!!! Great Tip and works perfectly.
- - - - - - - - - - - - - - - -
Randy
I *never* claimed to be a programmer.
boddhi
Enthusiast
Enthusiast
Posts: 524
Joined: Mon Nov 15, 2010 9:53 pm

Re: What's wrong with my autoindent?

Post by boddhi »

Randy Walker wrote: Wed Sep 18, 2024 12:28 am
idle wrote: Tue Sep 17, 2024 10:56 pm it doesn't indent automatically, you need to do
ctrl + A
crtl + I
THANKS Idle!!! Great Tip and works perfectly.
You can also do it with a line or a block of lines (Select line(s) then CTRL + I). :wink:
If my English syntax and lexicon are incorrect, please bear with Google translate and DeepL. They rarely agree with each other!
Except on this sentence...
User avatar
HeX0R
Addict
Addict
Posts: 1218
Joined: Mon Sep 20, 2004 7:12 am
Location: Hell

Re: [WORKAROUND] What's wrong with my autoindent?

Post by HeX0R »

Randy Walker
Addict
Addict
Posts: 1109
Joined: Sun Jul 25, 2004 4:21 pm
Location: USoA

Re: What's wrong with my autoindent?

Post by Randy Walker »

boddhi wrote: Wed Sep 18, 2024 7:38 pm
You can also do it with a line or a block of lines (Select line(s) then CTRL + I). :wink:
Yes, I observed that already. Thanks boddhi :)
- - - - - - - - - - - - - - - -
Randy
I *never* claimed to be a programmer.
Randy Walker
Addict
Addict
Posts: 1109
Joined: Sun Jul 25, 2004 4:21 pm
Location: USoA

Re: What's wrong with my autoindent?

Post by Randy Walker »

Randy Walker wrote: Wed Sep 18, 2024 12:24 am
ChrisR wrote: Tue Sep 17, 2024 11:08 pm In addition, it will indent automatically if you write it line by line
I'm not seeing that happen at all.
Yeah, I'm really not seeing that happen in v6.11 or v6.12 so I guess I must be missing something in my preference settings. I can manually correct indentation when I write line by line, but that's the only way I get proper line by line indentation.
- - - - - - - - - - - - - - - -
Randy
I *never* claimed to be a programmer.
AZJIO
Addict
Addict
Posts: 2225
Joined: Sun May 14, 2017 1:48 am

Re: [WORKAROUND] What's wrong with my autoindent?

Post by AZJIO »

Ctrl + M
Ctrl + M
Crtl + I
I replaced Crtl+I with Alt+Z
As well as Crtl+Alt+Z for SmartIndent
Randy Walker
Addict
Addict
Posts: 1109
Joined: Sun Jul 25, 2004 4:21 pm
Location: USoA

Re: [WORKAROUND] What's wrong with my autoindent?

Post by Randy Walker »

AZJIO wrote: Tue Dec 17, 2024 3:39 am I replaced Crtl+I with Alt+Z
How did you do that?
Alt+Z doesn't do anything to indentions. :?
But thanks. I learned Alt+Z Opens my NVIDIA sidebar thingy I didn't know I had. :)
- - - - - - - - - - - - - - - -
Randy
I *never* claimed to be a programmer.
AZJIO
Addict
Addict
Posts: 2225
Joined: Sun May 14, 2017 1:48 am

Re: [WORKAROUND] What's wrong with my autoindent?

Post by AZJIO »

Randy Walker wrote: Tue Dec 17, 2024 4:17 am
AZJIO wrote: Tue Dec 17, 2024 3:39 am I replaced Crtl+I with Alt+Z
How did you do that?
Alt+Z doesn't do anything to indentions. :?
But thanks. I learned Alt+Z Opens my NVIDIA sidebar thingy I didn't know I had. :)
the keyword is replaced
My fingers can't reach to press Crtl+I. I use this very often, so I chose a convenient hotkey.
You don't have to keep the NVIDIA configurator in memory.
Randy Walker
Addict
Addict
Posts: 1109
Joined: Sun Jul 25, 2004 4:21 pm
Location: USoA

Re: [WORKAROUND] What's wrong with my autoindent?

Post by Randy Walker »

AZJIO wrote: Tue Dec 17, 2024 4:21 am the keyword is replaced
My fingers can't reach to press Crtl+I. I use this very often, so I chose a convenient hotkey.
You don't have to keep the NVIDIA configurator in memory.
OK, Gotcha. Thanks AZJIO 👍
- - - - - - - - - - - - - - - -
Randy
I *never* claimed to be a programmer.
Post Reply