SOLARIS vi arrows -> insert and normal mode

Posted on 2013-10-07
Medium Priority
Last Modified: 2013-10-09

Can somebody please provide me a solution to use Solaris vi by using the arrow keys?
I've tried all Google options such as:

set t_ku=[control-v][up-arrow]
set t_kd=[control-v][down-arrow]
set t_kr=[control-v][right-arrow]
set t_kl=[control-v][left-arrow]

And it's not working.

I'd like to use normal arrows into both insert/normal mode.

HUGE Thanks
Question by:g0all
LVL 16

Expert Comment

by:Joseph Gan
ID: 39554472
what is the output of this command:
echo $TERM
LVL 47

Accepted Solution

David earned 1000 total points
ID: 39554486
This is not so much a solaris problem as a standard UNIX thing. You have to tell the O/S what terminal emulator you are using.   If you were using putty, for example, then you need to not only tell putty what terminal you want to emulate, but you need to tell the O/S.

I'll play the odds, and say that you should try entering
TERM=xterm; export TERM
then try vi
LVL 16

Expert Comment

by:Joseph Gan
ID: 39554505
Thats why I want to find out the current terminal setting first...
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.


Author Comment

ID: 39554699
Partially solved.

I've had ddterm.

In normal mode arrows are working. In insert mode, when pressing arrows letters are inserted.
LVL 47

Expert Comment

ID: 39555428
That is how it is supposed to work. When in insert mode do NOT use the arrows.  Insert mode must be off to use arrows.
LVL 29

Expert Comment

ID: 39556258
This will allow to use vi commands on the command line:
export TERM=xterm
set -o vi

Open in new window

LVL 16

Assisted Solution

by:Joseph Gan
Joseph Gan earned 1000 total points
ID: 39556716
You can use "TERM=vt100; export TERM"

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Let's say you need to move the data of a file system from one partition to another. This generally involves dismounting the file system, backing it up to tapes, and restoring it to a new partition. You may also copy the file system from one place to…
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.
Suggested Courses

624 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question