Vim, for all its speed and precision, has a blind spot. By default, it remembers more than you think. Command history, search strings, swap files, persistent undo data—quiet little trails left behind. In shared systems or production shells, these trails are not just clutter. They are risk.
Privacy by default in Vim is not the norm. But it can be.
The first step is knowing what Vim stores. Run it. Save a file. Close it. Look at ~/.viminfo. Inside, you’ll see commands, search terms, old file paths. Swap files hide in temp directories. Persistent undo writes history to disk. All of this is invisible until it isn’t.
To configure privacy by default, start in your .vimrc file. Disable the viminfo file entirely:
set viminfo=
Turn off swap files if real-time crash recovery is not needed:
set noswapfile
Stop persistent undo from writing in plain text:
set noundofile
Clear registers and buffers on every quit:
autocmd VimLeave * :let @/=''
Lock down backups:
set nobackup
set nowritebackup
With these changes, Vim becomes quieter. It stops speaking when you don’t ask it to. Every keystroke is yours alone.
This is what privacy by default feels like—no trails, no ghosts, no memory you didn’t consent to. It’s not about hiding from your own work. It’s about making sure work stays where it belongs.
The teams and systems that win in the long run are the ones that assume nothing stays private unless you make it so. Privacy by default isn’t just a setting—it’s a stance. And it’s something you can extend beyond your editor.
You can see this mindset live today. Secure-by-default environments are no longer a week-long setup. At hoop.dev, you can spin up a private, auditable, and locked-down development space in minutes. Try it, and watch what happens when privacy stops being optional.