Author Topic: having multiple files open annoying/not very practical  (Read 989 times)

Offline CatCode

  • Single posting newcomer
  • *
  • Posts: 2
having multiple files open annoying/not very practical
« on: June 14, 2020, 09:23:15 pm »
hey everyone, i went ahead and installed the newest version to see if the developers had improved this aspect of the program and unfortunately it hasn't been improved. I feel that in code blocks, if i open multiple files for editing, then i should be able to navigate between them easily and orderly, but unfortunately this isn't the case. I've attached an image to illustrate this.

If you look at the image, i had just closed a file at the beginning of the list (farthest to the left), and when i do this is somehow jumps to the last file on the list (all the way to the right). As you can see, the file "whaletranslate.cpp" is not listed directly above in the tabs, it would be a lot easier to navigate if it was
situated above where i can clearly see it or it was highlighted in some way (weirdly enough a different file is highlighted in blue...)

If i scroll all the way to the left with the arrow so that i start with that file, it somehow keeps jumping to the last file when i close it, when i feel that it should close in order from either left/right or right/left like my browser does with the tabs.

Also, as a side note, it would be nice if code::blocks had some easy text formatting just so i could add spacing like in a word processor, but that's a side note and i don't really care.

Thanks for reading and thanks for this free program :)

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12830
    • Travis build status
Re: having multiple files open annoying/not very practical
« Reply #1 on: June 14, 2020, 10:23:49 pm »
I don't understand. I guess your explanations make sense to you, because you have all the context. I have to guess what you exactly mean. Please try to explain better.

Probably you can see if any of the settings in Settings -> Environment -> Notebook appearance change it for you. "Use stack based tab switching" might be the one you want to have disabled.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12830
    • Travis build status
Re: having multiple files open annoying/not very practical
« Reply #2 on: June 14, 2020, 10:26:09 pm »
Also, as a side note, it would be nice if code::blocks had some easy text formatting just so i could add spacing like in a word processor, but that's a side note and i don't really care.
Again, I'm not really sure how to interpret this.
What does "some easy text formatting" mean?
We have support for astyle, we have an align feature.
You can integrated clang-format or any other formatting tool you like (it won't be 100% user-friendly, but it will work).
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline CatCode

  • Single posting newcomer
  • *
  • Posts: 2
Re: having multiple files open annoying/not very practical
« Reply #3 on: June 15, 2020, 12:06:23 am »
I don't understand. I guess your explanations make sense to you, because you have all the context. I have to guess what you exactly mean. Please try to explain better.

Probably you can see if any of the settings in Settings -> Environment -> Notebook appearance change it for you. "Use stack based tab switching" might be the one you want to have disabled.

Sorry, let me try again. So on a browser, you have tabs:

tab1 tab2 tab3 tab4

If you close tab4, the browser will go to tab3, at least this is how it works on mozilla. It seems to sort of jump all over the place when you close on code::blocks. Sorry I'm just a beginner programmer, i have no idea what "stack based tab switching is", and i'll just put up with it the way it is now since right now I'm focused on learning more code and i don't want to get sidetracked by this, it's not such a big deal.

Look at the picture, all the way of to the right is the file that's currently showing on the screen shot in the tabs. I personally don't think that's how the tabs should be organized by the program, i didn't do that. I think it should be more chronological/natural sorry if i'm just confusing people and wasting their time, i'm trying my best to explain. I guess i could make a video about it but that's a whole other can of worms.


Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 2843
Re: having multiple files open annoying/not very practical
« Reply #4 on: June 15, 2020, 08:31:56 am »
I still can not fully understand your problem, but some tips, i can see from your screenshot:
1) Make the project manager visible: On the far left there is a window, where in your screenshot is written fortran symbol browser. There you can use the black left arrow to navigate the tabs. There should be one tab called Projects. There all files of a project are listed. This allows easy switching
2) If you want to switch fast between files, use the key combination: "alt+g" this sill speed up your usage, because you do not have to move the fingers from the keyboard
3) If you want to switch fast between your actual line, and the last line you were editing (also across files) use the key combination "alt+left arrow key" or "alt+right arrow key"


I just tested closing tabs from left to right, and there is really a odd jumping around.  This comes from the browse tracker plugin. It tracks the opening (and activating) of the tabs and every time you close a tab it goes up one tab in the stack. So it really is a chronological tab using switching. But it should do this only if the active tab is closed, not if some hidden tab is closed. This is a bug, and you should report it on SF. I never realized this, because i never close tabs ;) see my tips top . If you do not want to use the "alt+left arrow key" feature you can disable the Browse tracker plugin in Plugins->Plugin manager
« Last Edit: June 15, 2020, 08:36:42 am by BlueHazzard »

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2264
Re: having multiple files open annoying/not very practical
« Reply #5 on: June 15, 2020, 05:32:10 pm »
... This comes from the browse tracker plugin. It tracks the opening (and activating) of the tabs and every time you close a tab it goes up one tab in the stack. So it really is a chronological tab using switching. But it should do this only if the active tab is closed, not if some hidden tab is closed. ...

Please explain to me what a "hidden tab" is so I can fix this.

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 2843
Re: having multiple files open annoying/not very practical
« Reply #6 on: June 15, 2020, 07:04:03 pm »
Quote
Please explain to me what a "hidden tab" is so I can fix this.
Non active tab...

lets say we have a project with 4 files and no tabs open.
Now open the files
in this order:
Code: [Select]
1, 2, 3, 2, 1, 4!NOTE: Open 1 and 2 multiple times!!

the final tab layout should look like this with file 4 active
Code: [Select]
tab 1 | tab 2 | tab 3 |!!!tab 4!!!
Now close tab 3. The active tab will switch to tab 1 instead of staying in tab 4

i hope i explained it well

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2264
Re: having multiple files open annoying/not very practical
« Reply #7 on: July 04, 2020, 04:55:15 pm »
Fixed, Rev: 12177

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 2843
Re: having multiple files open annoying/not very practical
« Reply #8 on: July 06, 2020, 05:45:50 pm »
Fixed, Rev: 12177
Thank You!

I will test and report back if i find other bugs.