bitspook / css-comb.el

Css-comb package for emacs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Css-Comb

A wrapper for using csscomb.js from within emacs. Allows you to comb region/buffers

Install

Install csscomb

You’ll need to first install `csscomb` using npm

[sudo] npm install -g csscomb

Install this package

From MELPA

Make sure you have `melpa` added to your package sources

(add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/"))

Then you can do `M-x package-list-packages` and search for `css-comb`, or you can simply install it with `package-install css-comb`

Manually

  • Clone this package somewhere on your computer
  • Add the cloned dir to your load-path
  • `require(css-comb)` in your init.el

You can now use this package by calling `M-x css-comb`. It’ll comb the region if selected or the whole buffer. You should probably add a shortcut for calling `css-comb` in the css-buffers.

(after-load 'css-mode
  (define-key css-mode-map (kbd "C-c C-x c") 'css-comb))

Protip

You should also install web-beautify package. The CSS generated by csscomb.js is horrible, this package utilize web-beautify if present to make it look better. You should use web-beautify anyway, even if you don’t use css-comb

About

Css-comb package for emacs

License:MIT License


Languages

Language:Emacs Lisp 100.0%