Sponsored Content
Operating Systems Solaris Solaris, vi (not vim), key bindings Post 302402182 by alex.blackbit on Tuesday 9th of March 2010 05:57:53 AM
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.
 

10 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

5. 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

6. 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

7. 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

8. 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

9. 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

10. 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
delch(3NCURSES) 														   delch(3NCURSES)

NAME
delch, wdelch, mvdelch, mvwdelch - delete character under the cursor in a curses window SYNOPSIS
#include <curses.h> int delch(void); int wdelch(WINDOW *win); int mvdelch(int y, int x); int mvwdelch(WINDOW *win, int y, int x); DESCRIPTION
These routines delete the character under the cursor; all characters to the right of the cursor on the same line are moved to the left one position and the last character on the line is filled with a blank. The cursor position does not change (after moving to y, x, if speci- fied). (This does not imply use of the hardware delete character feature.) RETURN VALUE
All routines return the integer ERR upon failure and an OK (SVr4 specifies only "an integer value other than ERR") upon successful comple- tion. Functions with a "mv" prefix first perform a cursor movement using wmove, and return an error if the position is outside the window, or if the window pointer is null. NOTES
Note that delch, mvdelch, and mvwdelch may be macros. PORTABILITY
These functions are described in the XSI Curses standard, Issue 4. The standard specifies that they return ERR on failure, but specifies no error conditions. SEE ALSO
ncurses(3NCURSES) delch(3NCURSES)
All times are GMT -4. The time now is 07:23 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy