.vimrc for Solaris 10 and vim 7.2

486 views
Skip to first unread message

Joseph L. Casale

unread,
Jul 3, 2009, 5:01:23 AM7/3/09
to vim...@googlegroups.com
I am trying to write a .vimrc for a few Solaris 10 vm's in ESXi server.
After forcing the terminal to various different attempts I can sort of
get what I want from the vi client's console but as I scroll down, once
I reach the end of the screen only the last line updates or other odd
things happen with the scrolling?

Anyone know what to do?

Thanks!
jlc

Matt Wozniski

unread,
Jul 3, 2009, 4:09:31 PM7/3/09
to vim...@googlegroups.com

With the lack of details, it's really hard to say, but - that sounds
like what would happen if $LINES or $COLUMNS were set incorrectly and
vim wasn't able to ask the terminal what the correct number of lines
and columns are.

~Matt

Joseph L. Casale

unread,
Jul 3, 2009, 6:49:16 PM7/3/09
to vim...@googlegroups.com
>With the lack of details, it's really hard to say, but - that sounds
>like what would happen if $LINES or $COLUMNS were set incorrectly and
>vim wasn't able to ask the terminal what the correct number of lines
>and columns are.

Matt,
Thanks for taking the time to help and I apologize for the lack of details
as I literally just don't know enough about vim to even know what to ask
yet:)

I tried playing with those, but now my problem is that I open a file, I
see it all, but as I move the cursor down, once I hit the bottom, only the
bottom line updates, so the initial page worth of lines remains unchanged
and all the new lines only appear one at a time at the bottom?

My .vimrc currently is very bare as I get it the way I like it, but it looks
like this so far:



if &term != 'xterm'
set term=linux
endif
syntax on

set nocompatible
set hlsearch
"set columns=120
"set lines=80

highlight Normal ctermfg=LightGrey ctermbg=Black
highlight Search ctermfg=0 ctermbg=7 cterm=NONE
highlight Visual cterm=reverse
highlight Cursor ctermfg=Black ctermbg=Green cterm=bold
highlight Special ctermfg=Brown
highlight Comment ctermfg=Blue
highlight StatusLine ctermfg=blue ctermbg=white
highlight Statement ctermfg=Yellow cterm=NONE
highlight Type cterm=NONE


Thanks!
jlc

Matt Wozniski

unread,
Jul 3, 2009, 7:09:56 PM7/3/09
to vim...@googlegroups.com
On Fri, Jul 3, 2009 at 6:49 PM, Joseph L. Casale wrote:
>>With the lack of details, it's really hard to say, but - that sounds
>>like what would happen if $LINES or $COLUMNS were set incorrectly and
>>vim wasn't able to ask the terminal what the correct number of lines
>>and columns are.
>
> Matt,
> Thanks for taking the time to help and I apologize for the lack of details
> as I literally just don't know enough about vim to even know what to ask
> yet:)
>
> I tried playing with those, but now my problem is that I open a file, I
> see it all, but as I move the cursor down, once I hit the bottom, only the
> bottom line updates, so the initial page worth of lines remains unchanged
> and all the new lines only appear one at a time at the bottom?
>
> My .vimrc currently is very bare as I get it the way I like it, but it looks
> like this so far:
>
> if &term != 'xterm'
>  set term=linux
> endif

Well, that is flat out wrong on Solaris. Solaris definitely doesn't
provide any terminals that would qualify as $TERM == 'linux'

> syntax on
>
> set nocompatible

Probably not related to your problem, but 'set nocompatible' should be
the first line in your vimrc. Toggling "compatible" changes a lot of
other options as a side effect, so putting it anywhere other than the
very beginning of your user settings can override things that you set
earlier.

Nothing else in your vimrc looks particularly suspect, though. Do you
see the same problem with

vim -u NONE -N

Are $COLUMNS and $LINES set to the correct numbers? What type of
terminal *are* you running? Do other full-screen curses applications
behave in it?

~Matt

Joseph L. Casale

unread,
Jul 3, 2009, 7:25:59 PM7/3/09
to vim...@googlegroups.com
>Well, that is flat out wrong on Solaris. Solaris definitely doesn't
>provide any terminals that would qualify as $TERM == 'linux'

I know, but it was one that sort of worked the least wrong :)

>Probably not related to your problem, but 'set nocompatible' should be
>the first line in your vimrc. Toggling "compatible" changes a lot of
>other options as a side effect, so putting it anywhere other than the
>very beginning of your user settings can override things that you set
>earlier.

It's up top now.

>Nothing else in your vimrc looks particularly suspect, though. Do you
>see the same problem with
>
> vim -u NONE -N

Yeah, exact scroll issue still.

>Are $COLUMNS and $LINES set to the correct numbers? What type of
>terminal *are* you running? Do other full-screen curses applications
>behave in it?

I don't know what else I could run? It reports vt100 after logging in.
I tried various values and nothing fixed that scroll issue...

Thanks!
jlc

bill lam

unread,
Jul 3, 2009, 7:28:07 PM7/3/09
to vim...@googlegroups.com
> if &term != 'xterm'
> set term=linux
> endif

I guess it would be unusual to assign to term inside vim. Try comment
out these 3 lines.

--
regards,
====================================================
GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3

Joseph L. Casale

unread,
Jul 3, 2009, 7:43:50 PM7/3/09
to vim...@googlegroups.com
>> if &term != 'xterm'
>> set term=linux
>> endif
>
>I guess it would be unusual to assign to term inside vim. Try comment
>out these 3 lines.

