LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.

Notices


Reply
  Search this Thread
Old 11-04-2005, 09:39 AM   #1
saudoi
Member
 
Registered: Aug 2004
Location: VietNam
Distribution: Sun Solaris 10
Posts: 117

Rep: Reputation: 15
Vi editor, troubles !!


Hi,

When I use console port to config my server, I have some troubles with Vim editor. For example, the screen wasn't clear when I opened file. It also keep the old characters of the command prompt (like: #bash 3,0 --: .........) and the main content of this file is not shown out :-(. I have to move the cursor to see each line (can you imagine how xxx it is). And another trouble that is I can't use the backspace to delete character before cursor while i'm being in edit mode, I must press ESC and use X to delete, hix

I don't have these troubles when I use RedHat on my PC. What should I do to avoid them?

Thanks.
 
Old 11-04-2005, 10:15 AM   #2
Brian Knoblauch
Member
 
Registered: Jan 2005
Distribution: OpenSuse Tumbleweed
Posts: 288

Rep: Reputation: 39
"Welcome to Solaris"

We only use the console port long enough to get a network connection. Then we ssh in with vt100 emulation to get work done. Console port is not fun to use.
 
Old 11-04-2005, 11:34 AM   #3
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
But vi works fine in the console, as long as you are using the right TERM environment variable, which seems to be the issue here.
 
Old 11-04-2005, 12:08 PM   #4
Brian Knoblauch
Member
 
Registered: Jan 2005
Distribution: OpenSuse Tumbleweed
Posts: 288

Rep: Reputation: 39
Quote:
Originally posted by jlliagre
But vi works fine in the console, as long as you are using the right TERM environment variable, which seems to be the issue here.
That has not been my experience. TERM=vt100 + vt100 emulator results in the same as not doing any config
 
Old 11-04-2005, 02:33 PM   #5
saudoi
Member
 
Registered: Aug 2004
Location: VietNam
Distribution: Sun Solaris 10
Posts: 117

Original Poster
Rep: Reputation: 15
To Brian: thx for ur sharing. However, I can't use telnet or ssh now. I also have question how to active it. *NIX world is not easy...

To jlliagre: which TERM do I should to use?

Thx all.
 
Old 11-05-2005, 04:24 AM   #6
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
Quote:
That has not been my experience. TERM=vt100 + vt100 emulator results in the same as not doing any config
The console is not vt100 compatible, so setting it to vt100 won't help.

Quote:
To jlliagre: which TERM do I should to use?
"sun-color" if running on x86/x64 and "sun" for SPARC based H/W.
If by console you mean the CDE console window, then the correct setting is "dtterm".
 
Old 11-08-2005, 12:36 AM   #7
saudoi
Member
 
Registered: Aug 2004
Location: VietNam
Distribution: Sun Solaris 10
Posts: 117

Original Poster
Rep: Reputation: 15
I'm using VanDyke Software's CRT 4.1. It supports ANSI, Linux, SCO ANSI, VShell, VT100, VT102, VT220, WYSE50, WYSE60, and Xterm terminal emulation. There's no "sun" or "sun-color"
 
Old 11-08-2005, 01:07 AM   #8
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
Okay, so you are complaining about issues when connecting to the Solaris box throuch the serial line ?

Of course in that case you have to set the TERM variable to what you emulator is faking.

If it doesn't works, you'd rather blame that emulator than Solaris, or find out what is going wrong in your process:
TERM not exported, escape sequences in the prompt messing the emulator, ...
 
Old 11-09-2005, 04:37 PM   #9
Blinker_Fluid
Member
 
Registered: Jul 2003
Location: Clinging to my guns and religion.
Posts: 683

Rep: Reputation: 63
Just get used to using vi blind
I usually cat the file out before editing and then use find in vi /or? to locate it and then replace it. Once I get done with the file I cat it out again to make sure it looks right.

As for the backspace in edit mode I think that's a vim feature and not supported with vi.

Like Brian said I use the serial connection long enough to get networking going then use a normal terminal.
 
Old 11-09-2005, 08:30 PM   #10
saudoi
Member
 
Registered: Aug 2004
Location: VietNam
Distribution: Sun Solaris 10
Posts: 117

Original Poster
Rep: Reputation: 15
Yeah, after I actived telnet and ssh, I don't use serial connection anymore. Vim works fine in telnet and ssh modes, but when I insert character (press "i"), it insert new character before the cussor. Can I make it insert after the cursor ?
 
Old 11-10-2005, 01:10 AM   #11
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
You can erase the previous character with backspace when in edit mode under vi, provided these conditions are met:
- these characters were just added in the same insert session
- your emulator is really sending "backspace" when you hit the backspace key.

To check the latter, try erasing with [Ctrl-H] instead of [BackSpace], if only the first one works, blame you emulator, not vi.

"i" is inserting characters before the cursor as designed. If you want to 'insert after', also known as "append", use the "a" command instead of "i".
 
Old 11-10-2005, 04:27 AM   #12
saudoi
Member
 
Registered: Aug 2004
Location: VietNam
Distribution: Sun Solaris 10
Posts: 117

Original Poster
Rep: Reputation: 15
okay, it's clear. Thx so much.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
troubles with SATA, troubles with NVIDIA aevangelica Linux - Hardware 6 10-17-2005 02:39 AM
vi editor IwantLINUX Linux - Newbie 8 06-28-2005 10:28 AM
What editor can be used on RH 9.0 satimis Red Hat 2 06-17-2004 05:36 PM
VI Editor rakriege Linux - General 2 02-04-2004 07:57 PM
Vi Editor BittaBrotha Linux - Software 1 02-09-2003 12:35 PM

LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris

All times are GMT -5. The time now is 02:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration