Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Even the time-honoured "snapshots of the whole directory into ZIP files" way of poor man's version control would have given you backups.
-
haze2715yAlso, I use vim only for edits on remote server. That means I have original files on my local machine.
And git, of course. -
cprn17415y"Learn your tools" series, episode #69:
1. mkdir ~/.vim/undodir
2. set undodir=~/.vim/undodir
3. set undofile
Boom! Persistent undo. You fucked up your file? Great! Now open it again, tap `u` and presto! You saved the company! You're the hero!
Related Rants
DO !!!NOT!!!!! USE 'X' AND 'P' TO 'CUT AND PASTE' A LOT OF LINES ACROSS FILES IN VIM!!! HOLY SHIT I JUST PWNED MYSELF SO HARD I LOST SO MUCH CODE HOLY FUCK IT'S NOT EVEN FUNNY! WHERE DID AT ALL GO YOU ASK, WHY THE FUCKING REGISTER, OK LET'S CHECK THE REGISTER, COOL THERE IT IS, BUT WAIT, THERE'S ONLY LIKE 20% OF IT BECAUSE WE CUT A SHIT LOAD OF LINES AT ONCE, AND THE REGISTER OVERFILLED.... Ok let's calm down, doesn't Vim have a recovery option? Yes it does, but WAIT A FUCKING MINUTE, MY CHANGES ARE NOT IN THE SWAP FILE BECAUSE IT'S NOT LIKE VIM CRASHED OR ANYTHING, MY DUMB-FUCK-ASS WILLFULLY WROTE THE CHANGES WHEN I SWITCHED OVER TO THE NEW FILE, AND NOW, WELL THAT'S IT, YOU'RE DEAD KIDDO, YOU WROTE THE CHANGES TO DISK, NOTHING YOU CAN DO, AND I AM SO SCREWED I SPECIFICALLY MADE A DEVRANT ACCOUNT TO MAKE SURE NO ONE ELSE PWNS HIMSELF AS HARD AS I JUST DID HOLY FUCK
rant
put
vi
cut
delete
vim
paste
yank