sortcss.py

CSS Property Sorter Script
Download

sortcss.py Ranking & Summary

Advertisement

  • Rating:
  • License:
  • MIT/X Consortium Lic...
  • Price:
  • FREE
  • Publisher Name:
  • Yu-Jie Lin
  • Publisher web site:
  • https://bitbucket.org/livibetter/

sortcss.py Tags


sortcss.py Description

sortcss.py is a CSS property sorter Python script.Installationpip install sortcss.pySetup for Vim1. Create ~/.vim/ftplugin/css.vim if it's not existed yet.2. Open ~/.vim/ftplugin/css.vim and add new lines below:" CSS Property Sorter Script (:SortCSS to run)command! -range=% -nargs=* SortCSS :< line1 >,< line2 >!python /path/to/sortcss.py < f-args >UsageCommand-line optionsusage: sortcss.py ] positional arguments: INFILE Input file OUTFILE Output fileoptional arguments: -h, --help show this help message and exit -g, --group group properties --css-props-file use custom CSS properties list fileCSS properties list fileYou can use custom list by supplying the file to sortcss.py, the basic format is:# commentmarginpaddingbackgroundcolorThe order of properties is the order thatsortcss.py sort by and the blank line also indicates separate groups. If you have -g, then sortcss.py will insert a blank line between the groups.Usage in Vim1. Open a CSS file in Vim.2. Turn in to Visual mode.3. Select CSS definition(s). At least 1 set of { to }.4. Type :SortCSS and return.This will automatically sort your CSS properties.Notes- You can just type :SortCSS so that entire properties will be sorted in a file.- You can also append arguments as if using sortcss.py directly, e.g. :SortCSS -g for grouping.Product's homepage


sortcss.py Related Software