On 10/10/08 22:05, leandromartinez98 wrote:
>
> I'm using Ubuntu 8.04 and Vim 7.1.138.
>
> I've set in my ~/.vimrc file the following:
>
> set lines=48 columns=80
>
> In order that Gvim opens with that display properties. This works
> fine.
>
> However, now, when I use "vim" from a Terminal (terminal emulator
> for the Gnome desktop, version 2.22.1), and open vim, the display
> shows the file displaced in some strange way, in such a way that
> the line being edited is not the line being displayed.
>
> That means, for example, that if I search a pattern in my file, it
> will apparently move through the file as it is going to the next
> pattern positon, but the actual display of the file is not showing
> the right file position, the cursor standing in places where
> there is nothing written, for instance, or anywhere else.
> It seems that the display and editing buffers
> are not synchronized.
>
> Removing the "set lines..." resolvs the issue, but then gvim opens
> with the standard size (which is less terrible, but I would like that
> to work well).
>
> Does someone observe the same behavior?
>
> Thanks,
> Leandro.
The vimrc is sourced by both gvim and Console Vim; however, not every
console terminal can be resized by the program running in them. In those
which can't, weird things can happen if you try; and even if your
terminal can be resized, I supposed you'll probably prefer to resize it
by methods external to Vim, such as dragging one corner of the xterm,
konsole, gnome-terminal, Terminal.app, cmd.exe or similar window.
Therefore I recommend wrapping that command as follows:
if has('gui_running')
set lines=48 columns=80
endif
in order to only apply the ":set" command when we already know that we
are starting the GUI.
Best regards,
Tony.
--
hundred-and-one symptoms of being an internet addict:
207. You're given your one phone call in prison and you ask for a laptop.
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---