Ⅰ. 插件描述
Convert pixels to ems or ems to pixels using easy vim commands. Makes font-size unit conversion for your CSS stylesheets easy.Ⅱ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'chiedo/vim-px-to-em'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'chiedo/vim-px-to-em'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'chiedo/vim-px-to-em'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/chiedo/vim-px-to-em
Ⅳ. 文档说明
Vim-px-to-em - Convert px to em or em to px
Makes font-size unit conversion for your CSS stylesheets easy!
Installation
Pathogen Install
- Navigate to your [VIM_ROOT]/bundle directory in your local Vim setup
- git clone https://github.com/chiedojohn/vim-px-to-em.git
Usage
To convert the pixels to ems, select a block of text in visual mode and the enter the following :
:EmOr enter the following to convert the ems to pixels:
:PxTo convert all pixels in the file to ems:
:EmAllOr to convert all ems in the file to pixels:
:PxAllAdd a bang (eg. :Px!) to any of the above command to bypass the prompts before each conversion.
If you don't want to use the standard Base font of 16px, add the following to your ~/.vimrc
let g:px_to_em_base = DIFFERENT_FONT_SIZEExample:
let g:px_to_em_base = 24License
Distributed under the same terms as Vim itself. See :help license.