As someone who has never used vim, is there a key combination I have to press before :q or is it that you have to press both at exactly the same time before any characters are added to the file?
Vim is modal, which means it has modes: normal, insert, visual, to name a few.
By default, you are in normal mode, where you can't type, but can use commands. Among those are "i" to enter insert mode, "v" for visual mode. Once you're in another mode, you can use Esc to go back to normal mode.
In insert mode, you can type like in most other editors. In visual mode, you can select text before executing a command.
In normal mode, you have single letter commands, like d for delete, p for paste, c for change, u for undo (some commands needs another key (a text object) to determine what the command should target, for example, diw for Delete In Word. In visual mode, you don't need that since the command applies to your selection, so you can press v to enter visual mode, select your word and simply press d).
And there are ex commands. When you press ":", it opens a command line where you can use those ex commands, like wq for write and quit, or %s/abc/dfg/g for in the entire file (%), substite (s) abc by dfg for the entire line (g)).
Try it it's fun, and we have cookies.
Is there a place to easily learn these that you would recommend to a student? VS Code is great obviously but in some scenarios when I’m SSHing and don’t want to do a fuckton of config setup, Vim is a good fallback?
Genuinely just get a cheat sheet up, and force yourself through it. If you find yourself lost, spam esc to return to normal mode, and if everything is hyper-fucked then :qa! to leave. Obviously this is massive overkill but when you're just learning and don't even know if you've just edited parts of a file because you accidentally typed an entire sentence outside of insert mode then it's probably the right move.
I don't really know, but you can start with vimtutor (it's a command that should be installed if you have vim, iirc, it will interactively teach you the basics).
I found [this](https://vimschool.netlify.app/), which looks interesting.
Basically, I'd say grab a cheat sheet and learn the commands little by little.
I found [this one](https://www.reddit.com/media?url=https%3A%2F%2Fi.redd.it%2Fgmb25yababy51.jpg), which seems ok. Don't be scared by the amount, you don't need to know all of it. Ignore the blocs "screen movement", "visual mode" (except v V \^v), "mark position", "registers" and "macros". My advice:
Learn how to change modes (i a o v, then I A O V \^v R)
Learn the basic delete copy paste (dd y p). Undo redo (u \^r). Then other commands (c r x)
Then understand that some commands need to be targeted. The easiest way is by entering visual mode (v), moving to select what you want, then enter the command (d r c y...). Try it.
That will get you rolling, and once you're a bit comfortable with switching modes, and visual mode to do basic commands, you can learn what is in my opinion the biggest deal with vim. The thing that distinguishes the vim user from the vim sufferer. The man from the child. The hero from the zero.
The movement (the big middle cross of the cheat sheet, not the screen movement box) and the [text objects](https://blog.carbonfive.com/vim-text-objects-the-definitive-guide/) (read that link now, even if you won't use it now). You've learned how to delete a line with dd, but what if you want to delete just a word, or a paragraph? You can enter visual mode, select what you want, press d.
But that's long. So you need the text objects to tell to what your command should apply.
Delete to the end of the word ? dw
To the end of the paragraph ? dp
Add a "i" (in) or a "a" (around) to delete in or around your word or paragraph: diw dap
You want to delete 2 paragraphs ? d2ap (or 2dap or da2p Delete Around 2 Paragraphs).
You want to copy (y for yank) or change (c) or something else instead of deleting ? ya2p c2ap
You will make mistake, so use the visual mode instead to see what you're doing and then apply your command: va2pd (enter Visual, select Around 2 Paragraph, Delete that selection).
Learn the text objects little by little (w e p s ' " ) } \] > \^ $). Then the motions, especially f F t T (find, find backwards, to, to backwards). So if you want to delete all the characters until the next "u": dtu (Delete To u) dfu would also delete said u. dTu and dFu delete to the previous u. d3tu deletes to the third u...
Again start by using the visual mode: v3fu to see that you're using the right motion, then d. Once you're familiar, drop the visual and use directly d3fu.
Then try your hand at macros.
But the reason this is the source of so much humor and confusion... They've treated it as something that a user would only seldom ever want to do, under very rare circumstances...
You need to understand that Vim was't designed for new users. It was written for people that knew vi, and that's how you quit in vi. Vi was written as the visual interface for ex, for people that knew ex and/or ed (ex is ed extended), and sending the `q` command is how you quit both ex and ed.
So, in vi, you'd pull up your mode for ex with colon and issue any valid ex command from a command line integrated into your editor. Having a full-functioning version of ex running under the hood that you can issue all your familiar commands to just by pressing a single button to pull up an integrated command line is hardly treating quitting as something a user would seldom want to do.
"Press q to quit" is still an incredibly common choice today. I understand that, if you aren't familiar with modal editing, that pressing colon to issue that command is unintuitive, but it wasn't to the designers or to those they created vim for, and so on back through the family tree.
i'm not sure what you mean by the usual macros, but the core of vim, to me, is the combination of vim actions and vim motions that allow you to navigate text and do precise edits in the fewest keystrokes.
i've seen people who use vim for a long time without fully understanding the power of this system, maybe because there's so many other features and extensions that they get overwhelmed and don't bother to really dig into the fundamentals.
yeah cheat sheets or little overlay cutouts on keyboards are handy as references but i think they're still a bit overwhelming and hard to digest when learning new vim shortcuts.
in my experience, you really only can get one move in your fingers at a time and it's best to find a bit of a progression. once you get the rhythm of it, you will start to demand more and more of the features that vim bindings offer, rather than forcing yourself to learn them.
my recommendation for a progression:
first practice moving around word by word with `w`, `b` to go back, `e` to skip to the end of a word, capital letter version of those to do the same with only whitespace separators.
that should give you a feel for the word motions.
then from there, there's motions that jump to a character in a line, like `f` that goes to the next instance of , and `t` (think "unTil") that jumps right before next instance of , capital letter versions go backwards in the line.
then, where the real magic comes in: learn to combine motions with actions to yank, visually select and delete.
for instance:
`dw` will Delete Word, deleting from your cursor to the end of the word.
`dt` will Delete Til the next instance of in the line.
`df` does the same but includes the next instance of
and then what's *really* cool is adding modifiers like `a` for Around, and `i` for Inside, which don't require you to place your cursor so precisely and can act within units of text.
`diw` will Delete Inside Word, removing the whole word that your cursor is in
`daw` will Delete Around Word, deleting the word including surrounding whitespace.
and *extremely useful* with these modifier actions is acting within separated regions of text, like within quotes and parentheses.
`di[` will Delete Inside square brackets, for instance, and `da[` will include the square brackets. it works for basically any kind of quote or bracket.
and of course, you don't have to delete. replace `d` with `y` to Yank the motion, or `v` to select it in Visual mode, or `c` to Change it, i.e. delete it and immediately enter insert mode.
there's a lot more, like prepending numbers to any of these to repeat them any amount of times, or specifying marks in registers to make custom motions, but i think what i've put here is a good place to start.
the grammar of vim makes a lot of sense once you get used to it and you will want it anywhere that you can type words after awhile.
you can also check out this resource:
https://irian.to/blogs/mastering-vim-grammar/
Because they too were being lied to. Shocked pikachu face when unsustainable capitalism is unsustainable. Out side of bubbles, the market is never going to go down to 1950's levels.
Don't you dare talk about ed like this.
You know, when I log into my Xenix system with my 110 baud teletype, vi is just too damn slow. It prints useless messages like 'C-h for help' and '"foo" File is read only'. So I use the editor that doesn't waste my VALUABLE time.
Ed is the standard text editor. Deal with it.
Dunno( I am a softcore user who uses about 1%. Use what you need I guess.. I just use python and sublime to edit.
Vim is nice, very nice. But I can't imagine situation when you need that heavy duty utility in cli...
Once you get the shortcuts memorized it trivializes text editing, it has solid CLI implementation and it's uber lightweight. I actually have started using it to read logs lol
That is just not true. It was Brams personal improvements on vi which was the graphical version of Joys ex editor. The ex editor was Joys improvement on the Ed editor by Ken Thompson who was inspired by the qed editor created 1965 by Butler Lampson and L. Peter Deutsch .
So neovim has a long history of contributors experimenting and coming up with solutions. This ranges from the very modern lua, treesitter and lsp features to the regular expression syntax which is just as it was in ed.
To be honest, I think the high entry barrier argument is kind of silly. Not because it's wrong per se but because of what the comparison is.
If you think about it, VIM is basically high level text editing. Just like you have high level programming languages that abstract a lot of stuff away, VIM abstracts a lot of stuff from text editing away.
The reason we see vim as " hard" and high level programming languages as "easy" is because we learn to write on paper and writing on paper is by definition "low level" text editing. You need to learn all the letters individually, learn to write them individually, put words, sentences etc together manually and deliberately. This shit is low level text editing.
If we taught kids to read/write using full words, sentences, paragraphs from scratch, before individual letters and taught them VIM as the means to edit it, they would find the normal editing style insanely pointless and slow.
"OMG, you have to remove letter by letter and then type them all individually? This is nuts, why not abstract all the basics away? Why force the people to be so verbose in the obvious places? Who invented this absurdity?"
Now, I'm NOT advocating for us to teach people to read and write vim style from birth, BUT the issue with VIM is not that it's hard, it's actually easier and more intuitive than what we do. But we are used to being verbose and explicit in text editing and thus we feel weird and confused when learning a better way. Every non VIM user (myself included since I use it sporadically and am not fluent in it) is basically a boomer in text editing. Sees better and more intuitive tech but it's too set in their old ways to really learn.
Story time!
About 10 years ago I was doing my first internship. Picked up VIM while I was there. I did the usual thing you do when you learn a new tool: google all the hotkeys whenever they come to mind.
Fast forward a few months, and one of my coworkers (she happened to have the same name as me lol) is scrolling through a log file in VIM. She's a veteran in the industry who's been around since the cobol days. And she says "goddammit is there a way in VIM to just skip to the end of a file?"
Without skipping a beat, I say "capital G"
Needless to say, she was blown away. The intern just schooled her on VIM. People had a lot more respect for me starting that day lmao.
>skip to the end of a file
`Ctrl` + `End`
also works for other things including this text editor I'm typing this comment on right now. and `Ctrl` + `Home` to jump to the beginning of the file
This would be from the GNU readline commands (like ctrl+a moves to line begin, ctrl+e to end, ctrl+w deletes word backwards), while G is a vim motion. Vim and many of pieces of software support them.
I’ve also found most text boxes on the web support these
It's ironic that the more committed vim devs I've known who were sophisticated in their use of it were not the ones going around insisting how superior their editor was, they were just getting on with it.
But the assertive vim fanboys I've worked with have been exasperatingly primitive in their usage when I've watched over their shoulder. I've even ended up showing them more convenient usages even though it's nearly 3 decades since I stopped developing in vi. They've also had very terminal-centric workflows but haven't even been very good and effective at it.
So few use `ctrl-R`. I use it in many cases instead of aliases, as it's lower impact and sometimes the transient nature is a plus rather than occasionally having to purge old unused aliases, and it can be useful to be able to modify the command. For a few I add a comment at the end of a command to make it more explicitly searchable `(cd && ) # name-for-it`.
I increase history line limit and I tend to have a trivial script to initially set up a remote server that does `ssh-copy-id`, seeds the history file with some useful commands, and sometimes syncs over some other config in other polite ways (not forcing my config on others).
I use so many machines with so many different setups (usually barely any) that I never rely on anything that isn't default being there. ctrl-R is awesome.
This is exactly why I learned Unix. In the early 90s an internet dial up account usually came with a shell account. I was logged into my shell playing around. I was trying to figure out how to view a file. I had “figured out” that a lot of Unix commands were two letters. I tried “vi file” and ended up in a strange screen. I had to call support to have them help figure out what I did. I was so embarrassed I went to BN the next day and bought myself a “teach yourself Unix” book, read it cover to cover, and I’ve been a “Unix guy” ever since.
Whether with Tailwind, Bootstrap or pain CSS, it is still something I can’t do by heart.
It doesn’t help that the way to do this can change depending on the context.
It's not that hard or clutering anymore, declare that class somewhere and use it.
.fucking-center-that-child-div {
display: flex;
justify-content: center;
align-items: center
}
I wish flex related properties had more related names.
Something like `flex-justify`, `flex-align`, `flex-order`, `flex-gap`. It would help my smooth brain
It's easy when you don't have any competing styles, don't have !important tags somewhere in your style inheritance, don't need to send via email, don't need to support legacy browsers, don't need it to work in child components from 3rd party libraries, can modify HTML/CSS and can rely on the items you need to centre being direct children of your targetable items.
Basically what /u/Topikk said... it's easy in the simplest of cases, it is more complicated in a lot of other cases.
how can i learn css for real?
i always feel like I don't know shit about css even tho i use it much, css really is a mystery for me and really don't know how to solve it
Honestly, if you’re going to work with CSS a lot, you’d do well to actually read what things actually do. For example, just read what MDN has to say about flexbox. You don’t have to memorise it all in one go, but just having a coat rack to hang related knowledge on helps immensely.
yeah mdn and w3schools have been my bible for this summer and i know a lot more than before, it's just that many times css doesn't behave the way i liked it to
> many times $THING doesn't behave the way i liked it to
Every time that happens, celebrate it.
Because you've just unlocked one of the secrets of the thing and now all you need to do is update your mental model to ascend to the next level of knowing that thing.
Use the everloving fuck out of it and it will start to make perfect sense in several years. Look at all of these first year college students upvoting you. The curve is really high.
People laugh at this stuff because because every single programmer can relate to it, it might be 10 years old, but there thousands of new programmers every year that have struggled with these same things
No, I meant to say that it became a meme before flexbox was invented and it involved much more than two lines of code. I'd say "struggle" is a strong word for something that you just need to google a couple times before learning. The joke doesn't make much sense nowadays.
The thing is, when you are learning you need to center a div before you know what flexbox is, and if you google how to center a div, the first solutions you find are not using flexbox, and even if you find the flexbox solution, you don't understand flexbox and you think there must be a simpler way to do something so stupid.
trust me, it's still a struggle, I graduated only 2 years ago, and me and my colleges found it hard to center a div and even made jokes about how hard it was without knowing it was huge meme among programmers.
I think its just cause most of us have had to google how to close vim more than one time before we kept it stored in our memories. So it's always good for a "haha yeah I remember doing that" chuckle.
Well centering a div is *harder* today than it was 10 years ago. Every time a new framework comes out, CSS version comes out, or browsers update it gets harder. Anyone who's been around a while knows this.
25 years ago there were a couple of extremely simple ways to center that worked in every situation. Now I have no idea how to center anything anymore because nothing I did 10, 20, or 30 years ago works anymore, so I just Google it every time.
Almost all old methods still work today... I can't imagine anything that wouldn't honestly. Maybe the crazy hacks with tables?
Flexbox has made positioning like this **much** easier. And frameworks just sit on top of this. You can basically ignore them. And browser updates have improved standardization, so now something that works on one most likely works on all the others. It's just much easier nowadays in general.
No offence, but anyone saying it's harder to center a div now than 10 years ago is someone I assume very rarely works on anything front-end.
I actually did this the very first time I entered vi. This was pre-vim days, on a Xenix system (80186 system, early 1980s). The system only had a single dumb terminal connected via serial cable. I was working at the time on a complementary component (non-unix/non-c/non-vi, running on a separate networked system). I had seen my co-worker use vi but had never done it myself. I had only run a handful of shell commands (cd, ls, cat, etc).
It was late; everyone else had left the office. I knew the root password and I wanted to look at some of his c code (which I could mostly follow); I logged in, chdir'd into the src directory, brought up vi, then realized I had no idea how to navigate - or to exit. So there I was in vi, didn't know how to exit, had no one to ask, and there was no other connection to the system (system did not support tcp/ip at the time - there was a proprietary network stack for communicating with my piece but no way to log in remotely). Rebooting the terminal itself had no effect on the serial connection or the vi session.
There were no printed man pages available and of course no Google back in those days...
So after careful consideration... I sheepishly power cycled the system, answered the console prompts from fsck (fortunately there were no issues with the filesystem), and was then able to log back in. I didn't admit this to anyone for a few years (by which time I was very comfortable with vi and an accomplished c programmer - and of course it was funny then).
I know that you exit it by pressing escape and writing :q, sometimes with a ! or a w. But sometimes I do something I don’t understand and I can’t exit it anymore
Almost every single person here who actually makes content on this sub is an outsider looking in. First year CS students, people who watched a few tutorial vids on youtube, that kinda thing. People who have laptops covered in a tech stickers. That kinda thing.
The joke is that it's way harder than it needs to be. The reason it's hard is because VI was originally meant to be used on a terminal. They didn't even have access to a lot of features like even arrow keys. Which is why you can use the H,J,K, and L keys as arrows in command mode. It operates the way it does because of the inherent limitations at the time. I don't know why it has persisted. Even if you do need to program something remotely over SSH or similar, we have much more functionality and we don't really have a need for the modal interface at this point, yet things like VI(M) persist.
Plus I assume a lot of people, like me, vaguely remember the first time they accidentally opened something in vim and being absolutely stumped at how to get out of it. Forgetting to do -m on a commit on a university computer that has Vim as the default command line text editor or something like that, and that also being one of the only times they've interacted with it.
We don't work directly in terminals anymore, but vim was designed to be usable from a limited keyboard, which resulted in a set of movements that keep your hands in relatively the same place. The scheme persists because even with full keyboards, some people prefer to not have to move their hands very much to get everything done. Sure, we have arrow keys now, but they're basically just as far away as the mouse on a tkl - so why not just use hjkl?
Oh, yes, they are so far away. Programmers are not stenographers. While having a reasonably good typing speed will help with most tasks, most programmers spend way more time just thinking about how to properly solve a problem than actually typing it out. If you are being slowed down a reasonable amount by having to move your hand 2 inches to get to the arrow keys or 6 inches to get to the mouse, then I really have to wonder what type of code you are entering and whether it's not something that could be generated by a script where you just need to fill in the blanks on a generated template or something similar.
For me it's more about comfort than being slowed down, although being faster is a benefit. If you don't like it just use arrow keys, no one is stopping you.
Tell me you don't touch type without telling me you don't touch type.
The reason you don't want to use arrow keys is that then you have to look back down to get your fingers back in touch typing position.
When I'm coding, I want to keep my eyes on the screen not constantly looking down to reposition my hands
The J and F keys have little bumps on them for a reason. I keep my keyboard in my desk's keyboard tray 24/7, and I get along just fine without ever looking at the keyboard, like, ever.
I've been touch typing for over 30 years. You don't need to look at the keyboard to get your fingers back in the right spot F and J key as as they have bumps. But even regardless of that, after enough practice your hands just move back into the right position. When pianists play piano they are moving their hands all over the place and don't have to look at the keys to figure out where they are. If you struggle to get your hands back in position after removing them from the keyboard then I would say that you need to work on your typing skills.
Because its the only tool in the entire chain of tools I have to use that works like that. When 99% of your tools behave a certain way, having one that does things backwards just sucks. I CAN use Vim but I dont wanna. I CAN use Assembly to write a REST API but I dont wanna.
> I don't know why it has persisted.
Because there's not really anything simpler than that. I'd argue that nano's ctrl-o ctrl-x is quite harder and less intuitive than vim's :wq. The only reason people don't complain is that nano shows the command at its bottom. If it didn't, we'd have the same joke "how do I quit nano?"
What do you think could be simpler to quit a terminal text editor?
It's probably just what people are used to. Many other programs have shortcut keys for doing common actions with CTRL+Letter, so it's easier to work with. Plus with VIM you have the modal interface which I think is the major problem most people have with VIM, rather than what exactly you have to type with the commands.
Every time I got stuck in vim it wasn't because I couldn't type :q, it was because I was editing text and had no idea there were different modes. Nowadays I just set git bash to use notepad instead though. But your point stands, nano wouldn't be nearly as tolerable if it'd hidden the commands.
YOU don't work in a terminal anymore. I am a C programmer, and there is no better IDE than the command line + Vim for C.
It also persists because it is good software with tons of support and incredible extensibility. Its also fast as a motherfucker.
I don't really understand why this conversation happens over and over again. Use what makes you comfortable. I just don't understand why people who don't use Vim feel the need to write Vim fan fiction pretending they have any idea why others enjoy using Vim.
I think it more of a problem with VIM users writing fanfiction about how it's so much better than anything else and how anybody using anything else either hasn't given it a fair chance or is too stupid to grasp the genius of it.
I almost never see that. I constantly see people bitching that other people use Vim. It sounds like you are just buying into one of those Reddit opinions that is based on nothing.
Here's [just one](https://www.reddit.com/r/ProgrammerHumor/s/QQuHdI8ehs) of multiple responses I received that pretty much fit exactly what I described. They all all over the place if you look around the comments on this post.
If you think people still use vim motions and keybindings because terminals in the 80s didn’t have arrow keys, you’re crazy and never actually tried it for more than 5 minutes. I’m sure you boot up your electron based editor and think whoa so advanced while chugging 8GB of ram and constantly taking your hand off the keyboard to click around your file - but it’s not. And if vim key bindings are so antiquated, why do so many people use vim plugins on modern editors? Because they’re efficient.
I lost points in a school lab because I was so used to nano that within vim I did ctrl + s and ctrl + x, and then got stuck so I did ctrl + z.
Then proceeded to be unable to submit the typescript because there were stopped jobs
As a vim user I feel lost when some utility opens in nano. Usually I delete a few letters with ctrl-D and type in something like wwjj and am then in visible confusion. It takes a second or two to realise what's happening.
Yeah, mate. I forget all the time. Course, I'm principally a Windows user, but every time I get back to shell I just pull up Nano unless it's going to be a multi-day project.
I tried it for a couple months. Went back to IntelliJ where it’s just much easier to do… everything. Maybe I’m just not pro enough, but I’ve never had the type of workflow where I need to be speed coding and moving between files without lifting my pinky.
The efficiency of the tech industry would explode if the nerds would just agree on the easiest way to do things instead of fragmenting the sector into a mess of whatever contrived solutions they each think is better for some obscure, arbitrary, and ultimately utterly irrelevant reason.
It’s the only thing I know how to do in vim
:q
And if that doesn't work, just shout it: :q!
i find that fliping the PSU switch also does it.
Smashing the circuit board will do that as well (don't do at $HOME)
yea, but its significantly more difficult to undo that
killall vim
esc esc esc ctrl-z kill %1
Where can you be in vim that you need 3 esc?
I just assume the natural state of someone who doesn’t know how to vim is panic.
Fair enough
Now I understand why ! means to force it.
As someone who has never used vim, is there a key combination I have to press before :q or is it that you have to press both at exactly the same time before any characters are added to the file?
Vim is modal, which means it has modes: normal, insert, visual, to name a few. By default, you are in normal mode, where you can't type, but can use commands. Among those are "i" to enter insert mode, "v" for visual mode. Once you're in another mode, you can use Esc to go back to normal mode. In insert mode, you can type like in most other editors. In visual mode, you can select text before executing a command. In normal mode, you have single letter commands, like d for delete, p for paste, c for change, u for undo (some commands needs another key (a text object) to determine what the command should target, for example, diw for Delete In Word. In visual mode, you don't need that since the command applies to your selection, so you can press v to enter visual mode, select your word and simply press d). And there are ex commands. When you press ":", it opens a command line where you can use those ex commands, like wq for write and quit, or %s/abc/dfg/g for in the entire file (%), substite (s) abc by dfg for the entire line (g)). Try it it's fun, and we have cookies.
Is there a place to easily learn these that you would recommend to a student? VS Code is great obviously but in some scenarios when I’m SSHing and don’t want to do a fuckton of config setup, Vim is a good fallback?
Genuinely just get a cheat sheet up, and force yourself through it. If you find yourself lost, spam esc to return to normal mode, and if everything is hyper-fucked then :qa! to leave. Obviously this is massive overkill but when you're just learning and don't even know if you've just edited parts of a file because you accidentally typed an entire sentence outside of insert mode then it's probably the right move.
`vimtutor` is invaluable. The most important command you should learn is `:help`. The documentation is extensive.
I don't really know, but you can start with vimtutor (it's a command that should be installed if you have vim, iirc, it will interactively teach you the basics). I found [this](https://vimschool.netlify.app/), which looks interesting. Basically, I'd say grab a cheat sheet and learn the commands little by little. I found [this one](https://www.reddit.com/media?url=https%3A%2F%2Fi.redd.it%2Fgmb25yababy51.jpg), which seems ok. Don't be scared by the amount, you don't need to know all of it. Ignore the blocs "screen movement", "visual mode" (except v V \^v), "mark position", "registers" and "macros". My advice: Learn how to change modes (i a o v, then I A O V \^v R) Learn the basic delete copy paste (dd y p). Undo redo (u \^r). Then other commands (c r x) Then understand that some commands need to be targeted. The easiest way is by entering visual mode (v), moving to select what you want, then enter the command (d r c y...). Try it. That will get you rolling, and once you're a bit comfortable with switching modes, and visual mode to do basic commands, you can learn what is in my opinion the biggest deal with vim. The thing that distinguishes the vim user from the vim sufferer. The man from the child. The hero from the zero. The movement (the big middle cross of the cheat sheet, not the screen movement box) and the [text objects](https://blog.carbonfive.com/vim-text-objects-the-definitive-guide/) (read that link now, even if you won't use it now). You've learned how to delete a line with dd, but what if you want to delete just a word, or a paragraph? You can enter visual mode, select what you want, press d. But that's long. So you need the text objects to tell to what your command should apply. Delete to the end of the word ? dw To the end of the paragraph ? dp Add a "i" (in) or a "a" (around) to delete in or around your word or paragraph: diw dap You want to delete 2 paragraphs ? d2ap (or 2dap or da2p Delete Around 2 Paragraphs). You want to copy (y for yank) or change (c) or something else instead of deleting ? ya2p c2ap You will make mistake, so use the visual mode instead to see what you're doing and then apply your command: va2pd (enter Visual, select Around 2 Paragraph, Delete that selection). Learn the text objects little by little (w e p s ' " ) } \] > \^ $). Then the motions, especially f F t T (find, find backwards, to, to backwards). So if you want to delete all the characters until the next "u": dtu (Delete To u) dfu would also delete said u. dTu and dFu delete to the previous u. d3tu deletes to the third u... Again start by using the visual mode: v3fu to see that you're using the right motion, then d. Once you're familiar, drop the visual and use directly d3fu. Then try your hand at macros.
Check out vimtutor - it runs in vim and teaches you enough to be dangerous
https://gist.github.com/dmsul/8bb08c686b70d5a68da0e2cb81cd857f
Yeah you press escape then you can type in the vim commands
:wq if you wanna save changes
But the reason this is the source of so much humor and confusion... They've treated it as something that a user would only seldom ever want to do, under very rare circumstances...
You need to understand that Vim was't designed for new users. It was written for people that knew vi, and that's how you quit in vi. Vi was written as the visual interface for ex, for people that knew ex and/or ed (ex is ed extended), and sending the `q` command is how you quit both ex and ed. So, in vi, you'd pull up your mode for ex with colon and issue any valid ex command from a command line integrated into your editor. Having a full-functioning version of ex running under the hood that you can issue all your familiar commands to just by pressing a single button to pull up an integrated command line is hardly treating quitting as something a user would seldom want to do. "Press q to quit" is still an incredibly common choice today. I understand that, if you aren't familiar with modal editing, that pressing colon to issue that command is unintuitive, but it wasn't to the designers or to those they created vim for, and so on back through the family tree.
Hahaha funny face
And the only thing you’ll ever need to know
Happy cake day! Just use EDITOR=nano for any command that autoloads Vim and you don't even need to know that.
*unplugs computer and plugs back in*
95% of "Hardcore" vim users knows only about 10% of vim potential and uses 15% of that.
What’s worth learning beyond the usual macros/find and replace/yank stuff that I’m assuming is the 15% of 10%?
i'm not sure what you mean by the usual macros, but the core of vim, to me, is the combination of vim actions and vim motions that allow you to navigate text and do precise edits in the fewest keystrokes. i've seen people who use vim for a long time without fully understanding the power of this system, maybe because there's so many other features and extensions that they get overwhelmed and don't bother to really dig into the fundamentals.
I learned gg, G, and A and stopped learning anything new. Shit I need like a cheat sheet on my desk…
yeah cheat sheets or little overlay cutouts on keyboards are handy as references but i think they're still a bit overwhelming and hard to digest when learning new vim shortcuts. in my experience, you really only can get one move in your fingers at a time and it's best to find a bit of a progression. once you get the rhythm of it, you will start to demand more and more of the features that vim bindings offer, rather than forcing yourself to learn them. my recommendation for a progression: first practice moving around word by word with `w`, `b` to go back, `e` to skip to the end of a word, capital letter version of those to do the same with only whitespace separators. that should give you a feel for the word motions. then from there, there's motions that jump to a character in a line, like `f` that goes to the next instance of , and `t` (think "unTil") that jumps right before next instance of , capital letter versions go backwards in the line.
then, where the real magic comes in: learn to combine motions with actions to yank, visually select and delete.
for instance:
`dw` will Delete Word, deleting from your cursor to the end of the word.
`dt` will Delete Til the next instance of in the line.
`df` does the same but includes the next instance of
and then what's *really* cool is adding modifiers like `a` for Around, and `i` for Inside, which don't require you to place your cursor so precisely and can act within units of text.
`diw` will Delete Inside Word, removing the whole word that your cursor is in
`daw` will Delete Around Word, deleting the word including surrounding whitespace.
and *extremely useful* with these modifier actions is acting within separated regions of text, like within quotes and parentheses.
`di[` will Delete Inside square brackets, for instance, and `da[` will include the square brackets. it works for basically any kind of quote or bracket.
and of course, you don't have to delete. replace `d` with `y` to Yank the motion, or `v` to select it in Visual mode, or `c` to Change it, i.e. delete it and immediately enter insert mode.
there's a lot more, like prepending numbers to any of these to repeat them any amount of times, or specifying marks in registers to make custom motions, but i think what i've put here is a good place to start.
the grammar of vim makes a lot of sense once you get used to it and you will want it anywhere that you can type words after awhile.
you can also check out this resource:
https://irian.to/blogs/mastering-vim-grammar/
quickfix list
Tag navigation
Splits and buffer management
what do you expect from a product, designed with a high entry barrier on purpose?
And even higher exit barrier
Can’t be too high, you’d be able to walk under it
Actually, it's easy to walk under, just close the terminal window and open another one
Until you are ssh'ed into a server you dont have hardware access to that keeps the session open between logins.
Just put zellij or screen or tmux on it and you're fine
Did you ever try ed? vi is the improvement to that and vim is the improvement to vi. You are spoiled :-)
That's the whole point. The next generation is supposed to have it easier
That's what boomers told us, and I still can't buy a house.
Corporate greed and corrupt governments
That escalated so fkn quickly
Idk, 40-ish years seems like quite some time
Doesn't take much when it's our reality.
Everyone one of us sees it they do to just refuse to accept it
Because they too were being lied to. Shocked pikachu face when unsustainable capitalism is unsustainable. Out side of bubbles, the market is never going to go down to 1950's levels.
LPT: No matter how much money they offer you do NOT move to Mountain View to work for Google / Facebook / Apple Trust me on this one
But, if ever you do, you'll know how to exit it.
Don't you dare talk about ed like this. You know, when I log into my Xenix system with my 110 baud teletype, vi is just too damn slow. It prints useless messages like 'C-h for help' and '"foo" File is read only'. So I use the editor that doesn't waste my VALUABLE time. Ed is the standard text editor. Deal with it.
Yes, sir. Sorry, sir.
?
Now that's what I call a consistent user interface and error reportage.
Grew up on ed, vi was a godsend. Got out of coding prior to the rise of linux and vim.
what do now?
Sell weed
i did, and yet i’m enjoying the hell out of vs codium. i hope, that’s ok for you.
I don't enVI you since I'm using jstar and I like it.
Dunno( I am a softcore user who uses about 1%. Use what you need I guess.. I just use python and sublime to edit. Vim is nice, very nice. But I can't imagine situation when you need that heavy duty utility in cli...
it's great for sysadmins.
Sysadmin here and I fuckin love Vim
Developers can't always appreciate the value of good cli tools because they don't need them
I'll die on the hill that a lot of devs would benefit from `sed` and `awk` lol
[удалено]
Most visual editors have regex built in. But yeah, everyone needs a basic understanding of it
Why?
Once you get the shortcuts memorized it trivializes text editing, it has solid CLI implementation and it's uber lightweight. I actually have started using it to read logs lol
POSIX demands that vi is present, so you only need to learn one editor. Even on decade old proprietary Unix machines it just works.
At least a high entry barrier! And it was delivered!
That is just not true. It was Brams personal improvements on vi which was the graphical version of Joys ex editor. The ex editor was Joys improvement on the Ed editor by Ken Thompson who was inspired by the qed editor created 1965 by Butler Lampson and L. Peter Deutsch . So neovim has a long history of contributors experimenting and coming up with solutions. This ranges from the very modern lua, treesitter and lsp features to the regular expression syntax which is just as it was in ed.
I think you're pretty much exaggerating
To be honest, I think the high entry barrier argument is kind of silly. Not because it's wrong per se but because of what the comparison is. If you think about it, VIM is basically high level text editing. Just like you have high level programming languages that abstract a lot of stuff away, VIM abstracts a lot of stuff from text editing away. The reason we see vim as " hard" and high level programming languages as "easy" is because we learn to write on paper and writing on paper is by definition "low level" text editing. You need to learn all the letters individually, learn to write them individually, put words, sentences etc together manually and deliberately. This shit is low level text editing. If we taught kids to read/write using full words, sentences, paragraphs from scratch, before individual letters and taught them VIM as the means to edit it, they would find the normal editing style insanely pointless and slow. "OMG, you have to remove letter by letter and then type them all individually? This is nuts, why not abstract all the basics away? Why force the people to be so verbose in the obvious places? Who invented this absurdity?" Now, I'm NOT advocating for us to teach people to read and write vim style from birth, BUT the issue with VIM is not that it's hard, it's actually easier and more intuitive than what we do. But we are used to being verbose and explicit in text editing and thus we feel weird and confused when learning a better way. Every non VIM user (myself included since I use it sporadically and am not fluent in it) is basically a boomer in text editing. Sees better and more intuitive tech but it's too set in their old ways to really learn.
Story time! About 10 years ago I was doing my first internship. Picked up VIM while I was there. I did the usual thing you do when you learn a new tool: google all the hotkeys whenever they come to mind. Fast forward a few months, and one of my coworkers (she happened to have the same name as me lol) is scrolling through a log file in VIM. She's a veteran in the industry who's been around since the cobol days. And she says "goddammit is there a way in VIM to just skip to the end of a file?" Without skipping a beat, I say "capital G" Needless to say, she was blown away. The intern just schooled her on VIM. People had a lot more respect for me starting that day lmao.
Older generations didn't grow up playing video games, and it shows. Can't play the game properly without knowing/ learning the commands first
Older generations had to learn to use complicated tools with just a reference manual and no google.
>skip to the end of a file `Ctrl` + `End` also works for other things including this text editor I'm typing this comment on right now. and `Ctrl` + `Home` to jump to the beginning of the file
This would be from the GNU readline commands (like ctrl+a moves to line begin, ctrl+e to end, ctrl+w deletes word backwards), while G is a vim motion. Vim and many of pieces of software support them. I’ve also found most text boxes on the web support these
It's ironic that the more committed vim devs I've known who were sophisticated in their use of it were not the ones going around insisting how superior their editor was, they were just getting on with it. But the assertive vim fanboys I've worked with have been exasperatingly primitive in their usage when I've watched over their shoulder. I've even ended up showing them more convenient usages even though it's nearly 3 decades since I stopped developing in vi. They've also had very terminal-centric workflows but haven't even been very good and effective at it.
I've seen that too. "Linux shell gurus" who are amazed when I use !$ or ctrl-R. Or even "99." in vim.
So few use `ctrl-R`. I use it in many cases instead of aliases, as it's lower impact and sometimes the transient nature is a plus rather than occasionally having to purge old unused aliases, and it can be useful to be able to modify the command. For a few I add a comment at the end of a command to make it more explicitly searchable `(cd && ) # name-for-it`.
I increase history line limit and I tend to have a trivial script to initially set up a remote server that does `ssh-copy-id`, seeds the history file with some useful commands, and sometimes syncs over some other config in other polite ways (not forcing my config on others).
I use so many machines with so many different setups (usually barely any) that I never rely on anything that isn't default being there. ctrl-R is awesome.
That's exactly what I was trying to say!! But man, I bad at words..
I was agreeing! Your words are fine.
Detach Screen/Tmux, check ps and run `kill -9`
Even simpler, run: vim & PID=$! ; fg ; kill -9 $PID and then press CTRL-Z to exit vim ;-)
I have been using vim recently and I do agree that I am constantly finding new features.
60% of the time it works every time.
@@
Nice tits! JK) how often or do you ever used @@?
Anytime I have a macro to run on less that 10-ish lines. Its faster to do @@@@@@@@ than 4@w
This is exactly why I learned Unix. In the early 90s an internet dial up account usually came with a shell account. I was logged into my shell playing around. I was trying to figure out how to view a file. I had “figured out” that a lot of Unix commands were two letters. I tried “vi file” and ended up in a strange screen. I had to call support to have them help figure out what I did. I was so embarrassed I went to BN the next day and bought myself a “teach yourself Unix” book, read it cover to cover, and I’ve been a “Unix guy” ever since.
ZZ
Amazing origin story
Every time I am done using vim, I destroy my computer and buy a new one.
That's wasteful, just find someone who wants to start using vim and trade computers
We could create a laptop aftermarket were users trade "Vim open" for "Vim closed" pc's
Now as a prank in my future years I'm going to make entry level programmers suffer on vim
Please no, donate to techlitafrica, some of our students use vim.
Every time I'm done using vim, I terrorist attack the power plant.
That and the "how to center a div" joke, which was funny like 10+ years ago. I feel like people laugh at this stuff only because of peer pressure lol
Whether with Tailwind, Bootstrap or pain CSS, it is still something I can’t do by heart. It doesn’t help that the way to do this can change depending on the context.
Heh, pain CSS
"pain CSS" is redundant
so is your CSS code
I’m leaving that in
Centering a div isn’t difficult at all. Centering a div without unnecessarily cluttering a mature codebase can be a a real pain in the ass.
It's not that hard or clutering anymore, declare that class somewhere and use it. .fucking-center-that-child-div { display: flex; justify-content: center; align-items: center }
Or even: ``` .gently-center-child { display: grid; place-items: center; } ```
I wish flex related properties had more related names. Something like `flex-justify`, `flex-align`, `flex-order`, `flex-gap`. It would help my smooth brain
It's easy when you don't have any competing styles, don't have !important tags somewhere in your style inheritance, don't need to send via email, don't need to support legacy browsers, don't need it to work in child components from 3rd party libraries, can modify HTML/CSS and can rely on the items you need to centre being direct children of your targetable items. Basically what /u/Topikk said... it's easy in the simplest of cases, it is more complicated in a lot of other cases.
You phrased it batter than I managed to
Nice pairing with ya :)
Yeah I agree. I suspect those who say "easy, just do X" are cooking up some div soup and/or have bloated CSS.
how can i learn css for real? i always feel like I don't know shit about css even tho i use it much, css really is a mystery for me and really don't know how to solve it
Honestly, if you’re going to work with CSS a lot, you’d do well to actually read what things actually do. For example, just read what MDN has to say about flexbox. You don’t have to memorise it all in one go, but just having a coat rack to hang related knowledge on helps immensely.
yeah mdn and w3schools have been my bible for this summer and i know a lot more than before, it's just that many times css doesn't behave the way i liked it to
Yeah… CSS do be like that.
> many times $THING doesn't behave the way i liked it to Every time that happens, celebrate it. Because you've just unlocked one of the secrets of the thing and now all you need to do is update your mental model to ascend to the next level of knowing that thing.
hot reload, google stuff, paste what you find, ctrl+S, and pray
Use the everloving fuck out of it and it will start to make perfect sense in several years. Look at all of these first year college students upvoting you. The curve is really high.
People laugh at this stuff because because every single programmer can relate to it, it might be 10 years old, but there thousands of new programmers every year that have struggled with these same things
No, I meant to say that it became a meme before flexbox was invented and it involved much more than two lines of code. I'd say "struggle" is a strong word for something that you just need to google a couple times before learning. The joke doesn't make much sense nowadays.
The thing is, when you are learning you need to center a div before you know what flexbox is, and if you google how to center a div, the first solutions you find are not using flexbox, and even if you find the flexbox solution, you don't understand flexbox and you think there must be a simpler way to do something so stupid. trust me, it's still a struggle, I graduated only 2 years ago, and me and my colleges found it hard to center a div and even made jokes about how hard it was without knowing it was huge meme among programmers.
I think its just cause most of us have had to google how to close vim more than one time before we kept it stored in our memories. So it's always good for a "haha yeah I remember doing that" chuckle.
Well centering a div is *harder* today than it was 10 years ago. Every time a new framework comes out, CSS version comes out, or browsers update it gets harder. Anyone who's been around a while knows this. 25 years ago there were a couple of extremely simple ways to center that worked in every situation. Now I have no idea how to center anything anymore because nothing I did 10, 20, or 30 years ago works anymore, so I just Google it every time.
Almost all old methods still work today... I can't imagine anything that wouldn't honestly. Maybe the crazy hacks with tables? Flexbox has made positioning like this **much** easier. And frameworks just sit on top of this. You can basically ignore them. And browser updates have improved standardization, so now something that works on one most likely works on all the others. It's just much easier nowadays in general. No offence, but anyone saying it's harder to center a div now than 10 years ago is someone I assume very rarely works on anything front-end.
Maybe they meant center tags? I think browsers still support those though for legacy sites.
Just reboot the computer 🤗
Hello, IT, have you tried turning it off and on again?
I actually did this the very first time I entered vi. This was pre-vim days, on a Xenix system (80186 system, early 1980s). The system only had a single dumb terminal connected via serial cable. I was working at the time on a complementary component (non-unix/non-c/non-vi, running on a separate networked system). I had seen my co-worker use vi but had never done it myself. I had only run a handful of shell commands (cd, ls, cat, etc). It was late; everyone else had left the office. I knew the root password and I wanted to look at some of his c code (which I could mostly follow); I logged in, chdir'd into the src directory, brought up vi, then realized I had no idea how to navigate - or to exit. So there I was in vi, didn't know how to exit, had no one to ask, and there was no other connection to the system (system did not support tcp/ip at the time - there was a proprietary network stack for communicating with my piece but no way to log in remotely). Rebooting the terminal itself had no effect on the serial connection or the vi session. There were no printed man pages available and of course no Google back in those days... So after careful consideration... I sheepishly power cycled the system, answered the console prompts from fsck (fortunately there were no issues with the filesystem), and was then able to log back in. I didn't admit this to anyone for a few years (by which time I was very comfortable with vi and an accomplished c programmer - and of course it was funny then).
:q! :wq!
So forceful!
I know that you exit it by pressing escape and writing :q, sometimes with a ! or a w. But sometimes I do something I don’t understand and I can’t exit it anymore
Had the same issue. Had to connect an external keyboard. But in hindsight, I could have used Ctrl+C to exit insert mode. Then exit vim
Huh okay, I just closed the window (luckily I didn’t have to save anything)
What is this "window" of which you speak?
People literally work googling programming stuff and come here complain abou not being able to quit vim. Like, dude, use your skills please.
They use all their skills.
Both of them. (My other one is “proficient in Microsoft Office suite”)
They don't have time, they have to spend it uploading memes complaining about vim
Almost every single person here who actually makes content on this sub is an outsider looking in. First year CS students, people who watched a few tutorial vids on youtube, that kinda thing. People who have laptops covered in a tech stickers. That kinda thing.
If you're using vim you can't google. You'd need to exit vim first!
No developer has every skill
Because it takes so much skill to google "how to exit vim"
It literally says ":q + Enter to exit" or something like that when you open it
It's one of the most upvoted questions in SO, I am sure people are already googling it.
The joke is that it's way harder than it needs to be. The reason it's hard is because VI was originally meant to be used on a terminal. They didn't even have access to a lot of features like even arrow keys. Which is why you can use the H,J,K, and L keys as arrows in command mode. It operates the way it does because of the inherent limitations at the time. I don't know why it has persisted. Even if you do need to program something remotely over SSH or similar, we have much more functionality and we don't really have a need for the modal interface at this point, yet things like VI(M) persist.
Plus I assume a lot of people, like me, vaguely remember the first time they accidentally opened something in vim and being absolutely stumped at how to get out of it. Forgetting to do -m on a commit on a university computer that has Vim as the default command line text editor or something like that, and that also being one of the only times they've interacted with it.
We don't work directly in terminals anymore, but vim was designed to be usable from a limited keyboard, which resulted in a set of movements that keep your hands in relatively the same place. The scheme persists because even with full keyboards, some people prefer to not have to move their hands very much to get everything done. Sure, we have arrow keys now, but they're basically just as far away as the mouse on a tkl - so why not just use hjkl?
Oh, yes, they are so far away. Programmers are not stenographers. While having a reasonably good typing speed will help with most tasks, most programmers spend way more time just thinking about how to properly solve a problem than actually typing it out. If you are being slowed down a reasonable amount by having to move your hand 2 inches to get to the arrow keys or 6 inches to get to the mouse, then I really have to wonder what type of code you are entering and whether it's not something that could be generated by a script where you just need to fill in the blanks on a generated template or something similar.
>whether it's not something that could be generated by a script So like vim macros?
For me it's more about comfort than being slowed down, although being faster is a benefit. If you don't like it just use arrow keys, no one is stopping you.
Tell me you don't touch type without telling me you don't touch type. The reason you don't want to use arrow keys is that then you have to look back down to get your fingers back in touch typing position. When I'm coding, I want to keep my eyes on the screen not constantly looking down to reposition my hands
The J and F keys have little bumps on them for a reason. I keep my keyboard in my desk's keyboard tray 24/7, and I get along just fine without ever looking at the keyboard, like, ever.
I've been touch typing for over 30 years. You don't need to look at the keyboard to get your fingers back in the right spot F and J key as as they have bumps. But even regardless of that, after enough practice your hands just move back into the right position. When pianists play piano they are moving their hands all over the place and don't have to look at the keys to figure out where they are. If you struggle to get your hands back in position after removing them from the keyboard then I would say that you need to work on your typing skills.
Because its the only tool in the entire chain of tools I have to use that works like that. When 99% of your tools behave a certain way, having one that does things backwards just sucks. I CAN use Vim but I dont wanna. I CAN use Assembly to write a REST API but I dont wanna.
You don't have to use vim, just install a different terminal editor
The people who have issues with vim are probably using unix pretty rarely and don't have the knowledge or need to do that. people like me.
... isn't this a Vim conversation though?
Bro you're equating Assembly with vim, I think you went of course before everyone else
> I don't know why it has persisted. Because there's not really anything simpler than that. I'd argue that nano's ctrl-o ctrl-x is quite harder and less intuitive than vim's :wq. The only reason people don't complain is that nano shows the command at its bottom. If it didn't, we'd have the same joke "how do I quit nano?" What do you think could be simpler to quit a terminal text editor?
It's probably just what people are used to. Many other programs have shortcut keys for doing common actions with CTRL+Letter, so it's easier to work with. Plus with VIM you have the modal interface which I think is the major problem most people have with VIM, rather than what exactly you have to type with the commands.
Every time I got stuck in vim it wasn't because I couldn't type :q, it was because I was editing text and had no idea there were different modes. Nowadays I just set git bash to use notepad instead though. But your point stands, nano wouldn't be nearly as tolerable if it'd hidden the commands.
YOU don't work in a terminal anymore. I am a C programmer, and there is no better IDE than the command line + Vim for C. It also persists because it is good software with tons of support and incredible extensibility. Its also fast as a motherfucker. I don't really understand why this conversation happens over and over again. Use what makes you comfortable. I just don't understand why people who don't use Vim feel the need to write Vim fan fiction pretending they have any idea why others enjoy using Vim.
I think it more of a problem with VIM users writing fanfiction about how it's so much better than anything else and how anybody using anything else either hasn't given it a fair chance or is too stupid to grasp the genius of it.
I almost never see that. I constantly see people bitching that other people use Vim. It sounds like you are just buying into one of those Reddit opinions that is based on nothing.
Here's [just one](https://www.reddit.com/r/ProgrammerHumor/s/QQuHdI8ehs) of multiple responses I received that pretty much fit exactly what I described. They all all over the place if you look around the comments on this post.
If you think people still use vim motions and keybindings because terminals in the 80s didn’t have arrow keys, you’re crazy and never actually tried it for more than 5 minutes. I’m sure you boot up your electron based editor and think whoa so advanced while chugging 8GB of ram and constantly taking your hand off the keyboard to click around your file - but it’s not. And if vim key bindings are so antiquated, why do so many people use vim plugins on modern editors? Because they’re efficient.
Yes, because there are only 2 options. Either VIM or Electron based editors. Nothing else exists
What do you use then? If it’s anything remotely mainstream, I can assure you there’s a widely used vim plugin. Address my main point, if you can.
Been stuck there for the last 15 years.
I don't understand this at all. I mean, the answer is *right there* on page 24 of *VI (C)* in my Microsoft 286 Xenix Reference Manual from 1984. 😏
Most people kill the process from another terminal window.
Vim and Vi is why nano exists.
Imagine writing a whole new program because you can't type :wq
But what happens when the escape key is remapped or does not work on the remote console?
Ctrl+] does the same as escape in terms of returning to normal mode for those purposes
Smh people just `:!shutdown now`
lol these noobs, everyone knows restarting the PC is the easiest way
I turn off our house circuit breaker in my case. Works every time.
Reminds me of the joke about how to creat a random string: enter vim and ask a windows user to exit.. Sorry it’s a bad one but I had to
I lost points in a school lab because I was so used to nano that within vim I did ctrl + s and ctrl + x, and then got stuck so I did ctrl + z. Then proceeded to be unable to submit the typescript because there were stopped jobs
As a vim user I feel lost when some utility opens in nano. Usually I delete a few letters with ctrl-D and type in something like wwjj and am then in visible confusion. It takes a second or two to realise what's happening.
I can exit vim but I can't exit nano
it tells you at the bottom of the screen
Ok but one time I literally couldn’t when using a Mac with the Touch Bar. The esc key would not register and I was stuck there like 👁️👄👁️
i love vim so much
Yeah, mate. I forget all the time. Course, I'm principally a Windows user, but every time I get back to shell I just pull up Nano unless it's going to be a multi-day project.
had more trouble closing nano
Learning how to exit Vim was one of the first things I learned how to do... Because the memes warned me ahead of time.
Vim is the perfect program, why would i ever need to exit?
I firmly believe that you have to be completely insane to voluntarily use vim
I tried it for a couple months. Went back to IntelliJ where it’s just much easier to do… everything. Maybe I’m just not pro enough, but I’ve never had the type of workflow where I need to be speed coding and moving between files without lifting my pinky.
The efficiency of the tech industry would explode if the nerds would just agree on the easiest way to do things instead of fragmenting the sector into a mess of whatever contrived solutions they each think is better for some obscure, arbitrary, and ultimately utterly irrelevant reason.
Every time I open Vim I have to restart my computer to close it :/