Thursday, May 9, 2024
Homepage · vi
 Popular · Latest · Hot · Upcoming
49
rated 0 times [  49] [ 0]  / answers: 1 / hits: 202948  / 2 Years ago, tue, december 21, 2021, 9:38:51

I am new to vi, actually I have started learning vi from today and I have got stuck at the behavior of the backspace key.



Actually when I fired up vi on my Ubuntu 12.04 for the first time my backspace key was working normally but after that it has started behaving strangely. Whenever I press the backspace in the insert mode it just moves one place to the left instead of erasing the character.



How can I get back the default backspace functionality? Please note that I don't want to install vim or set nocompatibilty.


More From » vi

 Answers
1

That's correct behavior for vi, and it does erase the character, it just doesn't show it by replacing it with a blank like in vim. It will be apparent when you overwrite the erased character with another character, or switch back to command mode.



E.g. starting with command mode on an empty line, the following will result in the line containing fo:



ifooBackspaceEsc



Before you hit the Esc key, the line will read foo, but the last o has been tagged as an "erase-column". See http://pubs.opengroup.org/onlinepubs/9699919799/utilities/vi.html#tag_20_152_13_88 (mainly point 4 under that heading, and also browse a little further down to read about <Control>-H)


[#31167] Wednesday, December 22, 2021, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
aslity

Total Points: 336
Total Questions: 133
Total Answers: 98

Location: Zimbabwe
Member since Thu, Jul 21, 2022
2 Years ago
;