sponsor Vim development Vim logo Vim Book Ad

VimSafe : A VIM Password Safe (Vault) like tool

 script karma  Rating 4/1, Downloaded by 280  Comments, bugs, improvements  Vim wiki

created by
Antenore Gatta
 
script type
ftplugin
 
description
VimSafe - A VIM Password Safe (Vault) like tool

Source code: https://gitlab.com/antenore/vim-safe

# Introduction

VimSafe is a password keeper (password vault, password safe, ...) based on Vim.
VimSafe uses the VIM builtin encryption capabilities (blowfish2).
If you want to help (and/or teach me your Vim wizardry), you are more than
welcome.

# Requirements

- Vim 7.4.401 or later is needed to use blowfish2.
- Yankitute (Author:  Idan Arye https://github.com/someboddy/)
- pwgen (optional).


# Installation

Below are just some of the methods for installing VimSafe.
Do not follow all of these instructions, just pick your favourite one.
Other plugin managers exists, and VimSafe should install just fine with any of them.

# Vim 8+ packages

If you are using VIM version 8 or higher you can use its built-in package management;
see :help packages for more information. Just run these commands in your terminal:

git clone https://gitlab.com/antenore/vim-safe.git ~/.vim/pack/vendor/start/vim-safe
vim -u NONE -c "helptags ~/.vim/pack/vendor/start/vim-safe/doc" -c q

The following are some of the several 3rd-party plugin managers you can choose from.
Be sure you read the instructions for your chosen plugin, as there typically are
additional steps you nee d to take.

# Pathogen

In the terminal,

git clone https://gitlab.com/antenore/vim-safe.git ~/.vim/bundle/vim-safe

In your vimrc:

call pathogen#infect()
syntax on
filetype plugin indent on

Then reload vim, run :helptags ~/.vim/bundle/vim-safe/doc/ or :Helptags.

# Vundle

call vundle#begin()
Plugin 'antenore/vim-safe'
call vundle#end()

# VimPlug

call plug#begin()
Plug 'antenore/vim-safe'
call plug#end()

# apt-vim

apt-vim install -y https://gitlab.com/antenore/vim-safe.git

# Functionalities

Encryption using internal blowfish2 Vim implementation
Auto open/close folded elements

# Motion

Move with <Tab> <S-Tab>

Exit from insert mode with <CR>

# Insert new Item

Place at the right place
Hit <F4>

TODO: Add by Group/SubGroup/Entry in the right place automagically


# Sort entries

Copy User/Password into the system clipboard

Works only with +xterm_clipboard ( <F1> <F2> )
TODO: Add external clipboard tool support (i.e. xclip)


# Automatic password generation with

Internal VSRandom function using /dev/urandom (this is literally amazing)
external command pwgen

# Usage

The text in the vsafe file has to be formatted in this way:
   # -=# VimSafe #=->
   Group.SubGroup.SubSubGroup::
       User: "Raffaello"
       Password: "123456789"
       Url: "http://www.wtf-ftw.zz/";
       Notes: ""
   Group.xxx:
       User:
       Password:
       Url:
       Notes:
   Group.xxx.yyy.zzz:
       User:
       Password:
       Url:
       Notes:

When you open a vsafe file all the elements, except the Groups/Subgroups, are
folded and the passwords are all concealed with a *

  1 # -=# VimSafe #=-
  2 Group.SubGroup.SubSubGroup::
  3 ›   User: "raffaello"
  4 ›   Password: *
  5 ›   Url: "http://www.aabbccddeeff.it/what/if/local?user";
  6 ›   Notes: "Do you need this note?"
  7 Group.ASubGroup::
  8 +--  User: "picasso"-------------------------------
  9 +--  User: "merlin"--------------------------------
10 +--  User: "obama"---------------------------------

# Shortcuts/Commands


<F4> AddVSafeEntry To add a new entry (at the moment only manual position)
<Tab>, <S-Tab> VSafeNextField To move back and forward between each field
<F8> VPWGen It generates a random password in the p register


Mapping


<F1> (WIP) Copy UserName into the system clipboard (require +xterm_clipboard)
<F2> (WIP) Copy Password into the system clipboard (require +xterm_clipboard)
<F4> To add a new entry (at the moment only manual position)
<F5> To sort the whole file
<F8> Random password in the register p
<Tab> To move forward to the next field
<S-Tab> To move backwards to the previous field
<CR> To exit from insert mode

 
install details
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
vim-safe-1.0.zip 1.0 2020-02-17 7.4 Antenore Gatta Initial upload
ip used for rating: 3.236.83.154

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
Vim at Github