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.
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:
:set backspace=2
(:set all does not have a backspace option, nor nocompatible)stty erase ^?
(Didn't work)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
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
Not the answer you're looking for? Browse other questions tagged vi or ask your own question.
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.
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 DempseyThe delete button actually acts as backspace. Pressing Fn + Fel will delete the character ahead.
soandos