Skip to content

Neovim lua plugin for using an external command to encode and decode text

Notifications You must be signed in to change notification settings

antarktikali/nvim-external-base64

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Introduction

This is a basic lua plugin for neovim that feeds selected text to an external command, and displays the result in a new buffer window. The contents of the new temporary window can be modified, and sent back to the program. The result is then yanked.

In this case the the plugin uses the base64 program for encoding and decoding text, but it can be changed to any other program. If you are looking for a base64 plugin, there might be better alternatives since this plugin is mainly focused on running an external command for encoding and decoding.

Features

Decoding

Selected base64 encoded strings can be decoded. The output is shown in a new buffer window.

Encoding

It is possible to encode the text to base64 which was a result of the decoding. The encoded text is saved to the default register (is "yanked").

Dependencies

base64 tool executable is needed.

Commands

Can be found under plugin/nvim-base64.lua

Example usage with Lazy.nvim

return {
  url = "url-to-plugin-repository",
  keys = {
    { "<leader>D", "<Plug>(DecodeBase64)", mode = "v", desc = "Base64 decode selected" },
    { "<leader>E", "<Plug>(EncodeAsBase64)", mode = "n", desc = "Base64 encode contents of buffer" },
  },
}

About

Neovim lua plugin for using an external command to encode and decode text

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages