vim-base64


Ⅰ. 插件描述

Vim plugin to encode/decode base64 strings

Ⅱ. 基本信息

创建日期:  2016-10-12
使用用户:  46
Github星:  27
插件作者:  Christian Rondeau

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin 'christianrondeau/vim-base64'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle 'christianrondeau/vim-base64'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug 'christianrondeau/vim-base64'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/christianrondeau/vim-base64

Ⅳ. 文档说明

# Vim Base64

Encodes/decodes base64 strings using base64 on Linux and Python on Windows

Build Status

asciicast

Note: In this video, atob and btoa are reversed!

Installation

Prerequisites

  • On Linux, you need base64 from coreutils installed.
  • On Windows, you need Python.

Vundle

Use your preferred Vim plugin installation method.

If you like Vundle:

Add to your .vimrc:

Plugin 'christianrondeau/vim-base64'

And install it:

:so ~/.vimrc
:PluginInstall

Or with vim-plug:

Add to your .vimrc:

Plug 'christianrondeau/vim-base64'

And install it:

:so ~/.vimrc
:PlugInstall

Usage

You can encode and decode base64 string in several modes.

Note that if you provide invalid base64 strings, your text will ben replaced by the error message.

In a Visual Selection (v)

After replacement, the new text will automatically be visually selected.

  • <leader>atob to convert from base64 to a string
  • <leader>btoa to convert from a string to base64

Doing a regex replacement

You can also, in normal mode, replace all instances of a regular expression by their base64 representation, using <leader>btoa/ or <leader>atob/. This will insert a command mode string, with your cursor directly where you can type the regular expression.

Contributions

Before making pull requests, make sure that tests still pass. They are using Vader.vim.

To run tests, either use :Vader tests/* from the vim-base64 folder, or :Vader % from within a test file.

添加新评论