Just hitting the same problem today.
Logged in remotely to a server I need to edit a file on. Starting vi works, loads the file, editing is possible. Unable to leave vi whatsoever. Something looks wrong with the key behaviour. Hitting "ESC" produces a Code:
^[ Code:
: Any inputs on how to deal with that? Workaround How to get out of vi. (Careful, this is forcing something which could leave you with unwanted outcome! I assume no resonsability whatsoever!) Open a second console window. Open a second ssh connection to the affected host your stuck in vi Do the following: First list all processes. Find the affected vi process which should be pretty much at the bottom anyway with: Code:
ps | more Then use: Code:
kill xxxx |
use VIM instead
Hi All,
For the lost beginners that will reach this thread, here's a suggestion. I far prefer vim to vi to edit files. Some are just personal preference, but the winning reason is as follows. Once you have vim installed, there is a guided practice or exercise you could use to learn how to use the editor in cli. In cli (as sudo, if applicable) just type vimtutor and return. This vimtutor will show you the ropes around all of the yank/put (copy/paste) commenting out, searching and all basics controls. |
Quote:
There is enough material available on vi and vim, though. For example this very official-looking https://www.linux.com/learn/vim-101-beginners-guide-vim, or several books (some free), tutorials and other programs directly on the vim site: https://www.vim.org/docs.php. There is even a command named vimtutor. Not sure though if it exists on your distro. |
Quote:
|
Quote:
emacs and joe I never used, so do not know. |
Quote:
Joe:
|
My advice on using vi or emacs is "use nano!" — certainly for the non-professional.
|
you're all aware that the OP is from 2002, right?
|
All times are GMT -5. The time now is 10:41 AM. |