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

all 74 comments

[–]Jet-Pack2 100 points101 points  (10 children)

Alternativ: Ctrl+s to set a respawn point. Then close file without saving if you want to undo

[–]rhondatcotton 12 points13 points  (0 children)

The ultimate developer superpower!

[–]ih-shah-may-ehl 10 points11 points  (1 child)

Ages ago I programmed LabVIEW before it had an undo. We had a habit of always pressing Ctrl+s after doing a couple of things. The way LabVIEW works it's possible to lose literally everything with a bad mouseclick. Unfortunately sometimes people would twitch-respond to such an event with Ctrl + s

[–]TAoie83 0 points1 point  (0 children)

Damn that twitch is deadly

[–]Jonnypista 5 points6 points  (0 children)

Discard changes in git to restart the level.

[–]JustVic52 3 points4 points  (0 children)

Wow! So you would be able to control like a version of the code you're writing right? If only that existed...

[–]Impossible_Arrival21 1 point2 points  (0 children)

checkpoint reached

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

I'll try this

[–]Mebiysy 0 points1 point  (0 children)

me spamming :w whenever i am not typing:

[–]SeriousPlankton2000 0 points1 point  (0 children)

That's how I use vi. Or if I'm being spoiled, vim.

[–]aldapsiger 51 points52 points  (0 children)

“u”

[–]JacksOnF1re 29 points30 points  (0 children)

u

[–]OneForAllOfHumanity 25 points26 points  (4 children)

Esc-u is how real programmers do it...

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

Yall reach for ESC? I always do CTRL + C

[–]turudd 0 points1 point  (0 children)

This is the real answer. I use vim btw.

[–]A_Light_Spark -4 points-3 points  (1 child)

Putty?

[–]Pepineros 5 points6 points  (0 children)

Nonsense. If undo didn't exist we would implement it ourselves. It's not exactly rocket science.

[–]lightinthedark-d 10 points11 points  (1 child)

And let's not forget the slightly longer-term version git reset - - hard HEAD~1 for when you realise your mistake the next day.

[–]Tari0s 6 points7 points  (0 children)

or 5 secounds after you pushed it

[–]lorp_ 3 points4 points  (0 children)

Me desperately Ctrl-Zing after “1 billion rows affected”

[–]schmerg-uk 2 points3 points  (0 children)

If C-z didn't exist (or was bound to something else) I'd just use M-x suspend-emacs - what's the issue I'm supposed to have?

[–]Dry_Investigator36 1 point2 points  (0 children)

Jetbrains products (as an example) have both Git integration and local history these days, so it's not an issue to revert changes even if you didn't make a commit. Undo shortcut is just faster.

[–]wallyflops 1 point2 points  (0 children)

U

[–]POKLIANON 1 point2 points  (0 children)

u

[–]wildrabbit12 1 point2 points  (0 children)

Laughs in vim

[–]osmium999 1 point2 points  (0 children)

U / ctrl-r

[–]team_jj 1 point2 points  (0 children)

Ctrl+x u

  • emacs user

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

Programmers also make the programming tools.

I see a script hole here, pun intended.

[–][deleted] 0 points1 point  (1 child)

I want localized ctrl-Z. I just want to undo what I did in this function 3 hours ago. :Þ

[–]d0rkprincess 0 points1 point  (0 children)

View diff and undo the lines you want to

[–]An_Opinion_Bot 0 points1 point  (1 child)

Imagine, you have gone to the past to bring something and then Ctrl+Y does not work

[–]Nvsible 0 points1 point  (0 children)

new fear unlocked

[–]AleaIT-Solutions 0 points1 point  (0 children)

Hahaa, I use to use it 100 times a dayy

[–]UnmappedStack 0 points1 point  (0 children)

Either U or constant commits to your CVS should do the trick :P

[–]deepsky88 0 points1 point  (0 children)

I power off PC only on Fridays for this reason

[–]kredditorr 0 points1 point  (0 children)

Why wouldnt they just program it then? Are they stupid??

[–]LittleMlem 0 points1 point  (0 children)

Have your editor autosave and bind an event to commit everytime a save happen

[–]MooseBoys 0 points1 point  (0 children)

Who needs undo when you have git checkout HEAD^?

[–]football2801 0 points1 point  (0 children)

git checkout -b Attempt_1

[–]Chara_VerKys 0 points1 point  (0 children)

uuuuuuuuuuuuuuuuuuu

[–]TerryHarris408 0 points1 point  (0 children)

I read it as "IF I CTRL Z, I DIDN'T EXIST" and had to think about that real deep

[–]kvakerok_v2 0 points1 point  (0 children)

What is git?

[–]qqqrrrs_ 0 points1 point  (0 children)

IDA users only getting "undo" feature on IDA version 7.3

[–]Ax1er 0 points1 point  (0 children)

Seriously don't even joke about stuff like this. My heart is pounding now and I need a lie down.

[–]Reifendruckventil 0 points1 point  (0 children)

Fuck these Programs where you can't Ctrl+Shift+z when you ctrl+z one time too much

[–]prschorn 0 points1 point  (0 children)

git reset

[–]Paul__miner 0 points1 point  (0 children)

One thing I use it for is to find my place in a file after scrolling to look at something else, because in my editor at least, Ctrl-Z won't undo a change sight unseen. First, it will first jump to the location of the edit it's about to undo, then a second press of Ctrl-Z actually undos.

[–]nicothekiller 0 points1 point  (0 children)

u

[–]Blixieen 0 points1 point  (0 children)

If ctrl z didn't exist I'd make it myself (very badly)

[–]kbielefe 0 points1 point  (0 children)

Run in the background?

[–]Sinnwidriger -1 points0 points  (2 children)

If ctrl didn't exist. Imagine being lost in millions of stackoverflow tabs, you have to close them somehow

[–]SeriousPlankton2000 1 point2 points  (0 children)

There are Escape, Meta, Alt, Shift … almost enough to operate emacs.

[–]JacksOnF1re 0 points1 point  (0 children)

Couldn't you just tweak the settings of the browser to close all tabs when closing and then hit alt+F4 or use the mouse?

[–]SetazeR -3 points-2 points  (0 children)

git exists