Thanks Nicholas and Thiago. I am reading the man page from the latest
commit in git but I am still confused:

-------------------
One command in accepts an argument, copy-pipe, which copies the selection
and pipes it to a command.  For example the following will bind ‘C-q’ to
copy the selection into /tmp as well as the paste buffer:

           bind-key -temacs-copy C-q copy-pipe "cat >/tmp/out"
--------------------

It looks like copy-pype is meant to be used in part to pipe the selection
to another command. There also seem to be some typos:

* "temacs-copy" ?
* "One command in accepts an argument" ?

Either way, what I would like to do is:

==========
*** Copying: ***
1) Enter copy mode
2) Move to the text I want to copy using Emacs navigation commands (i.e.
C-space to set mark, C-f,C-b, M-f, M-b, C-a, C-e to move the cursor). No
prefix for any of these.
3) Copy the selected text into the clipboard with: M-w (no prefix)

*** Pasting: ***
1) Just type C-y (without having to enter coyp mode) to paste (no prefix
either)

==========

How can I use copy-pipe for this purpose??

I have tried the following for copying without luck:
bind-key -n M-w run "tmux save-buffer - | xclip -i -selection clipboard"

However, pasting works great:
bind-key -n C-y run "xclip -o | tmux load-buffer - ; tmux paste-buffer"

The odd thing is that I know that "xclip -i -selection clipboard" works,
since I can copy things to the clipboard using the command line:

echo "Hello world. How are you?" | xclip -i -selection clipboard

With all this, How can i copy a selection from copy mode to the clipboard?
 Note again that I am using the latest version of tmux (from the git repo)
and of xclip on Linux.

Thanks,

James


On Thu, Mar 14, 2013 at 1:48 PM, Nicholas Marriott <
nicholas.marri...@gmail.com> wrote:

> It is the same as using xclip but you use it from copy mode rather than
> needing to copy first and use the prefix, look at the example in the man
> page for how to bind it.
>
>
>
> On Thu, Mar 14, 2013 at 01:06:25PM -0400, James Jong wrote:
> >    Thanks Nicholas. I just built the latest tmux from git*
> >    >git describe
> >    1.7-227-g919bde7
> >    How do bind & use the copy-pipe command? Why is that better than using
> >    xclip?
> >    James
> >
> >    On Tue, Mar 12, 2013 at 12:33 PM, Nicholas Marriott
> >    <[1]nicholas.marri...@gmail.com> wrote:
> >
> >      Either run tmux from git and bind the copy-pipe command.
> >
> >      Or use xterm and it should happen automatically.
> >
> >      On Tue, Mar 12, 2013 at 12:13:26PM -0400, James Jong wrote:
> >      > * *I am running latest version of tmux (1.7) and xclip (0.12)
> >      installed in
> >      > * *the system. I would like to define Emacs-like keyboard
> bindings in
> >      my
> >      > * *`.tmux.conf` to be able to copy (M-w) and paste (C-y) from/to
> the
> >      copy
> >      > * *buffer to the clipboard.
> >      > * *I found some code [1] for copying the entire buffer to the
> >      clipboard (and
> >      > * *viceversa), but I can't figure out how to modify it to make the
> >      solution
> >      > * *proposed in the most voted answer to copy and paste a
> selection:
> >      > * ** * # Copy *X clipboard into tmux paste buffer
> >      > * ** * bind C-y run "tmux set-buffer \"$(xclip -o)\"; tmux
> >      paste-buffer"
> >      > * ** **
> >      > * ** * # Copy tmux buffer into x clipboard
> >      > * ** * bind M-w run "tmux save-buffer - | xclip -i"
> >      > * ** [1]:
> >      > *
> >      *[1][2]
> http://unix.stackexchange.com/questions/15715/getting-tmux-to-copy-a-buffer-to-the-clipboard
> >      > * *Any ideas? What is the best way to approach this?
> >      > * *James
> >      >
> >      > References
> >      >
> >      > * *Visible links
> >      > * *1.
> >      [3]
> http://unix.stackexchange.com/questions/15715/getting-tmux-to-copy-a-buffer-to-the-clipboard
> >      >
> >
>  
> ------------------------------------------------------------------------------
> >      > Symantec Endpoint Protection 12 positioned as A LEADER in The
> >      Forrester
> >      > Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice"
> in
> >      the
> >      > endpoint security space. For insight on selecting the right
> partner to
> >      > tackle endpoint security challenges, access the full report.
> >      > [4]http://p.sf.net/sfu/symantec-dev2dev
> >
> >      > _______________________________________________
> >      > tmux-users mailing list
> >      > [5]tmux-users@lists.sourceforge.net
> >      > [6]https://lists.sourceforge.net/lists/listinfo/tmux-users
> >
> > References
> >
> >    Visible links
> >    1. mailto:nicholas.marri...@gmail.com
> >    2.
> http://unix.stackexchange.com/questions/15715/getting-tmux-to-copy-a-buffer-to-the-clipboard
> >    3.
> http://unix.stackexchange.com/questions/15715/getting-tmux-to-copy-a-buffer-to-the-clipboard
> >    4. http://p.sf.net/sfu/symantec-dev2dev
> >    5. mailto:tmux-users@lists.sourceforge.net
> >    6. https://lists.sourceforge.net/lists/listinfo/tmux-users
>
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users

Reply via email to