Multihead terminal-based text editors ?

Spartrekus

Aspiring Daemon

Reaction score: 138
Messages: 916

Hello,

vim or emacs are "single" oriented monitor. Eventually one can use screen but the text editor works on a single monitor anyhow.

Do you know a possible multihead terminal-based text editor?

Concept would be that each monitor can open a file and they works alltogether (copy/cut,...) in a single terminal based application.

Feel free...
6014


6013


It would be possible to use sockets for instance and to display on any distant or local machine the buffers of the editor. A multihead editor could be made in just 2000 lines, largest maximum.
It could maybe just take 1 or maybe 2 hours to realize such an application. Surprising that an editor server like early vi-clone over telnet (buffers, hjkl, ...) is not yet existing.
Code:
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <unistd.h>  
#include <arpa/inet.h>   
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <sys/time.h>
 
Last edited:

Phishfry

Son of Beastie

Reaction score: 1,245
Messages: 3,609

/sysutils/tmux and a whole lot of monitors.
For multihead the Nvidia NVS cards have a DMS59 breakout cord to 4 outputs(HDMI or DisplayPort or VGA/DVI).
I use those for Low Profile or 2U.
Many daytraders I used to deal with use ATI cards with quad outputs. So I could see a video wall of 9 monitors a doable thing.
 
OP
OP
Spartrekus

Spartrekus

Aspiring Daemon

Reaction score: 138
Messages: 916

/sysutils/tmux and a whole lot of monitors.
For multihead the Nvidia NVS cards have a DMS59 breakout cord to 4 outputs(HDMI or DisplayPort or VGA/DVI).
I use those for Low Profile or 2U.
Many daytraders I used to deal with use ATI cards with quad outputs. So I could see a video wall of 9 monitors a doable thing.

tmux, screen,... aren't editors.
vim or emacs are "single" oriented monitor. Eventually one can use screen but it works on a single monitor anyhow.
 

Phishfry

Son of Beastie

Reaction score: 1,245
Messages: 3,609

Each screen you could assign a different ttyv number to. Each ttyv* acts interdependently.
So 8 virtual terminals right there.
 
OP
OP
Spartrekus

Spartrekus

Aspiring Daemon

Reaction score: 138
Messages: 916

vim or emacs are "single" oriented monitor. Eventually one can use screen but it works on a single monitor anyhow.
tmux and screen aren't editors and they will act with tty*, and let's say a single vim will not connect to them.
One can start several vim on each of tty*, but they are disconnected.

Each screen you could assign a different ttyv number to. Each ttyv* acts interdependently.
So 7 virtual terminal right there.
The non-famous networking tcp Hermes terminal editor maybe it helps,... so that it is possible to bring the same editor on each of your tty. It can have then the same clipboard, and it can display any kind of buffer (files, ...) on any tty
 

OJ

Daemon

Reaction score: 286
Messages: 1,082

I use multiple screens and open terminals everywhere. Cut paste works between them all. That's just basic KDE functionality. However, I suppose I didn't really understand the question since the answer is simple to me. :)
 
OP
OP
Spartrekus

Spartrekus

Aspiring Daemon

Reaction score: 138
Messages: 916

Eventually with server and client(s), over network, allowing to use it over any tty*. emacs collaborative is a good example.
 

olli@

Well-Known Member
Developer

Reaction score: 276
Messages: 315

The question is: What do you actually want to achieve? What exactly do you want to do that requires running the same editor process in multiple terminal windows?
 
OP
OP
Spartrekus

Spartrekus

Aspiring Daemon

Reaction score: 138
Messages: 916

Terminals aren't multihead. So applications that use the terminal can't be either.

for instance. Let's start an editor as server, and read it from any desired clients.
It could be easy without encryption.
 

xtaz

Well-Known Member

Reaction score: 106
Messages: 410

Isn't this exactly what sysutils/screen and sysutils/tmux are for? Or am I missing something. Both of them have a mode where you can attach to an existing terminal from another one and control it from either one. Here is a page that explains both: https://www.howtoforge.com/sharing-terminal-sessions-with-tmux-and-screen ?

