Ⅰ. 插件描述
Simple font-size unit conversion for your CSS stylesheetsⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin '/typeredeemer'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle '/typeredeemer'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug '/typeredeemer'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/vim-scripts/typeredeemer
Ⅳ. 文档说明
Ever wanted to change your font-size/line-height declarations from one unit to another without resorting to going back and forth between vim and an online conversion tool? This script lets you convert between px, em and % values through the use of some simple key mappings.
Mappings for converting one font-size/line-height declaration at a time include:
<leader>px - convert value to px equivalent
<leader>em - convert value to em equivalent
<leader>p% - convert value to percent equivalent
To convert all font-size and line-height declarations at the same time:
<leader>apx - convert all to px
<leader>aem - convert all to em
<leader>ap% - convert all to %
You don't have to be bound to the browser default size of 16px, which this script uses by default. To change this value, use the mapping '<leader>sd' and specify a new default size in px (i.e. 17.0). To check what this value is at any time, use the mapping '<leader>gd'.