On 2 December 2010 18:32, Keyan wrote:
> Hi,
>
> thanks for the fast reply.
>
> acutally i would like to have a margin around the visible text. that is why i 
> set the lines and columns manually. the guifont might also be send to the 
> "wrong" window, as it is also not accepted, when called from the script.
>
> regards,
> keyan
>
> On 1 Dec 2010, at 22:25, Bjorn Winckler wrote:
>
>> I think the problem is that commands that change window related parameters 
>> get sent to the "wrong" window when applied just after toggling full screen 
>> (e.g. upon entering full screen the parameters are applied to the decorated 
>> window).
>>
>> In the meantime, instead of changing lines and rows when toggling full 
>> screen you should perhaps use the 'fuopt' option (which lets you maximize 
>> the rows and/or columns in full screen). That way you don't have to fiddle 
>> with the window position either since it will be restored when you exit full 
>> screen.
>>
>> I'll have to take a look at this when I get a chance (which won't be for a 
>> couple of weeks at least I'm afraid).
>>
>> Björn
>>
>> On Dec 1, 2010, at 1:52 PM, "key....@googlemail.com" 
>> <key....@googlemail.com> wrote:
>>
>>> Hi,
>>>
>>> for some tasks i like to have a fullscreen app, with a small view on
>>> the file, for others non-fullscreen-mode.
>>>
>>> for this purpose i tried to write two functions
>>>
>>> function! NoFullscreenMode()
>>> set nofullscreen
>>> set guifont=Menlo:h15
>>> set lines=1000
>>> set columns=1000
>>> winpos 4 875
>>> endfunction
>>>
>>> function! FullscreenMode()
>>> set fullscreen
>>> set guifont=Menlo:h20
>>> set lines=30
>>> set columns=80
>>> endfunction
>>>
>>> i have two problems:
>>>
>>> 1. in the NoFullscreenMode(), the winpos is not accepted. but after
>>> executing the script, i can use it in command mode
>>> 2. in the FullScreenMode(), the lines and columns are not accepted. i
>>> tried to position them before the "set fullscreen", but that did not
>>> help.

I had a quick look at this and I don't see any problems as long as I
make sure 'fuopt' is cleared first.  That is I add the line

set fuopt=

to my .gvimrc.  After that your functions work fine, except of course
there seems to be a mistake in NoFullscreenMode() -- if you set lines
and columns to 1000 the window will (at least for me) cover the entire
screen so why would you want to set winpos afterward? (The window will
be only partially visible.)

If I set lines & columns to something that is smaller the winpos
command works fine, but I do notice that winpos will do nothing if the
lines & columns are larger than what will fit on screen.  I guess this
is a bug but is it worth fixing?

Björn

-- 
You received this message from the "vim_mac" 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

Reply via email to