Last active
October 14, 2024 10:27
-
-
Save b4tman/6c3648f09a1e35d8564664d694f04f70 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vim.api.nvim_create_user_command( | |
'Encode', | |
function(input) | |
vim.api.nvim_command('%!openssl enc -e -aes-256-cbc -a -salt -pbkdf2 -k ' .. input.args) | |
end, | |
{desc = 'Encode buffer with password', nargs = 1} | |
) | |
vim.api.nvim_create_user_command( | |
'Decode', | |
function(input) | |
vim.api.nvim_command('%!openssl enc -d -aes-256-cbc -a -salt -pbkdf2 -k ' .. input.args) | |
end, | |
{desc = 'Decode buffer with password', nargs = 1} | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment