Can't delete in VI
Hi, I'm taking a C programming class in college and we use VI text editor. I installed ubuntu on my computer so I can study. Every time I try to use Vi on my computer I'm able to type and delete using the delete button, but I can't delete using the backspace button. Every time I press it it only moves back on character. How can I solve my problem?
|
Press "I" to enter insert mode then try it. (In Vi)
|
In command mode, backspace does not delete in vi.
There's a nice cheat sheet here: http://www.viemu.com/a_vi_vim_graphi..._tutorial.html I made myself my own cheat sheet based on this book. It's got the best intro to vi that I've ever seen. You are welcome to download my cheat sheet here: |
Thanks but none of the worked. I use Linux in school( through SSH) and I'm able to delete using backspace. I tried the cheat sheet d it didn't work. How can I uninstall VI so I can reinstall it again? maybe that fixes it.
|
Is your computer a laptop? If so, try fn + backspace and see what happens.
Do you know how to use Vi? (not meaning to be rude, but Vi can be confusing) |
In using vi, it's important to be clear whether you are in command mode or text entry mode.
As I have tried to learn vi, that has been the single most difficult thing for me to get the hang of. In my vi in text entry mode, backspace moves the cursor to the left, but does not delete the text as it passes over it. When I start typing from the new position, it replaces the text starting at the new cursor position. In command mode, backspace also moves the cursor but does not delete the text. It does not appear to be able to move the cursor farther than the beginning of that line, again, in command mode. I cannot enter text until I return to text entry mode (ESC text-command). |
Quote:
|
That's not a vi problem, but a terminal one. Which terminal emulator are
you using? |
Quote:
we use putty |
Quote:
After I wrote this, I should have specified that I'm actually using vim ("vi-improved") rather than original vi. I don't know whether it makes a difference, but I was kicking myself for not mentioning it earlier. This Wikipedia article discusses vi and its variants. |
All times are GMT -5. The time now is 03:02 AM. |