terminal - Remove vertical split bar of a termincal multiplexer, vacating the space instead of hiding it

06
2014-04
  • Zhang Weiwu

    For the last decade I usually work in a full-screen mode terminal emulator (often xterm), and often with vertical split. The recent GNU Screen offers vertical split with ctrl-a |.

    1280×720 offers 160 columns for typical 16px font (8px wide), just enough for two 80-column session. The same way, 1440x960 offers 160 columns for 18px fonts (9px wide). The larger one: 1920×1080 offers 240 columns, just enough for three 80-column session.

    But in reality GNU Screen put a vertical bar to separate the sessions. The bar can be hidden or colored as background, but the space is taken. That leaves my console 79-columns, just one column short for daily work (e.g. coding convention requires each line less than 80 columns¹; auto-generated email reports assumed 80-column).

    Is there a way to vacate the space of the vertical split bar? Or, if this can't be done, is any of the alternatives to GNU Screen, like Dvtm / Tmux, support vertical splict without a bar's space? An X terminal emulator that can do multiplex would fit the purpose as well, but such thing perhaps doesn't exist.

    Note 1: Even Python programming language explicitly suggests 79 columns exactly for the purpose of unremovable marker at the 80th column, there are still other occassions that can take advantage of full 80-columns.

  • Answers
  • Zhang Weiwu

    None of the multiplexer in the known universe, such as gnu screen, tmux, dvtm, allows configuring vertical split to none at all.

    Marc André Tanner, current dvtm maintainer, was kind enough to offer a patch to do so on request, tested appliable to latest dvtm-0.10, making dvtm the only multiplexer in the known unverse that can be patched to do so. Marc said this patch won't go to main branch and get released.

    diff --git a/tile.c b/tile.c
    index 43a7166..b166a56 100644
    --- a/tile.c
    +++ b/tile.c
    @@ -25,9 +25,6 @@ static void tile(void)
                        ny = way;
                        nx += mw;
                        nw = waw - mw;
    -                   mvvline(ny, nx, ACS_VLINE, wah);
    -                   mvaddch(ny, nx, ACS_TTEE);
    -                   nx++, nw--;
                    }
                    /* remainder */
                    if (m == 0 && i + 1 == n)   /* no minimized clients */
    @@ -40,8 +37,6 @@ static void tile(void)
                    nh = 1;
                    ny = way + wah - (n - i);
                }
    -           if (i > 1 && nm > 1)
    -               mvaddch(ny, nx - 1, ACS_LTEE);
            }
            resize(c, nx, ny, nw, nh);
            if (n > 1 && th != wah)
    

  • Related Question

    How to get vertical split of terminal in Mac, to execute different actions?
  • hatorade

    Every once in a while I see people using what looks like terminal in their mac, except that in what seems to be 1 window they have a vertical 'split.' On one side of the split, they have emacs or something, and in the other they have something else.

    How is this possible, to How can I have two independent things happening at once in the same terminal window, divided by a vertical split? It looks a lot like split pane, but split pane is a horizontal split and the actions are mirrored in the panes.


  • Related Answers
  • 8088

    Possibly GNU Screen with vertical split?

    image

    It should already be installed on your Mac, type screen in the terminal.

    You can also do this with emacs by itself.

  • Penang

    To split this in emacs use ctrl + x, b (control and x together, then b) to switch to another buffer that is already open. You can also click on the filename at the bottom to switch to another buffer.

    Here is a list of shortcuts to resize windows and do much more with emacs link text

  • Ryan Clarke

    After you vertically split on screen, you can type screen to create new instance. Or you can also use iTerm or iTerm2 which can use vertical split. See this link for splitted panes. www.iterm2.com/#/section/features/split_panes

  • ktsujister

    very similar to John T's answer about screen, but you can also do this with tmux (http://tmux.sourceforge.net/). Nice thing about tmux compared to screen is that the vertical split feature comes even with the version you can get from packages(macports or homebrew for Mac, apt-get for ubuntu etc.).

  • Arjan

    How is this possible, to have two independent things happening at once in the same terminal window, divided by a vertical split?

    You could say it's basically just running two programs within the same window.

    In OS X Snow Leopard a horizontal split is built-in, but that indeed is a mirroring function. See also Mac OS X Snow Leopard - split Terminal windows.

  • Saurabh Tiwari

    Download iTerm2 for macOSX from here.

    Use cmd + d for vertical split and cmd + shift + d for horizontal split

    To navigate between the vertical splits in left/right or up/down fashion use cmd + [ / cmd + ]

    I recommended i Term 2 because of these features.

    Also, I like the autocomplete feature which occurs when you press cmd + ;

    Features in short include the following:

    Split Panes, Hotkey Window, Search, Autocomplete, Mouseless Copy, Paste History, Instant Replay, Configurability, Full Screen, 256 Colors, Unixyness, Readability, Mouse Reporting, Growl Support, Exposé Tabs, Tagged Profiles, Multi-Lingual.