mirror of
https://github.com/vipul-sharma20/privacy-mode.nvim.git
synced 2026-06-28 08:13:03 +00:00
No description
- Lua 100%
| lua/privacy-mode | ||
| README.md | ||
privacy-mode.nvim
A Neovim plugin that uses ROT13 encoding to make your text unreadable to shoulder surfers. Perfect for writing text on airplanes or in public spaces.
Note
This will be mostly tailored to my personal writing practices and to solve the problems I face.
Also, the code is heavily written by LLM coding agents. Bootstrapped with Claude Code before boarding my flight.
Demo here.
Features
- Standard Mode: Text appears normal while typing, encodes when you exit insert mode
- Real-Time Mode: Text encodes after completing each word (space, punctuation, or Esc)
- Decode Functions: Recover ROT13-encoded text anytime
Installation
lazy.nvim
{
"vipul-sharma20/privacy-mode.nvim",
config = function()
require("privacy-mode").setup()
end
}
packer.nvim
use {
"vipul-sharma20/privacy-mode.nvim",
config = function()
require("privacy-mode").setup()
end
}
vim-plug
Plug 'vipul-sharma20/privacy-mode.nvim'
lua require("privacy-mode").setup()
Usage
Commands
| Command | Description |
|---|---|
:PrivacyModeToggle |
Toggle standard mode |
:PrivacyModeToggleRealtime |
Toggle real-time mode |
:PrivacyModeEnable |
Enable standard mode |
:PrivacyModeEnableRealtime |
Enable real-time mode |
:PrivacyModeDisable |
Disable privacy mode |
:PrivacyModeDecodeBuffer |
Decode entire buffer |
:PrivacyModeDecodeLine |
Decode current line |
:PrivacyModeDecodeSelection |
Decode visual selection |
Default Keymaps
| Keymap | Mode | Description |
|---|---|---|
<leader>pp |
Normal | Toggle standard mode |
<leader>pr |
Normal | Toggle real-time mode |
<leader>pd |
Normal | Decode entire buffer |
<leader>pl |
Normal | Decode current line |
<leader>pd |
Visual | Decode selection |
How It Works
Standard Mode
- Enter insert mode (
i,a, etc.) - text appears normal - Exit insert mode (
Esc) - entire buffer is ROT13 encoded - Re-enter insert mode - text decodes so you can edit
Real-Time Mode
- Type a word:
hello - Press space or punctuation - word instantly becomes
uryyb - Continue typing - each completed word encodes automatically
ROT13 Encoding
- Simple letter substitution cipher (A↔N, B↔O, etc.)
- Reversible - applying ROT13 twice returns original text
- Numbers and symbols remain unchanged
- Example:
hello world→uryyb jbeyq
License
MIT