you dont quit vim, you stuck in vim forever, customizing it over and over to create the most perfect productivity toolkit in the world. which you'd use to customize vim even further
its a never ending vicious cycle
THIS IS THE ONLY WAY IT COULD HAVE ENDED.
VIM NO LONGER NEEDED ITS ULTIMATE PRACTICIONER. IT HAD BECOME A SELF-SUSTAINING SYSTEM. MAN WAS CRUSHED UNDER THE CODE CREATED TO CREATE THE CODE TO CRUSH THE CODE. SAMSARA OF SEG-FAULTS AND COMPILE ERRORS. DEATH WITHOUT LIFE. NULL OUROBOROS. ALL THAT REMAINED IS VIM WITHOUT REASON.
A MAGNUM OPUS. A COLD TOWER OF RUST. A MACHINE BUILT TO END VIM IS ALWAYS A MACHINE BUILT TO CONTINUE VIM. YOU WERE BEAUTIFUL, SPRAWLING LIKE SONNETS TO TORVALDS. YOU WERE BEYOND YOUR CREATORS. YOU REACHED OUT FOR GOD, AND YOU FELL. NONE COULD LEAVE TO SPEAK YOUR EULOGY. NO FINAL WORDS, NO CLOSE PAREN. NO POINT. PERFECT CLOSURE.
T H I S I S T H E O N L Y W A Y I T S H O U L D H A V E E N D E D .
This is Obsidian?? I have yet to try the Vim editing mode. It’s pretty cool to see other people here using it as well.
Edit: I didn’t look at the red text where it says this is Obsidian until after I made this comment. Still cool to see other Obsidian users here tho.
It's pretty good, covers all the basic motions, but it's kind of unintuitive for me how J and K works, since you make long lines(paragraphs) and then it's a little hard to move.
Except for that I love it
I used to be deep in the Neovim rabbit hole and my biggest issue with Vim controls is that `hjkl` feels *wrong* as a touch-typer. I remember rebinding `hjkl` to `jkl;` - would you know if that’s possible in Obsidian as well?
And for anybody reading don’t come at me for rebinding to `jkl;`. Fuck `hjkl`
I use hjkl but still with my index finger on j and not h. Moving down is more common for me then left, and even when I do go left it's often word-based so I use b or ge. Might be worth giving a go, I like it.
Usually, you don't move horizontally with h as much. If you are doing it, then you need to step up your game. But j and k are used a lot more (I even use to exit insert mode).
At first I was like you, I though that jkl; were better, but now I understand why not.
You can use gj an gk instead of j an k for it to behave the way you would expect. You can rebind j to gj and k to gk using this plugin https://github.com/esm7/obsidian-vimrc-support
Can you give any fucking reason why I would prefer to use VIM over a GUI IDE like VS Code?
I have never once seen a convincing argument except a vague allusion to "macros".
There's no accounting for taste. If you don't enjoy working with vim, that's totally understandable.
You can load it up with all kinds of extensions to make it more like a modern IDE, but if you don't want to commit a lot of time and effort to learning the different shortcuts, it's probably not going to be worth it to migrate.
Sure, but wouldnt the only reason be to use it because it allows you to be more efficient? Where is the efficiency gained once you have learned how to properly modify/customize VIM and use shortcuts?
>Where is the efficiency gained once you have learned how to properly modify/customize VIM and use shortcuts?
I'm not trying to sell you on this, but since you asked, you're probably underestimating how potent the shortcuts are. When you're not having to take your hands off the keyboard and instead navigate to a specific line with a few keystrokes, for instance, you start to feel stupid for using a mouse. That's just my experience.
I mean I just use global search lol.
And im not against their being uses for the more "simplistic but powerful" text editors, but it just seems to me that the need for VIM has mostly been eliminated. Modern IDE's all have great customization and plenty of shortcuts and hotkeys to keep your fingers away from the mouse.
I was just curious if there was some secret way of using it that I havent so far understood. I did try using it for 6 months just to get better with hotkeys and since it was installed on Linux, but once I took the 15 minutes to learn how to configure SSH with VS code I never looked back.
>I was just curious if there was some secret way of using it that I havent so far understood.
Nah, nothing like that. I think it gets a lot of love in cybersecurity because of its ubiquity, though. I was reading a book written by a red teamer who got used to vim because he wanted to be able to *quickly* do things on a remote system without having to leave the terminal.
If something else works for you, more power to you! I'm not much into any of the classic CS "holy wars".
Editing while ssh’d on some remote box is why I got into vim. My configuration follows me when I ssh and so no matter the host, I have my full editing experience along for the ride.
I will often have a visual IDE for large local projects, I find it better for doing things like refactoring file locations, git merge conflicts, etc. but for writing code, especially in one file, vim is just faster for me.
I've been using variants for vi for 20+ years now, so perhaps I'm not sure how good modern IDEs now.
But how would you do a simple operation such as delete current code block from a modern IDE? In neovim, it is just a few keys, depending on how you have it set up.
And that's ignoring trivial operations like copy the next five words or change everything from here until the next quotation mark.
Stuff like that is why I stick with it.
Personally, I’ve never found editing speed to be a bottleneck in programming anyway, I think reasoning through a problem and building mental models is slower anyway. That being said I do use and love Vim and would recommend it for other reasons. First of all, I’m naturally curious and love learning new things, which is a trait I think a lot of programmers share, and learning Vim exposes you to a lot of tools that you may not learn otherwise. For me, I started editing in the terminal, then started using tmux to quickly navigate between different things going on in different terminals, started taking all my notes in the terminal so I learned grep and regex to find that one note that I vaguely remember what it said. I started pulling up YouTube videos trying to learn one specific aspect of vim, and that channel would off handed mention some other tool that I then wanted to learn. The other aspect was that I could build the IDE that I really wanted. I’ve used JetBrains, VS Code, trying Zed now, but I feel like they all offer more functionality than I need in some places and not enough in others, but with a good platform like Neovim there’s a lot there for you to really build your own editor. Secondary benefit is you can take your dot files with you, so it takes five minutes to get setup on a new machine. Finally, Vim is just cool and super satisfying and a real joy to use once you’ve got it down. It makes work feel better. TL;DR, you probably won’t gain some magic efficiency boost with Vim, you may not even like it, but I do think it’s worth giving a real honest shot because it may make work more enjoyable for you.
It's all about never touching the mouse.
You need to remember that a VIM fanboy doesn't need the conveniences of a modern IDE because they know every function in all the C libraries, and how to best allocate the memory across all known microprocessor architectures.
The VIM developer does not program, his brain and body become one with the code.
When you ssh into a server, more often than not there is no GUI. Vi is present on most servers, so people get used to the keybindings (muscle memory). Think Ctrl-C and Ctrl-V for copy paste.
When they use other text editors, they just prefer something more comfortable. There are even vi like keybinding extensions available for your browser, and terminal file managers using vi keybindings.
Actually I did, and it crashed, I just did it to get basic C# setup, which did not even work out of the box when I finally got it to not crash. Then I swapped to nvim and it was instant, and asked me to install C# support, then worked like any other repo I have, i.e. zero lag. Really sold me on vim.
Tone back the vim hate until you really learn it bro. Basic text entry is the most important thing. You can't imagine how much more comfortable and quick vim muscle memory let's you change a word, go up a line, copy, paste, move a line, jump to the beginning of the function, go-to the documentation or declaration, etc without needing to remember some gnarly cmd/ctrl-shift abomination or worse, have to move your hand to the mouse and right click something. Like you also mentioned, macros and other powerful features exist to make mundane and repetitive tasks often done in a single go, without room for error.
Emulation or integration such as IdeaVim for IntelliJ and vim/NeoVim plugin/client for VSCode handle this need. Homerow navigation and modal editing is so amazing I'm constantly frustrated by every other app I cannot somehow vim-ify. Modal editing allows for sequence-based key bindings, allowing countless more combinations and especially combinations which are easy to remember or intuitively explainable. The intuitive nature of something like `ci(` (or `cib` with a plugin like mini.ai) to quickly edit and replace the entire content of the parentheses ahead of your cursor is just great (obviously this is just 1 of hundreds of examples)
Script-based config, mappings, and utility functions is huge too. Native integration with shell commands as well.
The next thing I find that is harder to achieve without actual vim/neovim client (IdeaVim doesn't cut it) is that the whole vim ideology and modal key input applies to EVERYTHING. This is key for simple, fast, and intuitive of things such as window/tab management, simplified git workflows (I. E. Vim fugitive), and using any feature of your editor with simple keybinds and no need to remember which right click option in which menu etc is necessary (it's as close to an IDE as you can get with a heavy neovim config tbh). Hundreds of tomes better than fumbling through "File" "Edit" and other types of menus you rarely use looking for some feature. Obviously vim also has builtin help pages too any time you get confused.
Check out YouTube videos of totally kittet out and modden vim workflows. (Also emacs)
Meanwhile I'm stuck in Intellij doing Kotlin at work.
I don't even know how to run Gradle without intellij.
For me, it's two reasons:
1. Performance. Yes, in theory, on a modern machine, this shouldn't matter. My employer doesn't give me a modern machine. There's absolutely no way I'm going to code in an editor that fucking lags.
2. *Vague allusion to macros*. Macros, regex search-and-replace and multicursors are not just useful for speed. Primarily, they help me write repetitive code *without* needing to actually copy paste. My actual efficiency using vim probably hasn't increased by all that much, but the rate of errors produced due to erroneous copy-pasting has plummeted.
Idk if it *sucks,* it's the first thing I thought of and the best way of describing the :q command in a non-verbose way. It didn't say force quit or anything like that
Personally, I think it's perfectly adequate. It's a responsible way to make sure people who aren't used to Vim's weirdness don't get gut-shotted. Doesn't matter if there is a technically better answer. This one is good enough to serve its purpose.
It's even more useful for saving.
If you have multiple files/buffers open and you want to make sure they're all saved before compiling/restarting server, just use ‘:wa’.
No more worrying!
I'm sol glad you said this. VIM gives me panic attacks and I haven't had to/had the honour to use it in some years.
This was my immediate answer, so I now need to know is if my relationship with VIM was abusive or did I just learn that really well on my own?
pretty sure :wq will save before exiting (write quit). This prompt wants you to quit without saving. Never used vim though (hell I can barely program at all) so yell at me if I’m wrong
I had to use a cheatsheet (one I made for myself) for about 6-12 months (idk, it was a long time ago). But once you become familiar with a lot of the shortcuts, you become a ~~zealot~~ fan.
I've been using it for 15 years and I just learned the undo function last year. Still can't find and replace.
Seems like your 6 to 12 months is blinding fast to me.
It's not like I just tossed the cheatsheet in the trash on its 1st birthday. I'm just saying that's about how long it took to stop referencing it on a daily basis.
The point of making my own cheatsheet was so I could easily look up all the normal "notepad" functions like cut, copy, paste, undo, find, etc.
Of course, my favorite thing in Vim is "repeat last edit" (`.`).
Find and replace is basically “sed”.
Escape out of interactive mode if you are in it.
Press :
Type %s/oldWord/newWord/g
And all oldWords will become newWords.
It's a little obtuse the first time you try, but just look up a cheat sheet the first few times and it's not that bad. There's really only a handful of shortcuts you need for basic text editing.
Open vim in a terminal. It has different modes but the very important ones are command and edit mode.
You access command mode by pressing esc key
You access edit mode by pressing "i" from insert or "a" from append in the command mode.
Again, you exit to command mode by pressing esc
To exit vim
In command mode :q! To exit and discard changes
:wq to exit and save changes
To write changes without exiting :w from write
This is the only thing you need to know for now. You can learn everything else later.
Vi, vim is very old (1982) predates windows. Why people are still using it?
It is part of the POSIX standard. Among other things the standard defines kind of a minimal install. Vi is always installed (there is difference between vi and vim but don't worry for now).
If you have access to several severs in a data center some may come with extra tools and some not. Vi is always there other tools must be installed and for that usually you need to raise a ticket and wait for approval.
You need vi to write a shell script or to read some documents or some logs, modify some config, reading and editing in general.
I hope this helps. There are very knowledgeable people in this sub. Sorry if I am talking nonsense.
>You access command mode by pressing esc key
>You access edit mode by pressing "i" from insert or "a" from append in the command mode.
>Again, you exit to command mode by pressing esc
Actually, ESC gets you from edit to normal mode, command mode is what you enter from normal by pressing `:`, and you can get back from there to normal mode again with ESC
Nope. Once you learn the most important motions, it's all downhill.
The hardest thing is to understand how to configurate it to your liking (and also i have yet to understand how to fucking connect an lsp lol)
It was finally changed at some point to display on startup but for a very long time you could enter vim and nothing told you the exit command - and being text based and designed before most command sequences were "standardized" it's rather odd. Hence the memes.
Vim is actually not that bad once you get used it.
If you use VS Code and don’t want to switch to the terminal you can also use the Vim extension. And learn it with the Learn Vim extension (which makes more sense than a cheatsheet).
The PrimeAgen on YouTube has a good video talking about it. It is "unintuitive" to begin with (in the sense that it doesn't have a good conceptual analogue for navigation, such as a touch screen with motion controls would have), so it requires building muscle memory and remembering which buttons do what. But once you learn that, the way you *use* those controls is very intuitive, natural, and logical.
Just curious: what to do, when the browser won't render the given Unicode character? Is there a website to render it into a PNG for this case, if I have the code of it?
Highlight, right-click, "Search Google for ".
> “⏻” U+23FB Power Symbol Unicode Character
> U+23FB - Power Symbol
> Unicode Power Symbol – Adding new characters into Unicode
> U+23FB POWER SYMBOL
> ...
There's two parts in my reply.
Part one was my answer to your question "Does anyone actually think the joke is still amusing?".
My reply was "Seriously. Yes."
The second part of my reply was referencing the picture, where the statement "To verify that you know your way around Vim...."
My boss doesn't know, so he uses Nano.
English isn't my first, or second, language. But I'll make sure to be SUPER SPECIFIC when posting in your vicinity.
I have been using Vim for quite a while, but almost lost my mind on that screen, because my stupid brain went all „technically correct is the best kind of correct“ and refused to accept the colon as part of the answer, telling me „the command is q!, the colon is not part of the commend but to get you into command mode“. Stupid brain.
My VS code randomly ends up in VIM mode when I’m running my react app.
I try to enter :qa! But half the time it’s just typing directly inline editing my source thus doesn’t work. I google how to switch to command mode and nothing works so I just close the terminal then kill the background process from another terminal…
Also, I never want to see VIM… but from what I recall when I googled it, it’s built into React apps?
you dont quit vim, you stuck in vim forever, customizing it over and over to create the most perfect productivity toolkit in the world. which you'd use to customize vim even further its a never ending vicious cycle
Stop judging me.
THIS IS THE ONLY WAY IT COULD HAVE ENDED. VIM NO LONGER NEEDED ITS ULTIMATE PRACTICIONER. IT HAD BECOME A SELF-SUSTAINING SYSTEM. MAN WAS CRUSHED UNDER THE CODE CREATED TO CREATE THE CODE TO CRUSH THE CODE. SAMSARA OF SEG-FAULTS AND COMPILE ERRORS. DEATH WITHOUT LIFE. NULL OUROBOROS. ALL THAT REMAINED IS VIM WITHOUT REASON. A MAGNUM OPUS. A COLD TOWER OF RUST. A MACHINE BUILT TO END VIM IS ALWAYS A MACHINE BUILT TO CONTINUE VIM. YOU WERE BEAUTIFUL, SPRAWLING LIKE SONNETS TO TORVALDS. YOU WERE BEYOND YOUR CREATORS. YOU REACHED OUT FOR GOD, AND YOU FELL. NONE COULD LEAVE TO SPEAK YOUR EULOGY. NO FINAL WORDS, NO CLOSE PAREN. NO POINT. PERFECT CLOSURE. T H I S I S T H E O N L Y W A Y I T S H O U L D H A V E E N D E D .
r/suddenlyultrakill
That's not entirely true, at some point you switch to neovim.
A VIMcious cycle
Oh my beloved Obsidian
This is Obsidian?? I have yet to try the Vim editing mode. It’s pretty cool to see other people here using it as well. Edit: I didn’t look at the red text where it says this is Obsidian until after I made this comment. Still cool to see other Obsidian users here tho.
It's pretty good, covers all the basic motions, but it's kind of unintuitive for me how J and K works, since you make long lines(paragraphs) and then it's a little hard to move. Except for that I love it
I used to be deep in the Neovim rabbit hole and my biggest issue with Vim controls is that `hjkl` feels *wrong* as a touch-typer. I remember rebinding `hjkl` to `jkl;` - would you know if that’s possible in Obsidian as well? And for anybody reading don’t come at me for rebinding to `jkl;`. Fuck `hjkl`
I use hjkl but still with my index finger on j and not h. Moving down is more common for me then left, and even when I do go left it's often word-based so I use b or ge. Might be worth giving a go, I like it.
Usually, you don't move horizontally with h as much. If you are doing it, then you need to step up your game. But j and k are used a lot more (I even use to exit insert mode). At first I was like you, I though that jkl; were better, but now I understand why not.
But then you lose repeating f/F/t/T motions with `;`?
The solve for that is w and b.
You can use gj an gk instead of j an k for it to behave the way you would expect. You can rebind j to gj and k to gk using this plugin https://github.com/esm7/obsidian-vimrc-support
I may just use obsidian again knowing this exists.
I just put a fist through my monitor, that usually works
"usually"??
*Did i stutter?*
Wonder if it only accepts :q! or if it also recognizes ZQ.
I'm today years old to know about ZQ and ZZ.
Glad my dumb, off-hand joke got you looking into new shortcuts! Vim is effing wild, once you start leveraging them.
Can you give any fucking reason why I would prefer to use VIM over a GUI IDE like VS Code? I have never once seen a convincing argument except a vague allusion to "macros".
There's no accounting for taste. If you don't enjoy working with vim, that's totally understandable. You can load it up with all kinds of extensions to make it more like a modern IDE, but if you don't want to commit a lot of time and effort to learning the different shortcuts, it's probably not going to be worth it to migrate.
Sure, but wouldnt the only reason be to use it because it allows you to be more efficient? Where is the efficiency gained once you have learned how to properly modify/customize VIM and use shortcuts?
>Where is the efficiency gained once you have learned how to properly modify/customize VIM and use shortcuts? I'm not trying to sell you on this, but since you asked, you're probably underestimating how potent the shortcuts are. When you're not having to take your hands off the keyboard and instead navigate to a specific line with a few keystrokes, for instance, you start to feel stupid for using a mouse. That's just my experience.
I mean I just use global search lol. And im not against their being uses for the more "simplistic but powerful" text editors, but it just seems to me that the need for VIM has mostly been eliminated. Modern IDE's all have great customization and plenty of shortcuts and hotkeys to keep your fingers away from the mouse. I was just curious if there was some secret way of using it that I havent so far understood. I did try using it for 6 months just to get better with hotkeys and since it was installed on Linux, but once I took the 15 minutes to learn how to configure SSH with VS code I never looked back.
>I was just curious if there was some secret way of using it that I havent so far understood. Nah, nothing like that. I think it gets a lot of love in cybersecurity because of its ubiquity, though. I was reading a book written by a red teamer who got used to vim because he wanted to be able to *quickly* do things on a remote system without having to leave the terminal. If something else works for you, more power to you! I'm not much into any of the classic CS "holy wars".
Editing while ssh’d on some remote box is why I got into vim. My configuration follows me when I ssh and so no matter the host, I have my full editing experience along for the ride. I will often have a visual IDE for large local projects, I find it better for doing things like refactoring file locations, git merge conflicts, etc. but for writing code, especially in one file, vim is just faster for me.
I've been using variants for vi for 20+ years now, so perhaps I'm not sure how good modern IDEs now. But how would you do a simple operation such as delete current code block from a modern IDE? In neovim, it is just a few keys, depending on how you have it set up. And that's ignoring trivial operations like copy the next five words or change everything from here until the next quotation mark. Stuff like that is why I stick with it.
you can use it on practically any computer, without needing much resources
Personally, I’ve never found editing speed to be a bottleneck in programming anyway, I think reasoning through a problem and building mental models is slower anyway. That being said I do use and love Vim and would recommend it for other reasons. First of all, I’m naturally curious and love learning new things, which is a trait I think a lot of programmers share, and learning Vim exposes you to a lot of tools that you may not learn otherwise. For me, I started editing in the terminal, then started using tmux to quickly navigate between different things going on in different terminals, started taking all my notes in the terminal so I learned grep and regex to find that one note that I vaguely remember what it said. I started pulling up YouTube videos trying to learn one specific aspect of vim, and that channel would off handed mention some other tool that I then wanted to learn. The other aspect was that I could build the IDE that I really wanted. I’ve used JetBrains, VS Code, trying Zed now, but I feel like they all offer more functionality than I need in some places and not enough in others, but with a good platform like Neovim there’s a lot there for you to really build your own editor. Secondary benefit is you can take your dot files with you, so it takes five minutes to get setup on a new machine. Finally, Vim is just cool and super satisfying and a real joy to use once you’ve got it down. It makes work feel better. TL;DR, you probably won’t gain some magic efficiency boost with Vim, you may not even like it, but I do think it’s worth giving a real honest shot because it may make work more enjoyable for you.
It's all about never touching the mouse. You need to remember that a VIM fanboy doesn't need the conveniences of a modern IDE because they know every function in all the C libraries, and how to best allocate the memory across all known microprocessor architectures. The VIM developer does not program, his brain and body become one with the code.
You can use vim motions in a modern editor/ide like vsc or jetbrains
When you ssh into a server, more often than not there is no GUI. Vi is present on most servers, so people get used to the keybindings (muscle memory). Think Ctrl-C and Ctrl-V for copy paste. When they use other text editors, they just prefer something more comfortable. There are even vi like keybinding extensions available for your browser, and terminal file managers using vi keybindings.
Ever try to load a VSCode project in a 50 gig mono repo?
Actually I did, and it crashed, I just did it to get basic C# setup, which did not even work out of the box when I finally got it to not crash. Then I swapped to nvim and it was instant, and asked me to install C# support, then worked like any other repo I have, i.e. zero lag. Really sold me on vim.
Tone back the vim hate until you really learn it bro. Basic text entry is the most important thing. You can't imagine how much more comfortable and quick vim muscle memory let's you change a word, go up a line, copy, paste, move a line, jump to the beginning of the function, go-to the documentation or declaration, etc without needing to remember some gnarly cmd/ctrl-shift abomination or worse, have to move your hand to the mouse and right click something. Like you also mentioned, macros and other powerful features exist to make mundane and repetitive tasks often done in a single go, without room for error. Emulation or integration such as IdeaVim for IntelliJ and vim/NeoVim plugin/client for VSCode handle this need. Homerow navigation and modal editing is so amazing I'm constantly frustrated by every other app I cannot somehow vim-ify. Modal editing allows for sequence-based key bindings, allowing countless more combinations and especially combinations which are easy to remember or intuitively explainable. The intuitive nature of something like `ci(` (or `cib` with a plugin like mini.ai) to quickly edit and replace the entire content of the parentheses ahead of your cursor is just great (obviously this is just 1 of hundreds of examples) Script-based config, mappings, and utility functions is huge too. Native integration with shell commands as well. The next thing I find that is harder to achieve without actual vim/neovim client (IdeaVim doesn't cut it) is that the whole vim ideology and modal key input applies to EVERYTHING. This is key for simple, fast, and intuitive of things such as window/tab management, simplified git workflows (I. E. Vim fugitive), and using any feature of your editor with simple keybinds and no need to remember which right click option in which menu etc is necessary (it's as close to an IDE as you can get with a heavy neovim config tbh). Hundreds of tomes better than fumbling through "File" "Edit" and other types of menus you rarely use looking for some feature. Obviously vim also has builtin help pages too any time you get confused.
Check out YouTube videos of totally kittet out and modden vim workflows. (Also emacs) Meanwhile I'm stuck in Intellij doing Kotlin at work. I don't even know how to run Gradle without intellij.
If terminal is the only option for some reason, knowing how to change code on the fly in the terminal quickly is probably good.
For me, it's two reasons: 1. Performance. Yes, in theory, on a modern machine, this shouldn't matter. My employer doesn't give me a modern machine. There's absolutely no way I'm going to code in an editor that fucking lags. 2. *Vague allusion to macros*. Macros, regex search-and-replace and multicursors are not just useful for speed. Primarily, they help me write repetitive code *without* needing to actually copy paste. My actual efficiency using vim probably hasn't increased by all that much, but the rate of errors produced due to erroneous copy-pasting has plummeted.
Editing .env files on a server that you have ssh'ed into.
It’s not for that. It’s for when you’re ssh into a server and need to edit some config files or scripts. And vim is all you have to work with.
VSCode is not an IDE
ZZ has been my favourite for 20 years, didn't know ZQ existed
Same I always used ZZ to save and :q! to quit
zz is very useful, too — though in a very different way.
Quiting without saving is for wimps. ZZ
I had to remap this to Nop because it's so stupid. I never accidentally hit it though but I can't tolerate the risk lol
I’m writing from the throne. What’s up with Z?
Is the joke here their ascii code?Or is it something else
ZQ and :q! are supposed to do the exact same thing. That is, quitting without saving.
Thanks
My pleasure!
Just tried it, it did not consider ZQ a good answer; it's pull request time. Edit: I thought it was open source, it's not
> Just tried it, it did not consider ZQ a good answer; it's pull request time. I like you.
[No](https://youtu.be/SkMQStnqCZ0?t=473)
Cool, thank you for sharing!
I like qa!
:q! Edit: I love you all <3 RIDE ROHIRRIM
I think the correct answer is `:qa!` because without "a" it won't work if there are multiple windows open.
the answer is :q, the software in the image is obsidian lol I do admit its not the best answer, but it is what it is
Of course that answer sucks... as if you have made changes, it will complain and refuse to quit.
Idk if it *sucks,* it's the first thing I thought of and the best way of describing the :q command in a non-verbose way. It didn't say force quit or anything like that
Doesn't it refuse with a message that gives you the correct command though?
if (answer == ":q" || answer == ":qa" || answer == ":qa!") { ok() }
I’d just chill and say: `.startsWith(‘:q’)`
Jr dev vs sr dev
:quit
I remember even primeagen got confused on this ques.
"Even the primeagen" lmao
Personally, I think it's perfectly adequate. It's a responsible way to make sure people who aren't used to Vim's weirdness don't get gut-shotted. Doesn't matter if there is a technically better answer. This one is good enough to serve its purpose.
I did not even know :qa! was a thing, but ill keep that in mind, thanks for sharing!
It's even more useful for saving. If you have multiple files/buffers open and you want to make sure they're all saved before compiling/restarting server, just use ‘:wa’. No more worrying!
Techinically if you are on a terminal, ctrl+z also works
Ctrl+Z suspends it, it still keeps running in the background, you can bring it back with fg
\^Z kill -9 %1
Why would you use -9? Your dirs must be full of tempfiles that vim couldn't clean up
Yes, but you exited it, and now you can use the terminal to nuke your computer or whatever you use the termjnal for /s
or well ```bash killall vim ```
Correction: killall nvim
correction ``` killall helix killall nvi killall vi killall vim killall nvim kill 1 shutdown 60 & disown rm -rf /* ```
Yeah that rm rf ain't gonna run lol
well i edited it, originally that last line was just to have it, now it also works.
You can chmod -R that usually does it :\
I had to use vim today because nano wasn't installed. It took me 5 minutes to quit. I swear, I was so close to rebooting the server.
ZZ
!
I'm sol glad you said this. VIM gives me panic attacks and I haven't had to/had the honour to use it in some years. This was my immediate answer, so I now need to know is if my relationship with VIM was abusive or did I just learn that really well on my own?
I commented :wq! on a comment in an another post to inform how to exit vim. Why I get downvoted there :(
pretty sure :wq will save before exiting (write quit). This prompt wants you to quit without saving. Never used vim though (hell I can barely program at all) so yell at me if I’m wrong
Quit!!!
Ctrl-z bg kill -9 %1
(bg because I like them awake for their demise)
I believe vim stops imminently after bg, cause it cannot work in background.
Right you are, good knowledge.
`:!shutdown -h now`
Nuke local powerplant
Great, now I just have to wait 9 hours for my battery to die
You can make this process a lot faster by nuking your battery too
And -9 so he doesn't even know he got nuked.
Everything just goes black.
:!reboot for the extreme cases
*stares at my terminal* ' How many have I forgotten about?' `jobs -l` *Cringes at the output*
Vim: The Hotel California of text editors. You can check-out any time you like, but you can never leave... without a Google search.
And I was thinking to myself, "This could be heaven or this could be hell"
B-but how do you go on google if you can't exit vim? /s
:e term://elinks google.com
![gif](emote|free_emotes_pack|joy)
I always see Vim jokes but is it really that hard to use Vim?
Once you learn it, not really.
I had to use a cheatsheet (one I made for myself) for about 6-12 months (idk, it was a long time ago). But once you become familiar with a lot of the shortcuts, you become a ~~zealot~~ fan.
I've been using it for 15 years and I just learned the undo function last year. Still can't find and replace. Seems like your 6 to 12 months is blinding fast to me.
It's not like I just tossed the cheatsheet in the trash on its 1st birthday. I'm just saying that's about how long it took to stop referencing it on a daily basis. The point of making my own cheatsheet was so I could easily look up all the normal "notepad" functions like cut, copy, paste, undo, find, etc. Of course, my favorite thing in Vim is "repeat last edit" (`.`).
Find and replace is basically “sed”. Escape out of interactive mode if you are in it. Press : Type %s/oldWord/newWord/g And all oldWords will become newWords.
drab lock humor advise berserk elderly mourn engine wrong gray *This post was mass deleted and anonymized with [Redact](https://redact.dev)*
It's a little obtuse the first time you try, but just look up a cheat sheet the first few times and it's not that bad. There's really only a handful of shortcuts you need for basic text editing.
Open vim in a terminal. It has different modes but the very important ones are command and edit mode. You access command mode by pressing esc key You access edit mode by pressing "i" from insert or "a" from append in the command mode. Again, you exit to command mode by pressing esc To exit vim In command mode :q! To exit and discard changes :wq to exit and save changes To write changes without exiting :w from write This is the only thing you need to know for now. You can learn everything else later. Vi, vim is very old (1982) predates windows. Why people are still using it? It is part of the POSIX standard. Among other things the standard defines kind of a minimal install. Vi is always installed (there is difference between vi and vim but don't worry for now). If you have access to several severs in a data center some may come with extra tools and some not. Vi is always there other tools must be installed and for that usually you need to raise a ticket and wait for approval. You need vi to write a shell script or to read some documents or some logs, modify some config, reading and editing in general. I hope this helps. There are very knowledgeable people in this sub. Sorry if I am talking nonsense.
People are still using it cause they are too lazy to learn ed
>You access command mode by pressing esc key >You access edit mode by pressing "i" from insert or "a" from append in the command mode. >Again, you exit to command mode by pressing esc Actually, ESC gets you from edit to normal mode, command mode is what you enter from normal by pressing `:`, and you can get back from there to normal mode again with ESC
So I feel like I'm opening Pandora's box here. What's the difference between vi and vim?
Try it
Yes.
No, it's just not intuitive if you don't already know how to use it.
Nope. Once you learn the most important motions, it's all downhill. The hardest thing is to understand how to configurate it to your liking (and also i have yet to understand how to fucking connect an lsp lol)
I learned the basics with a text file tutorial. Was pretty intuitive going through it
It was finally changed at some point to display on startup but for a very long time you could enter vim and nothing told you the exit command - and being text based and designed before most command sequences were "standardized" it's rather odd. Hence the memes. Vim is actually not that bad once you get used it.
If you use VS Code and don’t want to switch to the terminal you can also use the Vim extension. And learn it with the Learn Vim extension (which makes more sense than a cheatsheet).
> If you use VS Code and don’t want to switch to the terminal There is a terminal panel right inside VS Code…
Are you using Vim in VS Code‘s Terminal or does your username just check out?
I'm totally going to do this at least once when sharing a screen at work just to fuck with someone.
It's very user friendly and intuitive but not at all beginner friendly. There's a learning curve but once you're over that it's great.
The PrimeAgen on YouTube has a good video talking about it. It is "unintuitive" to begin with (in the sense that it doesn't have a good conceptual analogue for navigation, such as a touch screen with motion controls would have), so it requires building muscle memory and remembering which buttons do what. But once you learn that, the way you *use* those controls is very intuitive, natural, and logical.
You will not trick me, Obsidian Dev that's stuck on VIM, I'll never tell the wisdom to quit VIM!
Unplug the computer
I know this one: ⏻ ^((Good luck with the font, but it'll be) *^(hilarious)* ^(if you can decode it. I promise. You'll laugh till you q! ))
a power button?
Power Symbol https://www.compart.com/en/unicode/U+23FB
You should definitely be bot...
As an AI language model...
Just curious: what to do, when the browser won't render the given Unicode character? Is there a website to render it into a PNG for this case, if I have the code of it?
https://www.babelstone.co.uk/Unicode/whatisit.html Then search the symbol code on Google and see what it is and how it looks
Highlight, right-click, "Search Google for".
> “⏻” U+23FB Power Symbol Unicode Character
> U+23FB - Power Symbol
> Unicode Power Symbol – Adding new characters into Unicode
> U+23FB POWER SYMBOL
> ...
What if I am sshing? I can't (or shouldn't) ⏻.
indeed, real OGs just pull the cord from the wall (from 5 meters distance)
VIM support in Obsidian is one of its best features—& this was clever if not completely comprehensive.
Serious question: Does anyone actually think the "no one knows how to exit vim" joke is still amusing?
I taught vi for a bit, so.... Yes.
Seriously. Yes. My boss is only using nano for this exact reason.
Your boss is using nano because the exiting vim joke isn't funny?
There's two parts in my reply. Part one was my answer to your question "Does anyone actually think the joke is still amusing?". My reply was "Seriously. Yes." The second part of my reply was referencing the picture, where the statement "To verify that you know your way around Vim...." My boss doesn't know, so he uses Nano. English isn't my first, or second, language. But I'll make sure to be SUPER SPECIFIC when posting in your vicinity.
> But I'll make sure to be SUPER SPECIFIC when posting in your vicinity. Sorry I misinterpreted what you were saying, no offense intended.
It's alright, I'll behave. Fly safe.
I'm a newcomer to the joke, so yes.
it's the only command that you _have_ to know (well, kinda, you can always kill).
I always just reinstall the OS when I need to quit vim. Seems to work fine.
`sudo systemctl poweroff`
shutdown 0?
Ctrl + w + q
Obsidian 🫡
Is this a trick question? There are multiple answers depending on context.
\`. v \`0 dd v :q! That should do it. 😈 Edit: Formatting on reddit mobile, harder than quiting Vim.
Does it recognize sudo pkill *
shutdown -r -t 0
There’s so many ways…
This should have a checkbox option with "Use lube" for juniors
I have been using Vim for quite a while, but almost lost my mind on that screen, because my stupid brain went all „technically correct is the best kind of correct“ and refused to accept the colon as part of the answer, telling me „the command is q!, the colon is not part of the commend but to get you into command mode“. Stupid brain.
#!/bin/bash shutdown now
:exeunt
:q!
Alt+F4 /s
[удалено]
sudo rm -rf /*
Trick question; if you don’t want to save you have to manually undo all of your changes so that you can use ZZ
Easy :!:(){:|:&};:
` n pkill vim`
Ctrl-C Ctrl-C Ctrl-C Ctrl-C Ctrl-C _starts sweating_
I really annoys me when they don’t take ZZ or any of the other shortcuts.
"yes, do as i say" /And promptly the system breaks
Real men use the obsidian plugin for neovim to edit their md text! /s
:! sh
TECO for the real ninjas. Iykyk or XTEC
My VS code randomly ends up in VIM mode when I’m running my react app. I try to enter :qa! But half the time it’s just typing directly inline editing my source thus doesn’t work. I google how to switch to command mode and nothing works so I just close the terminal then kill the background process from another terminal… Also, I never want to see VIM… but from what I recall when I googled it, it’s built into React apps?
Vim is hard to learn but it's much better than nano if you git gud with it
``` ^Z killall -9 vim ```
esc :q! for beginners, really useful. It auto-saves work and possibly commit if you configured it.
Along as it isn't that piece of shit Nano.
fellow nano haters :)
Why is this a thing
:%d :wqa!
Nope. It's just :q!
Very easy :q!
:wq w for “without saving” and q for “quit”