vim-hexdec


Ⅰ. 插件描述

Convert hexadecimal numbers to decimal and vice versa.

Ⅱ. 基本信息

创建日期:  2016-06-04
使用用户:  4
Github星:  7
插件作者:  Marcin Kurczewski

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

# vim-hexdec

A small number base conversion script for Vim.

Description

This vim plugin lets you convert hexadecimal numbers to decimal counterparts
and vice versa by exposing following functions:

  • :Hex2Dec
  • :Dec2Hex

The functions work for visual selection, block selection, line ranges and the
whole buffer. You can also convert the numbers without changing the file by
passing additional argument as in :Hex2Dec 0xdeadbeef. Conversion should work
for arbitrary positive integers.

Demo

GIF animation

Bindings

The plugin doesn't define any bindings and leaves the choice to the user.
Here's a demonstration how to bind the commands in the .vimrc file:

nnoremap gbh :Dec2Hex<CR>
nnoremap gbd :Hex2Dec<CR>

Installation

Use your favorite plugin manager. For example, using
vim-plug:

Plug 'rr-/vim-hexdec'

Related work

Based on:

添加新评论