Delete Key Mac Map To Backspace For Vi Editor

The d means, “delete” After typing the d, you need to hit the [enter] key, and when you do so, all lines in the file will be deleted. If you needed to see how to delete all lines in a file using vim, I hope this is helpful.

Active6 years, 4 months ago

I have to work on a really old AIX workstation with vi version 3.10 in it.I have done a little work in vim, but that was much more easy to use than the old vi (atleast untill I get used to the old vi).

Since I have been using the backspace key to erase my previous character for ever since I was born, I would like to have that functionality in vi as well.

I did search for a solution.

I found the following:

  1. :set backspace=2 (:set all does not have a backspace option, nor nocompatible)

  2. stty erase ^? (Didn't work)

  3. In .exrc file in my home directory, I can set up a mapping. ie, map .

However, in the edit mode in vi, pressing backspace actually takes my cursor to one position on the left, but does not remove it.

How do I map a supposedly arrow key to make it perform the function of a backspace?

AIX Version: 55300 something. uname -a gives AIX << hostname >> 3 5

Shashank Singh
Shashank SinghShashank Singh

1 Answer

Try

:map Backspace X

You’ll have to type a Ctrl+V immediately before the Backspace, and so the command will probably look like

:map ^H X

ScottScottEditor
7,5865 gold badges29 silver badges54 bronze badges

Not the answer you're looking for? Browse other questions tagged vi or ask your own question.

Active7 years, 8 months ago

Delete Key Mac Map To Backspace For Vi Editor Cheat

Possible Duplicate:
Forward delete using Apple keyboard

I am using a MacBook Pro running Mac OS X 10.5. I am new to this development environment, and previously worked on Windows.

I am wondering what is the backspace key of Mac (i.e. which is used to delete the character previous to current cursor position in text editor)? Windows keyboard has a dedicated backspace key, but I did not find such a key on my MacBook Pro keyboard.

Thanks in advance.

Community
George2George2
2,11910 gold badges30 silver badges30 bronze badges

marked as duplicate by Arjan, quack quixoteMay 17 '10 at 8:59

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

Delete Key Mac Map To Backspace For Vi Editor Commands

2 Answers

Mac only has a backspace key. It does not have a 'delete' key. (You can however, do FN+Backspace and it will do the same thing as a Delete key on windows.

Mitch DempseyMitch Dempsey
1,0861 gold badge10 silver badges15 bronze badges

The delete button actually acts as backspace. Pressing Fn + Fel will delete the character ahead.

soandos
20.5k28 gold badges95 silver badges132 bronze badges
SergeSerge

Not the answer you're looking for? Browse other questions tagged mackeyboardmacbook or ask your own question.