On Wed, Apr 01, 2015 at 04:01:56PM +1300, Jan Larres wrote:
> On 01/04/15 12:53, Thomas Adam wrote:
> > Renumbering of winlinks only happens when the winlink is
> > killed/destroyed (assuming renumber-windows session option).  The point
> > of 'movew -r' is solely to renumber the winlinks.   You can use it with
> > -t to specify the target, but NOT -s for the source.
> 
> Okay, after some experimenting I finally understood how the -r option works:
> it renumbers the windows in the target session. I think that could use some
> clarification in the man page.

I'm not so sure:  without -t for all commands which don't require it,
assumes so sort of "current" object to operate on, and movew is no
different to that, nor is the use of '-r' along with it.

> >> So is there a way to move a window and renumber the windows in one 
> >> operation,
> >> either with a single command or a mapping?
> >
> > Why do this?  I mean, if you wanted to move the current window to
> > session 3, you can just do:
> >
> > movew -t3:
> >
> > And tmux can figure that out itself.  What you can do is this:
> >
> > movew -t 3:50 \; movew -r -t3
> 
> With a fixed session number this would work, yes. But the idea is that I want
> to be able to press a key, enter the session number, press enter, and have the
> current window move and the windows renumbered automatically in both the
> source and the target session. The only way I can think of to make this work
> is to write a shell script that executes the appropriate commands and pass the
> session number to it with a command-prompt binding. This is certainly
> possible, but it would be much simpler if moving windows respected the
> renumber-windows option.

Hooks support will help with this when it gets finalised.

> By the way, while I'm at it it would be nice if there was an option that
> allows you to move a window inbetween two existing windows instead of just
> saying that the index is in use, like moving tabs works in Vim.

Maybe.

-- Thomas Adam

-- 
"Deep in my heart I wish I was wrong.  But deep in my heart I know I am
not." -- Morrissey ("Girl Least Likely To" -- off of Viva Hate.)

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users

Reply via email to