It sounds like you are actually asking if this functionality is present in any editors, but that isn't really the unix way is it. You just use the right tool for the job and layer multiple tools on top of each other to get the desired effect.
 
OP
OP
Spartrekus

Spartrekus

Aspiring Daemon

Reaction score: 138
Messages: 916

Isn't this exactly what sysutils/screen and sysutils/tmux are for? Or am I missing something. Both of them have a mode where you can attach to an existing terminal from another one and control it from either one. Here is a page that explains both: https://www.howtoforge.com/sharing-terminal-sessions-with-tmux-and-screen ?

It sounds like you are actually asking if this functionality is present in any editors, but that isn't really the unix way is it. You just use the right tool for the job and layer multiple tools on top of each other to get the desired effect.
a terminal and text editor aren't same.

If you know vim, maybe you will understand better.

Start screen:
c-a c : start vim (type vim)
c-a c : start vim

both vim haven't same buffers. two disconnected vim's. :(
how do you work on your buffers then?

Your answer:
- You can't, just use screen or tmux.
hmmm how ???
 

xtaz

Well-Known Member

Reaction score: 106
Messages: 410

OK, Yes, I see what you are trying to do. But I have no idea how that would be possible. I personally don't use buffers. I would just cut and paste from one terminal to another using my desktop clipboard.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 7,286
Messages: 29,724

a terminal and text editor aren't same.
An editor is an application that uses the terminal for its input/output. Terminals aren't multi-head, dual-screen, or whatever you want to call it. A terminal has ONE screen and ONE screen only. It doesn't matter how you use the editor, it's still an application that's limited by the terminal's capabilities. A terminal simply does not have the capability to have more than one screen.
 
OP
OP
Spartrekus

Spartrekus

Aspiring Daemon

Reaction score: 138
Messages: 916

An editor is an application that uses the terminal for its input/output. Terminals aren't multi-head, dual-screen, or whatever you want to call it. A terminal has ONE screen and ONE screen only. It doesn't matter how you use the editor, it's still an application that's limited by the terminal's capabilities. A terminal simply does not have the capability to have more than one screen.
a program is allowed to communicate. Simplex example: https://en.wikipedia.org/wiki/Telnet
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 7,286
Messages: 29,724

Telnet opens a terminal session and is therefor also limited to one screen.
 
OP
OP
Spartrekus

Spartrekus

Aspiring Daemon

Reaction score: 138
Messages: 916

Telnet opens a terminal session and is therefor also limited to one screen.
Thank you for trying to help.
Server / and multi clients is readily possible, for using let it called buffers

It is just an example:
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 7,286
Messages: 29,724

It has nothing to do with client/server sockets, or anything else network related. It has to do with the capabilities of a TTY.

 
OP
OP
Spartrekus

Spartrekus

Aspiring Daemon

Reaction score: 138
Messages: 916

It has nothing to do with client/server sockets, or anything else network related. It has to do with the capabilities of a TTY.

amazing pictures...
On any opened/new/created... tty, we can use any client. The very first post mentioned collab emacs, which was good first approach and idea or possibility. Welcome for more ideas...

Another example:
Open a new tty, type: multivim -x
and it would work on file buffers, ... like you would do in regular vim.
This is some kind of idea of a collab editor.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 7,286
Messages: 29,724

Applications might use 'tricks' to split up the display and give the impression there's more than one screen. But it's simply a single screen that's split up by the application. Which is not the same as having two or more independent screens.
 
OP
OP
Spartrekus

Spartrekus

Aspiring Daemon

Reaction score: 138
Messages: 916

Applications might use 'tricks' to split up the display and give the impression there's more than one screen. But it's simply a single screen that's split up by the application. Which is not the same as having two or more independent screens.
If tricks work to have multiheads, why not...
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 7,286
Messages: 29,724

Because it's not "multihead". It's a single display that's split in two.
 
Top