Re: Help with MacVim scripting
- On Jan 23, 8:20 pm, björn <bjorn.winck...@...> wrote:
> On 2 December 2010 18:32, Keyan wrote:hi,
> > 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....@..." <key....@...> 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?
thanks for looking into my scripts. the part with the fuopt= is
with the winpos and the set lines, columns, its like this. in my case,
not the entire screen is filled, but there is a space of some pixels
width and height not covered. because i am a perfectionist, i like to
have the macvim window centered again, when i switch back to non-
fullscreen mode. i tried with lines=47 and colums=159 (are the max
number for my screen), but winpos still didn't work. also for the
fullscreen mode, the lines and colums are not accepted.
the problem is not of high priority, but i thought i tell you about
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