deadpixi / sam

An updated version of the sam text editor.
Other
433 stars 47 forks source link

RFE: Better integration with X selections #15

Open siebenmann opened 8 years ago

siebenmann commented 8 years ago

Right now, one of the awkward bits about using sam as an editor in the broader X ecosystem is that it's kind of painful to move text between sam and other X programs. X has a selection system, and sam has a selection system, and you have to <exch> between the two. I think that there are good reasons to keep the two at least somewhat separate, but I also think that it could be easier. My current set of ideas:

These two changes combined would mostly remove the need to use <exch>, while still keeping the separation between sam's own buffer and the X selection that insures you don't accidentally lose cut or snarf'd data that exists only in sam's buffer.

RamKromberg commented 7 years ago

@siebenmann Behold in horror at xsel ( https://github.com/kfish/xsel ) to understand why is hacked in a way that separates \ avoids ICCCM where possible.

That being said, sam already maintains a command stream and buffer so it should be possible to avoid the multiple entry points by targeting the command language itself.

m-cz commented 7 years ago

Just to provide an example:

bind C c command send > xclip -i -selection c
bind C v command send < xclip -o -selection c