Left/Right Screen Split (Instead of Top/Bottom)

425 views
Skip to first unread message

LinuxDevice

unread,
Aug 17, 2017, 3:01:24 AM8/17/17
to cgdb
Because of wide screen monitors, or even dual monitors sitting side-by-side, I'm wondering if it would be practical to change the top/bottom split mode to instead be a left/right split. I'd like if the source code at the break point covered the entire right half of my terminal (the full vertical of the right side), and the interface the left half (the full vertical of the left side). How simple or difficult would such a feature be?

Robert Rossi

unread,
Aug 17, 2017, 9:13:00 AM8/17/17
to cgdb
CGDB supports vertical and horizontal split screens.

Try :set wso=vertical

You can put that in your ~/.cgdb/cgdbrc file as well

On Thu, Aug 17, 2017 at 3:01 AM, LinuxDevice <dsti...@gmail.com> wrote:
Because of wide screen monitors, or even dual monitors sitting side-by-side, I'm wondering if it would be practical to change the top/bottom split mode to instead be a left/right split. I'd like if the source code at the break point covered the entire right half of my terminal (the full vertical of the right side), and the interface the left half (the full vertical of the left side). How simple or difficult would such a feature be?

--
You received this message because you are subscribed to the Google Groups "cgdb" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cgdb-users+unsubscribe@googlegroups.com.
To post to this group, send email to cgdb-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cgdb-users/30804aef-3a59-49c5-a218-1eea1102df69%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

LinuxDevice

unread,
Aug 17, 2017, 1:46:16 PM8/17/17
to cgdb
This doesn't seem to work for me, perhaps I have a version which is outdated: 0.6.8. I tried both the cgdbrc and directly in cgdb. Would you happen to know if this version is simply too old? It runs on Fedora 23.


On Thursday, August 17, 2017 at 7:13:00 AM UTC-6, Bob Rossi wrote:
CGDB supports vertical and horizontal split screens.

Try :set wso=vertical

You can put that in your ~/.cgdb/cgdbrc file as well
On Thu, Aug 17, 2017 at 3:01 AM, LinuxDevice <dsti...@gmail.com> wrote:
Because of wide screen monitors, or even dual monitors sitting side-by-side, I'm wondering if it would be practical to change the top/bottom split mode to instead be a left/right split. I'd like if the source code at the break point covered the entire right half of my terminal (the full vertical of the right side), and the interface the left half (the full vertical of the left side). How simple or difficult would such a feature be?

--
You received this message because you are subscribed to the Google Groups "cgdb" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cgdb-users+...@googlegroups.com.

Mike Mueller

unread,
Aug 17, 2017, 2:02:52 PM8/17/17
to cgdb-...@googlegroups.com
Looks like vertical splits went in 0.7.0, so you'd need to build from source if there's no Fedora package.

https://raw.githubusercontent.com/cgdb/cgdb/v0.7.0/NEWS

To unsubscribe from this group and stop receiving emails from it, send an email to cgdb-users+unsubscribe@googlegroups.com.

To post to this group, send email to cgdb-...@googlegroups.com.

LinuxDevice

unread,
Aug 17, 2017, 2:42:57 PM8/17/17
to cgdb
Excellent! I compiled 0.7.0 and it works! Such a simple concept and it works so nicely. :) Is there an option to swap debugger versus code displays between left and right sides?

Robert Rossi

unread,
Aug 17, 2017, 3:17:52 PM8/17/17
to cgdb
No, but we could consider it if you were really interested.

Wouldn't be to hard to do.

--
You received this message because you are subscribed to the Google Groups "cgdb" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cgdb-users+unsubscribe@googlegroups.com.
To post to this group, send email to cgdb-...@googlegroups.com.

LinuxDevice

unread,
Aug 17, 2017, 4:20:47 PM8/17/17
to cgdb
I am interested in it. I'm testing out the left/right split and it is now much better on wide monitors. I am displaying on the right monitor of two monitors, and I can tell already that it would be even better if gdb were on the left half and source code were listed on the right (mostly I concentrate on reading stack frames, and then glance at source code...coding/debugging is on my right monitor so I'd spend less time with a bent neck if debugger/source halves were swapped).

Perhaps I am being greedy (I'm appreciating this program more and more by the minute), but I would find a further option of choosing where left and right split (other than fixed at half way) to be of interest (only if not difficult). With wide screens I would like to put more of the width into the gdb side and less into the source code side...source code has all lines at 80 characters or less, the output of the program which gdb sees is much wider and wraps even though I have blank space on the source code side. Being able to nudge 15 columns from the left into the right would be very efficient (this is already far more pleasant than gdb by itself). Currently if I want 15 characters more on the right I have to expand the terminal by 30 characters and waste 15 characters of space in the other window.

I'm really sad I didn't learn about this tool before, it is way better than most of the graphical versions I've looked at before and is good even on embedded systems without a GUI. When using a GUI features for left/right split other than in the middle would be very useful.


On Thursday, August 17, 2017 at 1:17:52 PM UTC-6, Bob Rossi wrote:
No, but we could consider it if you were really interested.

Wouldn't be to hard to do.
On Thu, Aug 17, 2017 at 2:42 PM, LinuxDevice <dsti...@gmail.com> wrote:
Excellent! I compiled 0.7.0 and it works! Such a simple concept and it works so nicely. :) Is there an option to swap debugger versus code displays between left and right sides?

On Thursday, August 17, 2017 at 1:01:24 AM UTC-6, LinuxDevice wrote:
Because of wide screen monitors, or even dual monitors sitting side-by-side, I'm wondering if it would be practical to change the top/bottom split mode to instead be a left/right split. I'd like if the source code at the break point covered the entire right half of my terminal (the full vertical of the right side), and the interface the left half (the full vertical of the left side). How simple or difficult would such a feature be?

--
You received this message because you are subscribed to the Google Groups "cgdb" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cgdb-users+...@googlegroups.com.

To post to this group, send email to cgdb-...@googlegroups.com.

Robert Rossi

unread,
Aug 17, 2017, 5:01:11 PM8/17/17
to cgdb
On Thu, Aug 17, 2017 at 4:20 PM, LinuxDevice <dsti...@gmail.com> wrote:
I am interested in it.

OK. Perhaps you could open a feature request for this on github?

...I would find a further option of choosing where left and right split (other than fixed at half way) to be of interest

You have a few options here.

To adjust the window manually,
- Shrink source window 1 line or column (depending on split orientation).
= Grow source window 1 line or column (depending on split orientation).
_ Shrink source window 25%
+ Grow source window 25%

An option to provide a default split style,
:set winsplit=style

Set the split point between source and GDB window. This is especially useful as an init setting in your cgdbrc file. See Configuring CGDB. The possible values for style are ‘src_full’, ‘src_big’, ‘even’, ‘gdb_big’, and ‘gdb_full’.

LinuxDevice

unread,
Aug 17, 2017, 7:06:15 PM8/17/17
to cgdb
The feature for incrementing/decrementing window split size is excellent. Is there a way to put this in the ".cgdb/cgdbrc" file? For example, decrement three times.

For the github feature request, should I use the "issue" reporting feature? I'm not sure of the proper place to add a request.
Reply all
Reply to author
Forward
0 new messages