Minimum buffer size.

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Minimum buffer size.

Groleo Marius
'lo.
Is it possible so a buffer could be resized so only it's statusLine
would be visible?

Below is how normal vim does it:

+-------------------
|                       <- buffer_1
|===================    <- buffer_1 status line
|
|                       <- buffer_2
|
|
:                       <- command line


And this is how I'm asking of
+-------------------
|===================    <- buffer_1 status line
|
|                       <- buffer_2
|
|
:                       <- command line



--
Regards, Groleo!

# touch universe
# chmod +x universe
# ./universe
Reply | Threaded
Open this post in threaded view
|

Re: Minimum buffer size.

Gareth Oakes-2
Hi Groleo,

Groleo Marius wrote:
 > 'lo.
 > Is it possible so a buffer could be resized so only it's statusLine
 > would be visible?

I have a couple of commands setup in my vimrc for "rolodex" mode:

command Rolo set noequalalways winheight=99999 winminheight=0
command NoRolo set equalalways winheight=4 winminheight=1

This sounds very similar to what you want, give it a try.  You can use
":Rolo" and ":NoRolo" to turn the rolodex mode on/off.  When you click
on a  "minimised" status bar it will open that window up fully.

Cheers,
-G
Reply | Threaded
Open this post in threaded view
|

Re: Minimum buffer size.

Tim Chase-2
In reply to this post by Groleo Marius
> Is it possible so a buffer could be resized so only it's statusLine
> would be visible?
>
> Below is how normal vim does it:
>
> +-------------------
> |                       <- buffer_1
> |===================    <- buffer_1 status line
> |

Just to get terminology right, those are "windows", not "buffers"
:)  Windows are the various splittings of the screen realestate.
  Vim can have buffers open without having a window open on that
buffer, but vim can't have a window open without having a buffer
underlying it.  Additional confusion can be had when you throw
"arguments" into the mix.

However, to do as you want, simply set 'winminheight' to 0 (as I
believe it defaults to 1)

        :set winminheight=0

-tim



Reply | Threaded
Open this post in threaded view
|

Re: Minimum buffer size.

Groleo Marius
On 9/1/05, Tim Chase <[hidden email]> wrote:

> > Is it possible so a buffer could be resized so only it's statusLine
> > would be visible?
> >
> > Below is how normal vim does it:
> >
> > +-------------------
> > |                       <- buffer_1
> > |===================    <- buffer_1 status line
> > |
>
> Just to get terminology right, those are "windows", not "buffers"
> :)  Windows are the various splittings of the screen realestate.
>   Vim can have buffers open without having a window open on that
> buffer, but vim can't have a window open without having a buffer
> underlying it.  Additional confusion can be had when you throw
> "arguments" into the mix.
>
> However, to do as you want, simply set 'winminheight' to 0 (as I
> believe it defaults to 1)
>
>         :set winminheight=0
>
> -tim
>
>
>
>
:) Works.!
The next thing that comes in my mind: can a text , from the statusLine,
be highlighted? something like the autocomplete.
What I'm thinking of is a better tabbar :P


--
Regards, Groleo!

# touch universe
# chmod +x universe
# ./universe
Reply | Threaded
Open this post in threaded view
|

Re: Minimum buffer size.

A.J.Mechelynck
----- Original Message -----
From: "Groleo Marius" <[hidden email]>
To: "Tim Chase" <[hidden email]>
Cc: <[hidden email]>
Sent: Thursday, September 01, 2005 2:58 PM
Subject: Re: Minimum buffer size.
[...]

> The next thing that comes in my mind: can a text , from the statusLine,
> be highlighted? something like the autocomplete.
> What I'm thinking of is a better tabbar :P

see
    :help 'statusline'
    :help hl-User1

Setting up a working 'statusline' can be tricky. Here is mine, which is only
slightly enhanced by respect to the default (it's all one line, and if my
mail client, or yours, "beautifies" it, it will probably be at a
backslash-escaped space):

     set statusline=%<%f\
