Vim + Stylus = fast, effective and convenient CSS workflow!
- All HTML5 tags and CSS3 props are covered
- Correct highlighting for interpolation and other Stylus-specific syntax
- Custom autocomplete function for CSS props and values
- Custom indentation is able to recognize selectors and function/mixin bodies
- This plugin is Vim script only, no heavy stuff
If you use Pathogen (which is highly recommended):
cd ~/.vim/bundle
git clone git://github.com/iloginow/vim-stylus.git
If you use any other vim plugin manager, then I assume that you already know how to use it:)
Otherwise, you can just download this repo and unzip it right into your ~/.vim
directory.
If you really want to take advantage of fast, effective and convenient CSS workflow, you probably need the autocomplete function to behave the same way it does on a small presentation above. You can see that it pops out automatically. And you can find several ways of doing this in vim's documentation. But the easiest one in my opinion is a plugin called MUcomplete. You can certainly choose heavy Python-powered engines like YouCompleteMe. Just make sure that you're aware of the KISS principle:).
Why it is not a wavded/vim-stylus fork?
If you're looking at this README file right now, I assume that you have most likely completed the following steps:
- Chose Vim as your primary tool for web development
- Discovered Stylus
- Realized that it's somehow considerably better than SASS (or LESS)
So far, so good... The next question you'd probably ask yourself is how do you seamlessly integrate this amazing new tool into you workflow!? What you want is correct syntax highlighting, indentation and autocomplete. Because that's what you expect from any modern editor or IDE. If you ask google for a solution, wavded/vim-stylus repo is what you get.
To make a long story short, when I started to use it, poor syntax highlighting caught my eye immediately. Unfortunately, I got no autocomplete whatsoever and you could even see autoindent function do weird things from time to time. No offense to the authors, keep up the great work.
My first intention was to fork the repo and fix those bugs one by one. And I did forked the repo but when I looked at the code, I realized that it was not really a plugin but a mixture of https://github.com/lepture/vim-css and https://github.com/tpope/vim-haml roughly sewed together. Then I looked at the date of the last commit... and it was 2 years ago. And that's when I got the idea that in order to make this thing work properly I probably need to start it from scratch.
That was my story. And who knows... You might find a lot of things you don't like about my plulgin as well. Anyway, pull requests are more than welcome!!! And I promise to process them as fast as it possibly gets.