Skip to content
This repository has been archived by the owner. It is now read-only.

isomoar/vim-css-to-inline

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vim-css-to-inline

Transforms plain css to JSX inline styles and vise versa

Build Status

Installation

With plugin manager like Vim-plug:

Plug 'isomoar/vim-css-to-inline'

Usage

Default mappings:

  • tis - transform to inline styles
  • fis - transform from inline styles to css

In normal mode plugin automatically transforms everything between curly braces {}.

Customization

Use the g:csstoinline_no_mapping option and the <Plug> maps to customize the maps:

let g:csstoinline_no_mapping = 1
nmap <leader>is <Plug>ToInlineN
xmap <leader>is <Plug>ToInlineV
nmap <leader>cs <Plug>FromInlineN
xmap <leader>cs <Plug>FromInlineV

Options

By default plugin transforms pixels to numbers:

12px -> 12

If you want to wrap pixel values in quotes, add this option to your .vimrc:

let g:csstoinline_wrap_pixels = 1

About

Transforms plain css into JSX inline styles

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published