GithubHelp home page GithubHelp logo

vim-eyaml's Introduction

vim-eyaml

A vim plugin to encrypt and decrypt eyaml.

Requirements

Optional for pkcs7 encryption

  • a pkcs7_public_key (if using PKCS7 encryption)
  • a pkcs7_private_key (optional, only required for decryption)

Optional for GPG encryption

  • Your gpg keys you'll be encrypting/decrypting with
  • hiera-eyaml-gpg gem (if using gpg encryption)

Installation

Install using your favourite vim plugin manager such as vundle: ~/.vimrc

Plugin 'davewongillies/vim-eyaml'

PKCS7 encryption

If you're using PKCS7 encryption, configure ~/.eyaml/config.yaml with the path to the pkcs7 keys

~/.eyaml/config.yaml

---
encrypt_method: pkcs7
pkcs7_private_key: '~/.eyaml/keys/private_key.pkcs7.pem'
pkcs7_public_key: '~/.eyaml/keys/public_key.pkcs7.pem'

GPG encryption

If you're using GPG encryption, set encrypt_method to gpg: ~/.eyaml/config.yaml

---
encrypt_method: gpg

or in ~/.vimrc

let g:eyaml_encryption_method: 'gpg'

If you do not have a web of trust (i.e. you normally use --always-trust for gpg signing) then you'll need to g:eyaml_gpg_always_trust to 1.

let g:eyaml_gpg_always_trust = 1

By default if you don't set g:eyaml_gpg_recipients or g:eyaml_gpg_recipients_file, the plugin will search for the recipients file hiera-eyaml-gpg.recipients in the current directory, then will search downwards until it finds the file.

" Set one or the other, not both
let g:eyaml_gpg_recipients = '[email protected]'
" let g:eyaml_gpg_recipients_file = 'hiera-eyaml-gpg.recipients'

Usage

To Encrypt

Use vim visual to select a string and then :EyamlEncrypt to have it replaced by the eyaml equivalent

To Decrypt

Use vim visual to select a string and then :EyamlDecrypt to have it replaced by the eyaml equivalent

Authors & Contributors

  • Jonah Meijers
  • Arthur Holstvoog
  • David Gillies

vim-eyaml's People

Contributors

davewongillies avatar flapp avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

vim-eyaml's Issues

Add recrypt option

eyaml has an option for recrypting encrypted data, which is useful for when new recipients are added to the gpg recipients list.

Retain keys

Allow to optionally retain the eyaml key name when encrypting values.

Allow encryption without visual mode

Currently text has to be highlighted in visual mode for it to passed to eyaml. Allow for text to be passed without having to switch to visual mode.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.