All Projects → jamessan → Vim Gnupg

jamessan / Vim Gnupg

This script implements transparent editing of gpg encrypted files.

Projects that are alternatives of or similar to Vim Gnupg

8cc.vim
C Compiler written in Vim script
Stars: ✭ 205 (-63.78%)
Mutual labels:  viml, vim-plugin
Bouncy Gpg
Make using Bouncy Castle with OpenPGP fun again!
Stars: ✭ 164 (-71.02%)
Mutual labels:  encryption, gnupg
Iostreams
IOStreams is an incredibly powerful streaming library that makes changes to file formats, compression, encryption, or storage mechanism transparent to the application.
Stars: ✭ 84 (-85.16%)
Mutual labels:  encryption, gnupg
Vim Markbar
Display all accessible marks and their surrounding lines in a collapsible sidebar.
Stars: ✭ 159 (-71.91%)
Mutual labels:  viml, vim-plugin
Vim Buffet
IDE-like Vim tabline
Stars: ✭ 304 (-46.29%)
Mutual labels:  viml, vim-plugin
Vim Glsl
Vim runtime files for OpenGL Shading Language
Stars: ✭ 184 (-67.49%)
Mutual labels:  viml, vim-plugin
Encrypt.to
Send encrypted PGP messages with one click
Stars: ✭ 116 (-79.51%)
Mutual labels:  encryption, gnupg
Vim Youdao Translater
vim的有道取词翻译插件
Stars: ✭ 116 (-79.51%)
Mutual labels:  viml, vim-plugin
Blamer.nvim
A git blame plugin for neovim inspired by VS Code's GitLens plugin
Stars: ✭ 283 (-50%)
Mutual labels:  viml, vim-plugin
Jshint2.vim
Lightweight, customizable and functional Vim plugin for JSHint integration.
Stars: ✭ 265 (-53.18%)
Mutual labels:  viml, vim-plugin
Tlib vim
Some utility functions for VIM
Stars: ✭ 147 (-74.03%)
Mutual labels:  viml, vim-plugin
Pear Tree
A Vim auto-pair plugin that supports multi-character pairs, intelligent matching, and more
Stars: ✭ 327 (-42.23%)
Mutual labels:  viml, vim-plugin
Quickfixsigns vim
Mark quickfix & location list items with signs
Stars: ✭ 126 (-77.74%)
Mutual labels:  viml, vim-plugin
Vifm.vim
Vim plugin that allows use of vifm as a file picker
Stars: ✭ 197 (-65.19%)
Mutual labels:  viml, vim-plugin
Vim Todo Lists
Vim plugin for TODO lists
Stars: ✭ 126 (-77.74%)
Mutual labels:  viml, vim-plugin
Pwd.sh
GPG symmetric password manager
Stars: ✭ 1,468 (+159.36%)
Mutual labels:  encryption, gnupg
Learn Vim
无废话极简版Vim学习笔记!文章按主题分拆为多个章节,并尽量控制每节的信息量;通过文字色彩和字体,将命令、快捷键突出显示;在每节结尾,提供一个命令列表,以便回顾文中介绍的重要命令。如果这些文章能对喜欢Vim的朋友有所益处,我将不胜荣幸。
Stars: ✭ 83 (-85.34%)
Mutual labels:  viml, vim-plugin
Incsearch Fuzzy.vim
Stars: ✭ 116 (-79.51%)
Mutual labels:  viml, vim-plugin
Vim Rubocop
The Vim RuboCop plugin runs RuboCop and displays the results in Vim
Stars: ✭ 262 (-53.71%)
Mutual labels:  viml, vim-plugin
Purse
GPG asymmetric (YubiKey) password manager
Stars: ✭ 313 (-44.7%)
Mutual labels:  encryption, gnupg

vim-gnupg

This script implements transparent editing of gpg encrypted files. The filename must have a .gpg, .pgp or .asc suffix. When opening such a file the content is decrypted, when opening a new file the script will ask for the recipients of the encrypted file. The file content will be encrypted to all recipients before it is written. The script turns off viminfo, swapfile, and undofile to increase security.

Installation

Use your favorite plugin manager.

For manual installation, use either pathogen (for old Vim versions) or Vim's packages.

pathogen

Clone or unpack into $HOME/.vim/bundle

Vim package

Clone or unpack into $HOME/.vim/pack/gnupg/start/

GPG Agent

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:

GPG_TTY=`tty`
export GPG_TTY

It is important that this environment variable always reflects the output of the tty command. For W32 systems this option is not required.

Most distributions provide software to ease handling of gpg and gpg-agent. Examples are keychain or seahorse.

Reacting to opening an encrypted file

If there are specific actions that should take place when editing a GnuPG-managed buffer, an autocmd for the User event and GnuPG pattern can be defined. For example, the following will set textwidth to 72 for all GnuPG-encrypted buffers:

autocmd User GnuPG setl textwidth=72

This will be triggered before any BufRead or BufNewFile autocmds, and therefore will not take precedence over settings specific to any filetype that may get set.

Known Issues

In some cases gvim can't decrypt files.

This is caused by the fact that a running gvim has no TTY and thus gpg is not able to ask for the passphrase by itself. This is a problem for Windows and Linux versions of gvim and could not be solved unless a "terminal emulation" is implemented for gvim. To circumvent this you have to use any combination of gpg-agent and a graphical pinentry program:

  • gpg-agent only: you need to provide the passphrase for the needed key to gpg-agent in a terminal before you open files with gvim which require this key.
  • pinentry only: you will get a popup window every time you open a file that needs to be decrypted.
  • gpgagent and pinentry: you will get a popup window the first time you open a file that needs to be decrypted.

Credits

  • Mathieu Clabaut for inspirations through his vimspell.vim script.
  • Richard Bronosky for patch to enable .pgp suffix.
  • Erik Remmelzwaal for patch to enable windows support and patient beta testing.
  • Lars Becker for patch to make gpg2 working.
  • Thomas Arendsen Hein for patch to convert encoding of gpg output.
  • Karl-Heinz Ruskowski for patch to fix unknown recipients and trust model and patient beta testing.
  • Giel van Schijndel for patch to get GPG_TTY dynamically.
  • Sebastian Luettich for patch to fix issue with symmetric encryption an set recipients.
  • Tim Swast for patch to generate signed files.
  • James Vega for patches for better *.asc handling, better filename escaping and better handling of multiple keyrings.

License

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. See https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].