Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to exit from "vim -y" in console?

Tags:

Accidentally I typed vim -y install python-requests instead of yum ... and I do not know how to exit from vim now. Standard option with shift + : + q! does not work. Are there any options how to exit from vim without killing it?

like image 204
rdo Avatar asked Dec 12 '14 08:12

rdo


People also ask

How do I get out of vim easy mode?

Easy by default Now when you open vim just like that, it will already be in easy mode. And what's even better, is that we can get out of it easily using Ctrl + q .

How do I exit Vim in cloud shell?

These are the following: Esc + :x + Enter (Save and exit) Esc + :qa + Enter (Quit all open files) Esc + Shift ZZ (Save and exit)

What is Vim easy?

Easy mode is actually a collection of various Vim options that tell Vim to act like any standard text editor. Instead of using y to “yank” (copy) text, and then pasting text using p or P in normal mode, Vim's easy mode lets you use the standard Ctrl-c to copy text and Ctrl-v to paste text.


2 Answers

With -y (easy mode), Vim defaults to insert mode, and you cannot permanently exit to normal mode via <Esc>. However, like in default Vim, you can issue a single normal mode command via <C-O>. So to exit, type <C-O>:q!<CR>.

Alternatively, there's a special <C-L> mapping for easy mode that returns to normal mode.

like image 108
Ingo Karkat Avatar answered Sep 21 '22 11:09

Ingo Karkat


-y option makes vim start in easy mode, you can type CTRL-L to return to normal mode and then type :q! to exit.

like image 30
dotslashlu Avatar answered Sep 23 '22 11:09

dotslashlu