Skip to content

Latest commit

 

History

History
40 lines (27 loc) · 682 Bytes

README.md

File metadata and controls

40 lines (27 loc) · 682 Bytes

b64.nvim

Base64 encode and decode inside of vim.

b64_example.mp4

Install

-- lazy
{ 'taybart/b64.nvim' }
" vim-plug
Plug 'taybart/b64.nvim'

Usage

Highlight some text then:B64Encode<cr> or :B64Decode<cr>

Programatically:

local p = 'hello world'
local b = require('b64').enc(p)
print(b) -- aGVsbG8gd29ybGQ=
p = require('b64').dec(b)
print(p) -- hello world

Recommended Keymaps

vnoremap <silent> <leader>be :<c-u>lua require("b64").encode()<cr>
vnoremap <silent> <leader>bd :<c-u>lua require("b64").decode()<cr>