Vimcryption
Mom won't find out
It's super easy to encrypt things if you know what you're doing. What about if you don't? Well, you have the options of passwords! Yeah, sure, many text editors support password protecting files. Heck, even the old-skool ed editor did it right: be so confusing and give ?s everywhere to where you don't need a password! (#sarcasm I actually love ed) But sometimes private and public keys aren't enough, and you're fairly lazy. We get it, more time for golf...
Vim has some pkzip default encryption method enabled by default, though you have to explicitly tell it to encrypt a file. You get yer butt to normal mode with Esc spammed a few times then get into command mode with : by itself. Type the following command setlocal cm? to see the default encryption method used, it's generally "zip", which is actually quite weak.
You also gots ya other options that break backwards-compatibility but offer the fairly decent blowfish encryption method. Set it with setlocal cm=blowfish. However, there were some issues with the blowfish implementation that allowed data to be in some load-save mechanism rather than a struct in memory. Not safe when you want to undo, apparantly. Rebranded as "blowfish2", the improved option offers the best security by default out of vim. Set it with setlocal cm=blowfish2 and you are ready to encrypt and undo to yer heart's content!
To encrypt a file, set your encryption method of choice and enter X in command mode. In recent versions of vim it will prompt twice for a password and obscure it with the * which may be an issue to unixy people that prefer nothing to show up at all. While you could use the whole set key=12345 command (crap, there goes my bitcoin wallet's private key), that is moar stoopid as you have the password in the clear and possibly even stored in the .viminfo file. Yeah, unixy folks, the asterisk is a good compromise if ya asks me. But you should at least be building your own software by now, then you can have nothing show up just like ma used to do in unix. Geez it's like simping soydevs hate using gentoo and bsd's ports for some reason...
After setting the password you can save and notice that the save message will include the encryption method used. Exit then try to vim again. You enter the wrong password, you get gobbledy-gook. Edit this file and you destory your data forever. Instead, create a copy if you dare to see what happens.
All this convenience comes at a price as the file is saved with a header containing info about the file being encrypted in vim! A quick shell command of xxd mybitcoinpasswords.txt shows that the first few bytes are the way of telling vim "Hey, listen! You vim-crypted us and here's some info for you to try out against this hash! Hatty hacking!" Not as good as a complex encryption system that uses 20 pubkeys to get to 13 other keys that can be checksummed against the master key that is stego'd into your KeyToMyHeart.mp3 just to get the address of the bank where the password is hashed in deposit box 17, unless you rot13'd it or used the wrong KeyToMyHeart.mp3 as a decoy because you liked Jessica Jarrell's song better than the Isley Brothers' and only you would know... Wow. Now I know there's a reason why people shop at walmart after all...
For the sacrifice convenience brings, vim has a fairly decent system for encrypting files with a simple password mechanism. While you might not want to secure your evil crypto keys and tax-evasion documentation with it, you could use it to secure the millions of passwords you hacked from facebook and google. Heck, it might be more secure than what they use.
Thanks for reading, and HattyHacking;