Robin Lee Powell wrote:
> On Thu, Feb 18, 2010 at 01:39:15PM -0800, Micah Cowan wrote:
>> The following should bind <prefix> J to join the current (already
>> finished) selection with spaces:
>>
>> bind-key J run-shell 'tmux save-buffer /tmp/.tmux-exchange; tr \n
>> " " < /tmp/.tmux-exchange >/tmp/.tmux-exchange-processed; tmux
>> load-buffer /tmp/.tmux-exchange-processed'
> 
> Oh *interesting*; I thought code was going to be required.

Yeah, I did too, until I realized (quoted from your other post):

> < micahcowan> rlpowell, you could get around that nonblocking run-shell thing,
> actually: just use "tmux save-buffer", etc, in the shell command, rather than
> doing it as a direct tmux command.

...

> Still seems like it might be nice to clean that up a bit, but good
> stuff none the less.

You could farm the whole thing out to a shell script with the same A
content.

> Now we just need the rotating behaviour of J (see my other post).

Well, you could of course still rig that up through run-shell, and some
sort of flag-file. But personally, I don't like the rotating behavior of
J: better to have separate bindings for separate modes, so you only have
to hit the binding once to get the behavior you want (and don't have to
figure out what mode you're already in). The shell solution strikes me
as the most flexible solution, since there are many things you just
wouldn't think to hardcode

-- 
Micah J. Cowan
http://micah.cowan.name/

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users

Reply via email to