Re: Feature request: fuenter/fuleave autocommands
- On Jun 25, 9:41 pm, alexanderkahn <alexanderk...@...> wrote:
> In :help 'fullscreen' there is this note:There already is a VimResized autocommand. You could use it to call a
> XXX: Add fuenter/fuleave autocommands? You might want to display
> a NERDTree or a Tlist only in fullscreen for example. Then again,
> could probably be in a sizechanged autocommand that triggers if the
> size is above a certain threshold.
> I think that would be an *awesome* feature. I have two widescreen
> displays, so my use case would be to set 'columns' to be very wide
> when using fullscreen mode, but set it back to being normal width when
> leaving fullscreen. Then I could have two vsplits side by side. I
> could also set up this vsplit to be automatically set up based on
> whatever the the buffer being edited in the next tab.
> Sorry that I'm just asking for a feature and don't have the capacity
> to actually write the code myself, but I thought I would just chime in
> and say that thees autocommand hooks would be very useful!
function which would check &lines and/or &columns against your
threshold, then open or close your vertical split-window (your
"sidebar", maybe) accordingly.
But your speaking of "changing 'columns' when entering or leaving
fullscreen mode" makes me doubt. If you mean that Vim should react on
maximizing or un-maximizing the Vim screen by hand, which
automagically changes the 'columns' setting (it does, just try it)
then the above paragraph applies. If you want to have Vim resize
itself when the pixel width of your monitor changes, then I believe
there is no portable "Vim way" to do that. (As shown in Nico's post,
there is a "Mac-specific" way. Beware that 'fuopts' doesn't exist on
"standard" Vim so you shouldn't expect to see it work if you use Vim
on Unix, Linux, Windows, etc. in addition to the Mac.)
BTW, VimResized (like all autocommands) applies to all versions of
Vim, not only the Mac version; people on the vim_use group could have
told you about it. (How to make the OS resize Vim when the screen
pixel size changes _is_ Mac-specific all right.)
Never worry about theory as long as the machinery does what it's
supposed to do.
-- R. A. Heinlein
You received this message from the "vim_mac" maillist.
For more information, visit http://www.vim.org/maillist.php