No description
Find a file
2026-01-05 22:23:20 +05:30
lua/privacy-mode add: plugin 2026-01-05 21:40:38 +05:30
README.md update: demo 2026-01-05 22:23:20 +05:30

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

  1. Enter insert mode (i, a, etc.) - text appears normal
  2. Exit insert mode (Esc) - entire buffer is ROT13 encoded
  3. Re-enter insert mode - text decodes so you can edit

Real-Time Mode

  1. Type a word: hello
  2. Press space or punctuation - word instantly becomes uryyb
  3. 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 worlduryyb jbeyq

License

MIT