Well, no change :(
It opens fine, I get to the bottom, then only the last line updates as I scroll...

Matt Wozniski

unread,
Jul 3, 2009, 8:39:17 PM7/3/09
to vim...@googlegroups.com
On Fri, Jul 3, 2009 at 7:25 PM, Joseph L. Casale wrote:
>>Are $COLUMNS and $LINES set to the correct numbers?  What type of
>>terminal *are* you running?  Do other full-screen curses applications
>>behave in it?
>
> I don't know what else I could run? It reports vt100 after logging in.
> I tried various values and nothing fixed that scroll issue...

Well, check the values that $LINES and $COLUMNS have in a shell, and
make sure that they match the actual number of lines and columns that
the terminal has. You didn't answer the question about other
full-screen curses apps. What's the terminal emulator you're running?
What do you launch to bring it up? What's the name of the
application?

~Matt

Joseph L. Casale

unread,
Jul 4, 2009, 1:52:45 PM7/4/09
to vim...@googlegroups.com
>Well, check the values that $LINES and $COLUMNS have in a shell, and
>make sure that they match the actual number of lines and columns that
>the terminal has.

Ok, its 80x25 which didn’t make a difference with it set.

>You didn't answer the question about other full-screen curses apps.

Ok, I had Blastwave setup so I installed clex, its broken from the
console as well! Works fine from putty...

>What's the terminal emulator you're running?
> What do you launch to bring it up? What's the name of the
>application?

Guide me through this one? When working at the console, I understand
there isn't an emulator used? Maybe I am confused. When ssh'ing in from
a win or linux box, I use putty or console from kde.

I am going to look into what's got clex busted as that should clearly work!

Thanks for everything!
jlc

Joseph L. Casale

unread,
Jul 4, 2009, 1:56:08 PM7/4/09
to vim...@googlegroups.com
>>What's the terminal emulator you're running?
>> What do you launch to bring it up? What's the name of the
>>application?
>
>Guide me through this one? When working at the console, I understand
>there isn't an emulator used? Maybe I am confused. When ssh'ing in from
>a win or linux box, I use putty or console from kde.

Sorry, I was confused:) Its set to VT100 at boot:
root@host:~# export |grep TERM
declare -x TERM="xterm"

Joseph L. Casale

unread,
Jul 4, 2009, 3:06:54 PM7/4/09
to vim...@googlegroups.com
>Its set to VT100 at boot:

Matt,
This finally led me in the right direction. The correct terminal type
that works perfectly was "sun-color". What a learning expedition :)

Thanks for everything!
jlc

Matt Wozniski

unread,
Jul 4, 2009, 4:17:00 PM7/4/09
to vim...@googlegroups.com
On Sat, Jul 4, 2009 at 1:56 PM, Joseph L. Casale wrote:
>>>What's the terminal emulator you're running?
>>> What do you launch to bring it up?  What's the name of the
>>>application?
>>
>>Guide me through this one? When working at the console, I understand
>>there isn't an emulator used? Maybe I am confused. When ssh'ing in from
>>a win or linux box, I use putty or console from kde.

I believe this is the first time you mentioned that you were using the
console, and not a GUI. :) But, that said - note that the console is
still considered a terminal emulator; pretty much anything but a
*real* vt220 teletype is. Many have never seen a non-emulated
terminal except in pictures, myself included.

> Sorry, I was confused:) Its set to VT100 at boot:
> root@host:~# export |grep TERM
> declare -x TERM="xterm"

FWIW, I would never have guessed that "sun-color" was the correct
$TERM setting for a sun console. I've learned something here, too!
:-)

~Matt

Joseph L. Casale

unread,
Jul 4, 2009, 5:19:43 PM7/4/09
to vim...@googlegroups.com
>FWIW, I would never have guessed that "sun-color" was the correct
>$TERM setting for a sun console. I've learned something here, too!
>:-)

LOL, Ok, I deserve that ((partially) (and thanks for not beating on me
to hard)).

I did actually use that one, but I should clarify why *nothing* was working.

When (like someone earlier suggested was "weird") I set the term type in vimrc
it was not doing it right, as I I cycled through many. When changing it at the
system level, it worked. That was my issue, not changing it at the system level
but only in vi!

Thanks everyone for taking the time to guide me through this, I really appreciate
it!
jlc

Tony Mechelynck

unread,
Jul 6, 2009, 9:37:42 PM7/6/09
to vim...@googlegroups.com
On 04/07/09 22:17, Matt Wozniski wrote:
[...]

> I believe this is the first time you mentioned that you were using the
> console, and not a GUI. :) But, that said - note that the console is
> still considered a terminal emulator; pretty much anything but a
> *real* vt220 teletype is. Many have never seen a non-emulated
> terminal except in pictures, myself included.
[...]

What about the console used at boot time to pass parameters to the
kernel? Its only drivers are in ROM, and it's always in QWERTY, which is
annoying if (like mine) your keyboard has its keys labeled differently
(mine is AZERTY but I shudder when thinking of Dvorak). The console used
by Ms-Dos wasn't much emulated except that it usually did have a
software keyboard driver. And then there was the tty35 on the mainframe
of my first job (1970) which was definitely unemulated (and could type
exactly 64 different characters including the space). But I didn't own
it of course, the company did (or was that computer leased? I never knew
the details.).


Best regards,
Tony.
--
A consultant is a person who borrows your watch, tells you what time it
is, pockets the watch, and sends you a bill for it.

Reply all
Reply to author
Forward
0 new messages