Re: New feature: bind layout of windows to keys?
WinWalker.vim is also using 'mksession'. You can certainly use it from a regular mapping. The main advantage from using the call supported from within the script is that additional settings useful for WinWalker are saved in a ...x.vim session compliment file (i.e. it saves information about window auto-resizing, placement, and attachments). On 6/9/06, Marc Weber <[EMAIL PROTECTED]> wrote: > >:help tabpage.txt See also :h mksession .. That is was ZoomWin.vim (from Charles E. Campbell) is using.. You can get it on vim.org Marc
Re: New feature: bind layout of windows to keys?
On 6/9/06, Ilya <[EMAIL PROTECTED]> wrote: Eric Arnold wrote: > I found that the contents of a particular ordinal tab number was too > fluid to be of much use to me, so I concentrated on making relative > navigation easier, but I could be alone in that. > > The way it stands, you can make a macro sequence from inside the > script using: > > {m}isc menu -> {ma}cro keys > > ... from key: > ... to keys: :1 tabnext > > using the (":" ex command passthrough). > > SImilarly, outside the script, > > nnoremap :1 tabnext > > accomplishes the same thing. IIUC, gt is the same as after :nnoremap :1 tabnext I don't think so, as "gt" is "move to next tab", whereas "tabnext 1" and "1 tabnext" move to {count} tab number, not "next {count} number of tabs".
Re: New feature: bind layout of windows to keys?
Eric Arnold wrote: I found that the contents of a particular ordinal tab number was too fluid to be of much use to me, so I concentrated on making relative navigation easier, but I could be alone in that. The way it stands, you can make a macro sequence from inside the script using: {m}isc menu -> {ma}cro keys ... from key: ... to keys: :1 tabnext using the (":" ex command passthrough). SImilarly, outside the script, nnoremap :1 tabnext accomplishes the same thing. IIUC, gt is the same as after :nnoremap :1 tabnext
Re: New feature: bind layout of windows to keys?
I found that the contents of a particular ordinal tab number was too fluid to be of much use to me, so I concentrated on making relative navigation easier, but I could be alone in that. The way it stands, you can make a macro sequence from inside the script using: {m}isc menu -> {ma}cro keys ... from key: ... to keys: :1 tabnext using the (":" ex command passthrough). SImilarly, outside the script, nnoremap :1 tabnext accomplishes the same thing. On 6/8/06, Markus Mottl <[EMAIL PROTECTED]> wrote: On 6/8/06, Ilya <[EMAIL PROTECTED]> wrote: > There is tabs in vim 7.0. They are almost exactly what you are talking > about, except that, IIUC, there is no binding to a key. But it is > possible, that some scripts could help. > > :help tabpage.txt Thanks a lot for this hint, this is pretty much what I was looking for. I hadn't installed vim 7.0 yet so I didn't know that this feature is already available. Great stuff! Having some default way to bind tabs to keys (similar to storing buffer positions) would be great, too, but I'm already quite happy with the current feature. Regards, Markus -- Markus Mottlhttp://www.ocaml.info[EMAIL PROTECTED]
Re: New feature: bind layout of windows to keys?
> >:help tabpage.txt See also :h mksession .. That is was ZoomWin.vim (from Charles E. Campbell) is using.. You can get it on vim.org Marc
Re: New feature: bind layout of windows to keys?
On 6/8/06, Ilya <[EMAIL PROTECTED]> wrote: There is tabs in vim 7.0. They are almost exactly what you are talking about, except that, IIUC, there is no binding to a key. But it is possible, that some scripts could help. :help tabpage.txt Thanks a lot for this hint, this is pretty much what I was looking for. I hadn't installed vim 7.0 yet so I didn't know that this feature is already available. Great stuff! Having some default way to bind tabs to keys (similar to storing buffer positions) would be great, too, but I'm already quite happy with the current feature. Regards, Markus -- Markus Mottlhttp://www.ocaml.info[EMAIL PROTECTED]
Re: New feature: bind layout of windows to keys?
I wrote the WinWalker.vim script partly with this sort of thing in mind. Combining window layouts with sessions and macro keys (both supported from inside the plugin), and Vim7 tabs should do what I think you mean. http://vim.sourceforge.net/scripts/script.php?script_id=1522 > On 6/8/06, Markus Mottl <[EMAIL PROTECTED]> wrote: >> Hi, >> >> I'm new to the developer list so I don't know whether this has already >> been discussed here. >> >> One thing I encounter frequently is that I have tons of open buffers, >> especially also from different projects, and I would like to switch >> between sets of windows very quickly. It would be great if Vim had a >> feature that allowed me to bind the current layout of windows (buffers >> contained, positions + dimensions, etc.) to a key. Jumping between >> projects would then be really easy. >> >> One can, of course, use several terminals and start multiple >> Vim-instances in them, but this is inconvenient, because one cannot >> easily share data between them (registers, etc.). >>
Re: New feature: bind layout of windows to keys?
Yakov Lerner wrote: On 6/8/06, Markus Mottl <[EMAIL PROTECTED]> wrote: Hi, I'm new to the developer list so I don't know whether this has already been discussed here. One thing I encounter frequently is that I have tons of open buffers, especially also from different projects, and I would like to switch between sets of windows very quickly. It would be great if Vim had a feature that allowed me to bind the current layout of windows (buffers contained, positions + dimensions, etc.) to a key. Jumping between projects would then be really easy. One can, of course, use several terminals and start multiple Vim-instances in them, but this is inconvenient, because one cannot easily share data between them (registers, etc.). It seems to me that this feature should be fairly easy to implement. Any suggestions on how to approach this problem? Vim has mechanism of mapping keys to user-defined commends/scripts/functions. If you can write vim function(s) that, say, delete current windows and then re-create desirable windows layout (using sequence of vim commands) then it's definitely possible to bind call to such a function to the key. You'll probably need one window-creating function per "project". Only you know your window layout, so only you can write such function. Once you wrote the function, we'll help you to map it to the keys yuo select. I don't think vim is missing any elemental functionality needed for such scripts yuo describe. For more info: :help vim-script-info :help key-mapping Yakov There is a concept of sessions in vim (:help session) - close to what you are describing, but I doubt it is the very best way to work with several project at the same time.
Re: New feature: bind layout of windows to keys?
On 6/8/06, Markus Mottl <[EMAIL PROTECTED]> wrote: Hi, I'm new to the developer list so I don't know whether this has already been discussed here. One thing I encounter frequently is that I have tons of open buffers, especially also from different projects, and I would like to switch between sets of windows very quickly. It would be great if Vim had a feature that allowed me to bind the current layout of windows (buffers contained, positions + dimensions, etc.) to a key. Jumping between projects would then be really easy. One can, of course, use several terminals and start multiple Vim-instances in them, but this is inconvenient, because one cannot easily share data between them (registers, etc.). It seems to me that this feature should be fairly easy to implement. Any suggestions on how to approach this problem? Vim has mechanism of mapping keys to user-defined commends/scripts/functions. If you can write vim function(s) that, say, delete current windows and then re-create desirable windows layout (using sequence of vim commands) then it's definitely possible to bind call to such a function to the key. You'll probably need one window-creating function per "project". Only you know your window layout, so only you can write such function. Once you wrote the function, we'll help you to map it to the keys yuo select. I don't think vim is missing any elemental functionality needed for such scripts yuo describe. For more info: :help vim-script-info :help key-mapping Yakov
Re: New feature: bind layout of windows to keys?
Markus Mottl wrote: Hi, I'm new to the developer list so I don't know whether this has already been discussed here. One thing I encounter frequently is that I have tons of open buffers, especially also from different projects, and I would like to switch between sets of windows very quickly. It would be great if Vim had a feature that allowed me to bind the current layout of windows (buffers contained, positions + dimensions, etc.) to a key. Jumping between projects would then be really easy. One can, of course, use several terminals and start multiple Vim-instances in them, but this is inconvenient, because one cannot easily share data between them (registers, etc.). It seems to me that this feature should be fairly easy to implement. Any suggestions on how to approach this problem? Regards, Markus There is tabs in vim 7.0. They are almost exactly what you are talking about, except that, IIUC, there is no binding to a key. But it is possible, that some scripts could help. :help tabpage.txt