Solaris, vi (not vim), key bindings


 
Thread Tools Search this Thread
Operating Systems Solaris Solaris, vi (not vim), key bindings
# 1  
Old 03-09-2010
Solaris, vi (not vim), key bindings

hi,

i am facing a problem that (i think) many people had before.
under linux i use vim and therefor i am used to be able to use the cursor, delete and backspace keys in edit mode.
that's not the case in the classic vi, e.g. under solaris. when hitting these keys, uninteded char sequences are produced.
i managed to fix the cursor keys with this:
Code:
$ cat ~/.exrc
:map! ^[OA ^[ka
:map! ^[OB ^[ja
:map! ^[OC ^[la
:map! ^[OD ^[ha
$

^ please note that ^[ must be produced with ctrl-v + ESC.

so far so good, but what i'd like to have too are the delete and backspace keys.
i'd like the same behavior like in vim in the nocompatible mode.
delete should delete the char under the cursor, the cursor shouldn't move.
backspace should delete the char left of the cursor, the cursor moved to the left.

any ideas very welcome.
thanks in advance.
# 2  
Old 03-11-2010
I would think that your issue would be fixed (or close to being fixed) if the TERM is set correctly for whatever you are using to connect to the SUN server.
Normally, I have to type the following for the backspace key to work (even when my TERM is correctly set for vt100). This normally has nothing to do with vi - does this on the command line too.

stty erase ^?

(Note that the ^? is what backspace produces - once the system knows that is what erase should be equal to, it works - I'm using Putty to connect).
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Linux

GNU Screen key bindings....

After I do CTRL-" to show all of my screen sessions, I typically use the up and down arrows to navigate up and down. Suddenly this has changed, and instead only "j" and "k" seem to work for up and down. This has changed in the middle of my screen session. First one changed, and then the... (1 Reply)
Discussion started by: akbar
1 Replies

2. UNIX for Dummies Questions & Answers

Solaris +vi (not vim) not using xterm termcap entry

Well, apparently anyway. I have a Solaris 10/08 install using vi (not vim) and when I use vi to edit a file or go into cron, the screen goes into 25/80 mode and I have to send a reset or hard reset to get it back to my screen size (190x72 in this case). vi should be using the TERM environment... (7 Replies)
Discussion started by: BOFH
7 Replies

3. Solaris

Solaris 8 ssh public key authentication issue - Server refused our key

Hi, I've used the following way to set ssh public key authentication and it is working fine on Solaris 10, RedHat Linux and SuSE Linux servers without any problem. But I got error 'Server refused our key' on Solaris 8 system. Solaris 8 uses SSH2 too. Why? Please help. Thanks. ... (1 Reply)
Discussion started by: aixlover
1 Replies

4. UNIX for Dummies Questions & Answers

xemacs bindings help

Hi all , I would like to have a new binding so that if im having the cursur on a word, one shortcut click (say f3) whould find the next occurrence of the word in the text and so one. what is the right bind for it ? I tried but its wrong. thanks ! Zvika (1 Reply)
Discussion started by: zismad
1 Replies

5. Solaris

Very Importan - Vim Settings - Error while opening a File using vim

I downloaded vim.7.2 and compiled the vim source . Added the vim binary path to PATH (Because iam not the root of the box) when i load the file using vim it throws me an error Error detected while processing /home2/e3003091/.vimrc: line 2: E185: Cannot find color scheme darkblue line... (0 Replies)
Discussion started by: girija
0 Replies

6. UNIX for Dummies Questions & Answers

VIM: Encryption key.

I'm having one doubt about the VIM ENCRYPTION key. I having a text file, I encrypted that file using :X vim -x filename Now, where the encrypted key is stored (path). Whether it stored in a separate file or the text file itself. If I open a the file it asked Encryption key. How it compare... (1 Reply)
Discussion started by: ungalnanban
1 Replies

7. UNIX and Linux Applications

vim in solaris 10

Hi I tried to install vim7.2 in solaris 10 x86 , installation completed but not able to get vim to be use. dependency binary: gtk+ , glib & ncurses install dependency binary package and then install vim7.2. #pkgadd -d vim-7.2-sol10-x86-local $ pkginfo SMCvim application SMCvim vim ... (4 Replies)
Discussion started by: bangbong
4 Replies

8. Solaris

Solaris 10 in vmware : vim hangs

Hello, I downloaded the vmware image of Solaris 10 Update 3 from the Sun site. I have a problem with vim when I edit a file while being connected through SSH to my vm: When I try to edit whatever file with vim, it freezes just after I've hit enter. vim works correctly when I run it in a... (1 Reply)
Discussion started by: Tex-Twil
1 Replies

9. Solaris

Mouse button bindings

Hello, On one of our Solaris machines the user has managed to destroy his mouse key bindings. Usally if he clicks the middle button it presents some applications but now it just minimises the CDE panel to the top. I have compared his /usr/dt/config/C/sys.dtwmrc with another machine that is... (0 Replies)
Discussion started by: Mr Pink
0 Replies

10. Shell Programming and Scripting

key bindings

I'm using AIX 5.2 with ksh, I think it's ksh88 by default, and not ksh93. I would like to enable my arrow keys to ressamble bash behaviour. I don't know to what sequence of characters they're bound now. They do something but it's rather useless behaviour, meaning, unexpected and not very... (1 Reply)
Discussion started by: rein
1 Replies
Login or Register to Ask a Question