Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
bug on vim display when lines and columns are set
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  6 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
leandromartinez98  
View profile  
 More options Oct 10 2008, 4:05 pm
From: leandromartinez98 <leandromartine...@gmail.com>
Date: Fri, 10 Oct 2008 13:05:22 -0700 (PDT)
Local: Fri, Oct 10 2008 4:05 pm
Subject: bug on vim display when lines and columns are set

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.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tony Mechelynck  
View profile  
 More options Oct 10 2008, 8:00 pm
From: Tony Mechelynck <antoine.mechely...@gmail.com>
Date: Sat, 11 Oct 2008 02:00:35 +0200
Local: Fri, Oct 10 2008 8:00 pm
Subject: Re: bug on vim display when lines and columns are set
On 10/10/08 22:05, leandromartinez98 wrote:

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.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
leandromartinez98  
View profile  
 More options Oct 13 2008, 10:36 am
From: leandromartinez98 <leandromartine...@gmail.com>
Date: Mon, 13 Oct 2008 07:36:25 -0700 (PDT)
Local: Mon, Oct 13 2008 10:36 am
Subject: Re: bug on vim display when lines and columns are set

Hi Tony,

Thank you very much for your answer, the conditional setting of the
lines totally solves the issue.

I was aware of Vim reading the .vimrc file and I never expected Vim to
resize
my terminal window because of those options. I was expecting, on the
other
side, that that line was considered only in the GUI case. The fact
that those
lines are read and cause a weird behaviour should be avoided, since
weird
behaviours are always undesirable. But, anyway,
since that simple solution is available, this is not a great issue.

Thanks again,
Leandro.

On Oct 10, 9:00 pm, Tony Mechelynck <antoine.mechely...@gmail.com>
wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tony Mechelynck  
View profile  
 More options Oct 13 2008, 10:44 am
From: Tony Mechelynck <antoine.mechely...@gmail.com>
Date: Mon, 13 Oct 2008 16:44:17 +0200
Local: Mon, Oct 13 2008 10:44 am
Subject: Re: bug on vim display when lines and columns are set
On 13/10/08 16:36, leandromartinez98 wrote:

Some terminal emulators can be resized (not that I'd recommend it); if
run in that kind of terminal, Console Vim can resize it.

Best regards,
Tony.
--
Gosh that takes me back... or is it forward?  That's the trouble with
time travel, you never can tell."
                -- Doctor Who "Androids of Tara"


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Matthew Winn  
View profile  
 More options Oct 14 2008, 2:10 pm
From: Matthew Winn <v...@mwinn.powernet.co.uk>
Date: Tue, 14 Oct 2008 19:10:58 +0100
Local: Tues, Oct 14 2008 2:10 pm
Subject: Re: bug on vim display when lines and columns are set
On Mon, 13 Oct 2008 07:36:25 -0700 (PDT), leandromartinez98

<leandromartine...@gmail.com> wrote:
> I was aware of Vim reading the .vimrc file and I never expected Vim to
> resize
> my terminal window because of those options. I was expecting, on the
> other
> side, that that line was considered only in the GUI case. The fact
> that those
> lines are read and cause a weird behaviour should be avoided, since
> weird
> behaviours are always undesirable.

Those options predate the GUI. They come from the original vi, and
were used to allow users to tell vi how large a screen it was running
on. With the introduction of the GUI in Vim it became possible for
setting those options to change the size of the window, but they still
need to be available in the non-GUI environment so people can tell Vim
how much space is available to it. If you set them to values that
don't match the real terminal size there's not much Vim can do about
it except trust that you know what you're doing.

--
Matthew Winn


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Gary Johnson  
View profile  
 More options Oct 14 2008, 3:25 pm
From: Gary Johnson <garyj...@spk.agilent.com>
Date: Tue, 14 Oct 2008 12:25:25 -0700
Local: Tues, Oct 14 2008 3:25 pm
Subject: Re: bug on vim display when lines and columns are set
On 2008-10-14, Matthew Winn <v...@mwinn.powernet.co.uk> wrote:

I discovered when running vim in an xterm under KDE that setting
'lines' and 'columns' resizes the xterm, so these settings are not
just for gvim and for adjusting vim to the size of the terminal.

Regards,
Gary


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google