Skip to content

deponian/nvim-base64

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Description

Encodes/decodes base64 strings using lbase64 Lua library by Ilya Kolbin.

It doesn't require base64 utility to be installed on the system.

Installation

Install via your preferred package manager:

  • deponian/nvim-base64

You can check current version in changelog or on releases page.

Example for lazy package manager:

Import file below or directory it is contained on lazy setup.

return {
  "deponian/nvim-base64",
  version = "*",
  keys = {
    -- Decode/encode selected sequence from/to base64
    -- (mnemonic: [b]ase64)
    { "<Leader>b", "<Plug>(FromBase64)", mode = "x" },
    { "<Leader>B", "<Plug>(ToBase64)", mode = "x" },
  },
  config = function()
    require("nvim-base64").setup()
  end,
}

Usage

Map <Plug>(FromBase64) to decode selected string from base64 and <Plug>(ToBase64) to encode it.

vim.keymap.set('x', "<leader>b", "<Plug>(FromBase64)")
vim.keymap.set('x', "<leader>B", "<Plug>(ToBase64)")

or

vmap <Leader>b <Plug>(FromBase64)
vmap <Leader>B <Plug>(ToBase64)

Acknowledgements

Thanks to Christian Rondeau and his vim-base64 plugin that I've been using for the past few years.

Thanks to Ilya Kolbin and his great lbase64 library.

About

Neovim plugin to encode/decode base64 strings

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages