Vim bundle for styled-components based javascript files.
This plugin checks, whether the current buffer contains an import
or a require
from styled-components
and injects CSS rules into JS template strings.
Note however, that this plugin does not provide its own CSS rules. You should have an up to date vim runtime (for CSS2 rules) and - as long as CSS3 rules are not included - an additional plugin for CSS3 rules. (I recommend hail2u/vim-css3-syntax but feel free to use whatever you like.)
See the documentation for the specific vim package manager for details on how to install packages for vim.
Install via Vundle
Add to vimrc:
Plugin 'fleischie/vim-styled-components'
Install via:
:so ~/.vimrc
:PluginInstall
Install via vim-plug
Add to vimrc:
Plug 'fleischie/vim-styled-components'
Install via:
:so ~/.vimrc
:PlugInstall
Install via pathogen
Run:
git clone https://github.com/fleischie/vim-styled-components/ ~/.vim/bundle/vim-styled-components
Contributions are very welcome. ๐
Browse existing issues or create a new one here.
Submit pull requests here. This project uses the git flow model for development. Please base your feature branch on the develop branch and follow the code style convention used in the already existing files.
A huge thanks goes to Bram Moolenaar for authoring/maintaining Vim.
Lots of love to Glen Maddern and Max Stoiber for creating styled-components.
And of course sylvainbannier for the initial workaround here.
Copyright (c) 2016 Karl Fleischmann.
Distributed under the same terms as Vim itself. See :help license
.