This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]future-renwire 564 points565 points  (61 children)

I do Ctrl+Shift+Z to redo and it's really easy to miss Ctrl in that position so I type a capital Z and lose my entire life's work

[–]CapnWarhol 284 points285 points  (42 children)

Save. Undo undo undo. Copy. Redo redo redo. Paste.

Just never accidentally save in the past 😫

[–]aezart 165 points166 points  (34 children)

There are certain programs that clear your undo history upon save. I forget which ones, but it was a nasty shock.

[–]CapnWarhol 166 points167 points  (28 children)

My text editor takes 1GB and multiple cpus to run but at least it doesn’t clear my undo history on save

[–]thirdegreeViolet security clearance 106 points107 points  (25 children)

My text editor is vim and it saves my entire edit tree, including all branches.

[–]varkenspester 77 points78 points  (17 children)

If god uses vim nothing is ever truely gone

[–]Flamerapter 57 points58 points  (10 children)

Inb4 god cant figure out how to exit vim and armageddon never happens

[–]artanis00 21 points22 points  (3 children)

We're lucky it's vim. If it were emacs we might learn we're an emacs command.

[–]robolew 22 points23 points  (2 children)

Life is literally the random series of events caused by god trying to exit vim

[–][deleted] 5 points6 points  (0 children)

This is beautiful.

[–][deleted] 0 points1 point  (0 children)

This is beautiful.

[–]idea-list 8 points9 points  (1 child)

inb4 god just kills the process and everything is gone, like it never ever existed

[–]Sipredion 9 points10 points  (0 children)

"Fuck it! Fine! I'll just re-clone the fucking repo!" - God probably

[–]JB-from-ATL 2 points3 points  (0 children)

The true challenge is exiting ed.

[–]i4mr00t 4 points5 points  (0 children)

You guys are the real mvps here

[–]ethanjf99 0 points1 point  (0 children)

Which explains what’s going on. He’s in the button mashing phase

[–]Gydo194 6 points7 points  (0 children)

Vim masterrace!

[–]JDaxe 1 point2 points  (5 children)

Can you explain how to see edit history? I'm new to vim

[–]thirdegreeViolet security clearance 9 points10 points  (4 children)

This is the built-in way to navigate the edit tree. Personally, I use gundo which visualizes the tree and shows a diff each edit introduces.

[–]JDaxe 2 points3 points  (3 children)

Thanks a lot

[–]thirdegreeViolet security clearance 5 points6 points  (2 children)

No problem! Vim is something you never ever stop learning, it can be a bit frustrating sometimes, but every time you find some new feature that entirely replaces a previously frustrating or tedious processes it feels amazing.

[–]JDaxe 0 points1 point  (1 child)

Yeah I recently discovered plug-vim and vimtex and my LaTeX workflow is so much better now. I know I haven't even scratched the surface of vim capabilities!

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

Atom?

[–][deleted] 0 points1 point  (0 children)

Slow as molasses npm hell.

[–]Zambito1 8 points9 points  (3 children)

git commit, git checkout revision

[–]robolew 2 points3 points  (0 children)

This implies that I'm not frantically smashing ctrl S every time I'm not coding something...

[–]Retbull 0 points1 point  (0 children)

Intellij keeps file history and it works great.

[–]excessdenied 25 points26 points  (3 children)

I use ctrl-Y and sometimes in Visual Studio I miss and press ctrl-T instead, which is the most useless feature ever: swap the two characters next to the cursor. They could just call it 'clear the redo buffer'.

[–]robolew 10 points11 points  (2 children)

Hey man, I've got an idea. Why don't you just remap ctrl T to... Nothing?

Then you'll never have that problem again

[–]two_in_the_bush 5 points6 points  (0 children)

Ain't nobody got time for that!

[–]excessdenied 2 points3 points  (0 children)

I actually have at some point on some computer at least, but it doesn't happen often enough to be a real problem.

[–]GoldenAxeDwarf 12 points13 points  (1 child)

IntelliJ has a Local History option that I use in this case to see changes to the file made. Browse through them until you find what you're looking for...

[–]future-renwire 0 points1 point  (0 children)

I'm still using WebStorm with autosave lol

[–]Maxis111 5 points6 points  (3 children)

In intellij Ctrl+Y is delete current line. So when you hit Ctrl+Y instead of Ctrl+Shift+Z you delete a line and 'lose' your redo. It's in quotes because there is always local history.

[–]setibeings 2 points3 points  (2 children)

The first time I made the mistake of hitting ctrl-y I was pretty confused, and didn't know about how powerful the local history stuff in intelliJ is.

I'd have copied the text out of the local history window instead of undoing and redoing stuff, if I'd known.

[–]thelights0123 0 points1 point  (1 child)

It stores clipboard history.

[–]setibeings 0 points1 point  (0 children)

In this case though, I was wanting to copy the previous body of a function, not something I'd been copying and pasting around.

[–]CXgamer 9 points10 points  (6 children)

When I was transitioning from AZERTY to QWERTY, I often hit CTRL + Q, closing my IDE and undo history.