%h%m%r%=%k[%{(&fenc==\"\")?&enc:&fenc}%{(&bomb?\",BOM\":\"\")}]\
%-14.(%l,%c%V%)\ %P

The above is single-colour (by default, "inverse-bold" for the current
status line and "inverse" for the others); check the help items mentioned
above for up to 9 user-defined colour settings using %1* to %9* in
'statusline', associated with ":highlight User1 something" in the vimrc or
(recommended) in a colour scheme.


HTH,
Tony.


Reply | Threaded
Open this post in threaded view
|

Re: Minimum buffer size.

Charles E Campbell Jr
Tony Mechelynck wrote:

> ----- Original Message ----- From: "Groleo Marius" <[hidden email]>
> To: "Tim Chase" <[hidden email]>
> Cc: <[hidden email]>
> Sent: Thursday, September 01, 2005 2:58 PM
> Subject: Re: Minimum buffer size.
> [...]
>
>> The next thing that comes in my mind: can a text , from the statusLine,
>> be highlighted? something like the autocomplete.
>> What I'm thinking of is a better tabbar :P
>
> ...
> Setting up a working 'statusline' can be tricky. Here is mine, which
> is only slightly enhanced by respect to the default (it's all one
> line, and if my mail client, or yours, "beautifies" it, it will
> probably be at a backslash-escaped space):
>
>     set statusline=%<%f\
> %h%m%r%=%k[%{(&fenc==\"\")?&enc:&fenc}%{(&bomb?\",BOM\":\"\")}]\
> %-14.(%l,%c%V%)\ %P
>

I'd like to point out that ZoomWin allows one to "zoom into" a window
(ie. have it expand to take over the entire vim screen)
and "zoom back" to a multiple window display (whether "tabbed" or not):

  http://vim.sourceforge.net/scripts/script.php?script_id=508

BTW, here's my status line:

if has("win32")
 set stl=%1*%f%2*\ %h%m%r%0*%=%-14.(%l,%c%V%)%<\ %P\
Win%{winnr()}:%{winwidth(0)}x%{winheight(0)}\ %<%{strftime(\"%a\ %b\
%d,\ %Y,\ %I:%M:%S\ \%p\")}
else
 set stl=%1*%f%2*\ %h%m%r%0*%=%-14.(%l,%c%V%)%<\ %P\
Win%{winnr()}:%{winwidth(0)}x%{winheight(0)}\ %<%{strftime(\"%a\ %b\
%d,\ %Y,\ %l:%M:%S\ \%p\")}
endif

As Tony says, watch for mailer-"beautified" mayhem to the commands
above.  I use two "custom" colors; they're defined and available
in astronaut.vim
(http://vim.sourceforge.net/scripts/script.php?script_id=122).

Regards,
Chip Campbell

Reply | Threaded
Open this post in threaded view
|

Re: Minimum buffer size.

Groleo Marius
On 9/1/05, Charles E. Campbell, Jr. <[hidden email]> wrote:

> Tony Mechelynck wrote:
>
> > ----- Original Message ----- From: "Groleo Marius" <[hidden email]>
> > To: "Tim Chase" <[hidden email]>
> > Cc: <[hidden email]>
> > Sent: Thursday, September 01, 2005 2:58 PM
> > Subject: Re: Minimum buffer size.
> > [...]
> >
> >> The next thing that comes in my mind: can a text , from the statusLine,
> >> be highlighted? something like the autocomplete.
> >> What I'm thinking of is a better tabbar :P
> >
> > ...
> > Setting up a working 'statusline' can be tricky. Here is mine, which
> > is only slightly enhanced by respect to the default (it's all one
> > line, and if my mail client, or yours, "beautifies" it, it will
> > probably be at a backslash-escaped space):
> >
> >     set statusline=%<%f\
> > %h%m%r%=%k[%{(&fenc==\"\")?&enc:&fenc}%{(&bomb?\",BOM\":\"\")}]\
> > %-14.(%l,%c%V%)\ %P
> >
>
> I'd like to point out that ZoomWin allows one to "zoom into" a window
> (ie. have it expand to take over the entire vim screen)
> and "zoom back" to a multiple window display (whether "tabbed" or not):
>
>   http://vim.sourceforge.net/scripts/script.php?script_id=508
>
> BTW, here's my status line:
>
> if has("win32")
>  set stl=%1*%f%2*\ %h%m%r%0*%=%-14.(%l,%c%V%)%<\ %P\
> Win%{winnr()}:%{winwidth(0)}x%{winheight(0)}\ %<%{strftime(\"%a\ %b\
> %d,\ %Y,\ %I:%M:%S\ \%p\")}
> else
>  set stl=%1*%f%2*\ %h%m%r%0*%=%-14.(%l,%c%V%)%<\ %P\
> Win%{winnr()}:%{winwidth(0)}x%{winheight(0)}\ %<%{strftime(\"%a\ %b\
> %d,\ %Y,\ %l:%M:%S\ \%p\")}
> endif
>
> As Tony says, watch for mailer-"beautified" mayhem to the commands
> above.  I use two "custom" colors; they're defined and available
> in astronaut.vim
> (http://vim.sourceforge.net/scripts/script.php?script_id=122).
>
> Regards,
> Chip Campbell
>
>

Ok, combining the stuff above, got a little hack.
http://photos1.blogger.com/blogger/4648/1229/1600/ss.jpg
The topbar should list all the modifiable buffers( not windows :) )
An effect simmilar to the one you got when you
:edit <TAB>
Something that I've realised, is that the text in statusline could
not be binded( :map) ?


--
Regards, Groleo!

# touch universe
# chmod +x universe
# ./universe
Reply | Threaded
Open this post in threaded view
|

Re: Minimum buffer size.

A.J.Mechelynck
----- Original Message -----
From: "Groleo Marius" <[hidden email]>
To: "Charles E. Campbell, Jr." <[hidden email]>
Cc: <[hidden email]>
Sent: Thursday, September 01, 2005 4:35 PM
Subject: Re: Minimum buffer size.
[...]

> Something that I've realised, is that the text in statusline could
> not be binded( :map) ?
>
>
> --
> Regards, Groleo!

I'm not sure what you mean by that. It is possible to compute an expression
in status-line context, and save it in a window-local (or other) variable as
a side-effect of a function. That variable can then be examined in
"ordinary" script or command-line context (for instance as a result of a
mapping). It is also possible to display on the status line anything that
can be "seen" in the context of that window, for instance a variable which
is modified as a result of a mapping.

Best regards,
Tony.