Site Map - skip to main content

Hacker Public Radio

Your ideas, projects, opinions - podcasted.

New episodes Monday through Friday.

hpr3484 :: My vim setup with GnuPG

My vim setup with the GnuPG vim plugin

<< First, < Previous, Latest >>

Host Image
Hosted by Archer72 on Thursday 2021-12-09 is flagged as Clean and is released under a CC-BY-SA license.
Tags: vim, plugin, lightweight.

Listen in ogg, spx, or mp3 format. | Comments (0)

Part of the series: Lightweight Apps

Reviews of light weight applications

Using the GnuPG vim plugin to edit encrypted files.

Line to directly clone from github

  git clone

From man 1 gpg-agent:

You should always add the following lines to your .bashrc or whatever initialization file is used for all shell invocations:

export GPG_TTY

It is important that this environment variable always reflects the output of the tty command.

.bashrc snippet

  ## GPG Vim
  export GPG_TTY
  export EDITOR=vim

GnuPG folder structure

  [mark@fedora-lt ~]$ tree .vim
  ├── plugin
  │   └── vim-gnupg
  │       ├── autoload
  │       │   └── gnupg.vim
  │       ├── doc
  │       │   └── gnupg.txt
  │       ├── plugin
  │       │   └── gnupg.vim
  │       └──
  └── spell
      ├── en.utf-8.add
      └── en.utf-8.add.spl


set tabstop=2 softtabstop=0 expandtab shiftwidth=2 smarttab textwidth=80
syntax on
autocmd BufRead,BufNewFile   *.log set filetype=logtalk
set spell spelllang=en_us

Generate gpg full key
gpg --full-generate-key

or just a regular one, with less options
gpg --gen-key

Encrypt the file in question, with -r as the recipient
In this case, I used part of the comment as the recipient

Picture 1
Picture 1
Click the thumbnail to see the full-sized image

This is more like it.
gpg -e -r test thisIsMyTestFile.txt

Now test edit the file
vim thisIsMyTestFile.txt.gpg

Picture 2
Picture 2

It is a good idea to shred the original text file

      shred - overwrite a file to hide its contents, and optionally delete it
      -u deallocate and remove file after overwriting
      -v, --verbose, show progress

Example: shred -u -v foo.txt

Show Transcript

Automatically generated using whisper

whisper --model tiny --language en hpr3484.wav

<< First, < Previous, Latest >>


Subscribe to the comments RSS feed.

<< First, < Previous, Latest >>

Leave Comment

Note to Verbose Commenters
If you can't fit everything you want to say in the comment below then you really should record a response show instead.

Note to Spammers
All comments are moderated. All links are checked by humans. We strip out all html. Feel free to record a show about yourself, or your industry, or any other topic we may find interesting. We also check shows for spam :).

Provide feedback
Your Name/Handle:
Anti Spam Question: What does the P in HPR stand for ?
Are you a spammer →
Who hosted this show →
What does HPR mean to you ?