vim-hyperstyle


Ⅰ. 插件描述

Write CSS faster

Ⅱ. 基本信息

创建日期:  2015-05-26
使用用户:  19
Github星:  106
插件作者:  Rico Sta. Cruz

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

# vim-hyperstyle

Type faster by shorthand that will auto-expand as you type. Supports less, sass, scss, stylus, and plain CSS.

Status


Expansions

Expansions intelligently happen as you type. Unlike [emmet], there are no hotkeys required—expansion will happen as you type whenever they make sense.

  • Properties will be auto-completed:
    m: → margin:
  • You can put numeric next to property shortcuts:
    z1⏎ → z-index: 1;
  • Values will be auto-completed:
    float:l → float: left
  • Default units will be added:
    border-radius: 4⏎ → border-radius: 4px;
  • Shortcuts for common statements are available:
    fl⏎ → float: left;
  • Semicolons are inserted automatically so you can write CSS in one go:
    dib ⏎ m0a ⏎
  • Semicolons are omitted for .styl and .sass
  • ...and lots more goodies


Examples

ShortcutExpansion
dibdisplay: inline-block;
m0margin: 0;
m0amargin: 0 auto;
m-15margin: -15px;
m:automargin: auto;
fle 1 autoflex: 1 auto;
float leftfloat: left;

View full reference →


Installation

Using [vim-plug]:

Plug 'rstacruz/vim-hyperstyle'

Python support is required. For Neovim:

:help nvim-python

For OSX/Homebrew: (info)

brew install macvim --with-cscope --with-lua --override-system-vim \
  --with-luajit --with-python3 --with-python


Options

  • To generate statements with no colons in Stylus, set let g:hyperstyle_use_colon=0.

Caveats

  • Stylus is assumed to be in indented syntax (no braces).


Thanks

vim-hyperstyle © 2015+, Rico Sta. Cruz. Released under the [MIT] License.

Authored and maintained by Rico Sta. Cruz with help from contributors (list).

ricostacruz.com  · 
GitHub @rstacruz  · 
Twitter @rstacruz

添加新评论