Antenore Gatta

Antenore Gatta

A proud and busy Hacker, Father and Kyndrol.

VimSafe - A VIM Password Safe (Vault) like tool

VimSafe - A VIM Password Safe (Vault) like tool

- 4 mins

VimSafe - A VIM Password Safe (Vault) like tool

Project Repository: https://gitlab.com/antenore/vim-safe

Disclaimers

  1. Security Risk: While VimSafe aims to provide a secure way to handle sensitive information, please be aware that no security measure is perfect. Use this tool at your own risk and always follow best practices for handling sensitive data.

  2. Neovim Compatibility: Currently, VimSafe is not compatible with Neovim. A Neovim-compatible version is in development.

Table of Contents

Introduction

VimSafe is a password keeper (password vault, password safe) based on Vim. It utilizes Vim’s built-in encryption capabilities (blowfish2) to securely store sensitive information such as passwords, API keys, and other confidential data directly within your Vim environment.

If you want to contribute (and/or teach us your Vim wizardry), you are more than welcome!

Requirements

  • Vim 7.4.401 or later (needed to use blowfish2 encryption)
  • Yankitute plugin
  • pwgen (optional, for password generation)

Installation

Choose your preferred method to install VimSafe:

Vim 8+ packages

For Vim version 8 or higher, use the built-in package management:

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

Other plugin managers

VimSafe is compatible with various plugin managers. Here are instructions for some popular ones:

Pathogen

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

Vundle

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

vim-plug

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 Vim’s internal blowfish2 implementation
  • Auto open/close folded elements
  • Easy navigation between fields
  • Insert new items
  • Sort entries
  • Copy username/password to system clipboard (requires +xterm_clipboard)
  • Automatic password generation (using internal VSRandom function or external pwgen command)

Usage

Format your vsafe file as follows:

# -=# VimSafe #=->
Group.SubGroup.SubSubGroup::
    User: "Raffaello"
    Password: "123456789"
    Url: "http://www.example.com/"
    Notes: ""
Group.xxx:
    User:
    Password:
    Url:
    Notes:
Group.xxx.yyy.zzz:
    User:
    Password:
    Url:
    Notes:

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

Commands

Shortcut Command / Description
<F4> AddVSafeEntry Add a new entry
<Tab>, <S-Tab> VSafeNextField Move between fields
<F8> VPWGen Generate a random password in the ‘p’ register

Mapping

  • <F1> Copy username to system clipboard (requires +xterm_clipboard)
  • <F2> Copy password to system clipboard (requires +xterm_clipboard)
  • <F4> Add a new entry
  • <F5> Sort the whole file
  • <F8> Generate random password in the ‘p’ register
  • <Tab> Move forward to the next field
  • <S-Tab> Move backwards to the previous field
  • <CR> Exit from insert mode

Contributing

Contributions to VimSafe are welcome! Please feel free to submit pull requests, report bugs, or suggest new features through the project’s GitLab repository.

Version and License

  • Version: 1.0
  • Author: Antenore <antenore AT simbiosi dot org>
  • License: GPLv3

VimSafe is an encrypted, text-only, password keeper Copyright (C) 2014 Antenore Gatta

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 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Antenore Gatta

Antenore Gatta

A proud and busy Hacker, Father and Kyndrol

Post comment

Markdown is allowed, HTML is not. All comments are moderated.