On Fri, Feb 12, 2021 at 10:09 PM Pavel Tavoda <[email protected]> wrote:
>
> Maybe it was discussed before but it will be very helpful to get IDE like 
> experience with VIM if we can have more buffers in one window and they will 
> be visible like small 'subtabs' on window border.
> I know that VIM is not IDE but today thanks to LSP allow us to make one very 
> easy. Modern IDEs have 'fixed' window layout. Only difference that they allow 
> to attach more windows to same visual place and allow to switch between them. 
> It will be very useful if VIM can support this.
> Today is very difficult to manage all plugins and windows which can be open 
> around my code, they stack from top, bottom and it's difficult to always 
> rearrange them useful way. Every plugin want his own window.
> Maybe we can have only something like preferred window and when buffer is 
> activated it will be shown in this window not in active (focused) window.
>
> Best regards
>
> /Pavel

First, a little reminder of the vocabulary used by Vim.

Vim terminology is a little different than the OS terminology:

(OS) the gvim window, or the terminal window where Vim is run
= (Vim) the Vim screen. You can have more than one Vim screen but only
by running more than one instance of Vim in parallel. In that case you
SHOULD NOT modify a single file in more than one Vim instance: if you
do, you risk that one instance might overwrite what the other did.

(Vim) a window = part of the Vim screen; a viewport on one buffer.
There can be any number of windows in the screen (up to the available
screen space) and it is possible to have more than one window to the
same buffer, possibly with different window-local options (e.g.
'rightleft' in one window and 'norightleft' in another one, both
displaying one buffer containing both Hebrew and Latin text).
Different windows on a single buffer may, but ned not, display
different parts of the buffer.

(Vim) a buffer = a file being edited, and the metadata about it, e.g.
the buffer-local options such as 'filetype' and 'syntax'. A change to
a buffer's text or to its buffer-local option settings will apply to
all windows where that buffer is displayed. A single buffer may be
displayed in zero or more windows, not necessarily in the same tab
page.

(Vim 7 or later) a tab page = a set of "windows" (in the Vim sense)
that may be displayed together. Only one tab page at a time is
displayed, the others are reduced to tabs in a tab line near the top
of the "screen" (in the Vim sense). There are a few tab-local options
such as 'cmdheight'.

In all that follows I'll use the above terms with their Vim meanings.


For (split) windows in a single tab page I suggest "Rolodex Vim", as
follows — this works the same way in both Vim and gvim, and even in
Vim 6 (and possibly earlier) where there were no tab pages and no tab
line:

set lines=999 columns=9999  " start maximized
if has('windows')                     " split-windows compiled-in, on any OS
    set winminheight=0 winheight=999 helpheight=999 noequalalways
    set laststatus=2                 " always display status lines for
all split-windows
    map  <F11>   <C-W>w             " go to next window, round-robin,
or to nth window from top
    map! <F11>   <C-O><C-W>w
    map  <S-F11> <C-W>W           " go to previous window,
round-robin, or to nth window from top
    map! <S-F11> <C-O><C-W>W
endif

The above will open the current edit file to maximum height, squashing
all other windows above and below it to just a status line (normally
displaying, among other things, the file name), as in an old-fashioned
Rolodex office directory, where the current file card opens in full
and all others' borders appear as indices above and below it. To move
between windows you can either click a status line or use the mappings
defined above (where F11 may be replaced by some other key not used by
Vim if you have already mapped F11 to something else). Note that F11
and Shift-F11 (above) accept a count when used in Normal mode, but in
that case they both go to the nth window from nop, not the nth next or
nth previous window.

In Vim 7 and later you can also use tab pages (see :help tabpage.txt)
but normally the tabs on top of the Vim screen will only tell you
about the current window in each tab page.

Best regards,
Tony.

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/CAJkCKXt-NOh8eMLtc9CegZZBBXw0pBo8Pi0XWKPQuJtb9iL8bg%40mail.gmail.com.

Raspunde prin e-mail lui