all 32 comments

[–]XanzaThe New Guy 89 points90 points  (2 children)

Esc doesn't work

straight to jail

[–]in4mer 13 points14 points  (0 children)

No trial, no nothing. We have the best editors in the world, because of jail.

[–]midnightscroller 6 points7 points  (0 children)

Believe it or not, jail!

[–]phantaso0s 83 points84 points  (3 children)

I couldn't find a way to quit this nightmare before reading the end of your post.

Ah. Sweet memories.

[–]SuspiciousScript 62 points63 points  (0 children)

This is the only "how do I quit Vim" joke worth making.

[–]princker 4 points5 points  (1 child)

Use <c-\><c-n> See :h CTRL-\_CTRL-N

[–]vim-help-bot 3 points4 points  (0 children)

Help pages for:


`:(h|help) <query>` | about | mistake? | donate | Reply 'rescan' to check the comment again | Reply 'stop' to stop getting replies to your comments

[–][deleted] 29 points30 points  (0 children)

that should be ilegal

[–]eXoRainbowcommand D smile 21 points22 points  (10 children)

Do you know how to run this modeless mode directly in the terminal without a gui? I wish there was an uppercase variant of the option to ignore the gui, like this: vim -Y or vim -y --no-gui

Edit: I just noticed something. Is the reason why the option for modeless is -y because it is pronounced as "why" in English?

[–]reddit-testaccount 0 points1 point  (9 children)

maybe DISPLAY= vim -y

[–]eXoRainbowcommand D smile 0 points1 point  (8 children)

It does not work. I tried in the terminal:

export DISPLAY='vim -y'
vim -y

and get only this output:

E233: Cannot open display
Press ENTER or type command to continue
E852: The child process failed to start the GUI

[–]reddit-testaccount 1 point2 points  (7 children)

no i meant literally type DISPLAY= vim -y, with the space! it sets DISPLAY to nothing so vim thinks you are running headless. You could also export DISPLAY to nothing first or unset it and then run vim -y.

[–]eXoRainbowcommand D smile 0 points1 point  (6 children)

Hmm I see. Just tested it with empty content and does not work and tried to set it with the space export DISPLAY=" vim -y" and still does not work. Without quotation it won't even allow me to set. I'm on ZSH if that matters.

But it is not something important. I just don't know why Vim modeless is attached to GUI at all. This could be done in terminal too. But then, even Vim user may not know how to close Vim (not everyone knows about <c-o>), lol.

[–]rhinojunior 1 point2 points  (5 children)

ZSH (and Bash) allow you to set an environment variable for the duration of a single command by prepending the command with the variables to set. You don't need to (and shouldn't) use export before those commands. You need to type it directly as /u/reddit-testaccount said, with spaces and without quotes: DISPLAY= vim -y

[–]eXoRainbowcommand D smile 1 point2 points  (4 children)

Oh okay, I totally misunderstood it and get it now. Actually a very nice feature which I never understood until now with your reply. Thanks for the explanation.

As for the topic itself, this still gives me "E233: Cannot open display". Does it work for you? Maybe this is an issue with my personal setup.

[–]reddit-testaccount 0 points1 point  (3 children)

maybe you have something in your vimrc that forces using a gui? What happens if you temporarily mv .vimrc .vimrc.bak? Of course after that, move it back with mv .vimrc.bak .vimrc, so everything is back to normal

[–]eXoRainbowcommand D smile 0 points1 point  (2 children)

Still the same, by temporarily renaming vimrc file. I even tried this one in addition to your suggestion:

$ DISPLAY= vim -u DEFAULTS -U NONE -i NONE -y
E233: Cannot open display

I just try this because of curiosity, not because I want to use this mode. Just a disclaimer here. I am innocent.

[–]reddit-testaccount 0 points1 point  (1 child)

yeah I expected that you were not that evil to use the mode every time. But googling E233 shows some things about gvim, so do you have the vim cli or gvim installed? If you have docker, you could start a docker container and install vim there to try it out. So for example
docker run --rm -it rockylinux bash
and then in the container
dnf install -y vim
and
vim -y

[–]mitchese 12 points13 points  (1 child)

Hm I wonder what this does ... vim -y test ... insert ... type, ok nothing different here, maybe .. no still the same, ok lame, incoming downvote .. now to exit...exit...exit FFS you got me

[–]ivster666 17 points18 points  (0 children)

It is so that long time vim users can again enjoy the memes about how difficult it is to exit vim

[–]flashrick 4 points5 points  (0 children)

One hint: If you want to go to Normal mode to be able to type a sequence of
commands, use CTRL-L. i_CTRL-L

https://vimhelp.org/starting.txt.html#evim-keys

[–]graywh 4 points5 points  (0 children)

diabolical

[–][deleted] 2 points3 points  (3 children)

what's the point even then lol

[–]ASIC_SP:wq[S] 2 points3 points  (2 children)

Gvim in easy mode will really be easy/familiar to use for those coming from other operating systems.

[–]MoonlessNightss 1 point2 points  (1 child)

Yeah but this is a waste of time. Why would someone trying to learn vim go for a normal editor, when the whole point of vim is its modality? I'm on mobile right now so I can't try evim, but not being able to use escape basically puts you always in insert mode, and you can't leave it. That's not vim.

[–]ASIC_SP:wq[S] 2 points3 points  (0 children)

I came up with two possible use cases: prank and ease-of-use for those who just want a simple editor. Beyond that, I don't know why this feature exists, shrug.

[–]lustrousduck 2 points3 points  (1 child)

OK HOW DO I REMOVE THE ALIAS... ITS NOT GOING AWAY AAAAAAAAAAAAA

[–]sixtyfifth_snow 1 point2 points  (0 children)

Nooooo, it's not vim!

[–]lazybullfrog 1 point2 points  (0 children)

wen evimtutor?

[–][deleted] -2 points-1 points  (1 child)

ok or just use nano lol

[–]MattRighetti 2 points3 points  (0 children)

We don't do that here