Skip to content

Show parent-chain on header for HTML / Jade / Pug / LESS / SCSS / Sass / Stylus

Notifications You must be signed in to change notification settings

kuanyui/cakecrumbs.el

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Cakecrumbs.el

Display parents’ chain on header for:

  • XML / HTML
  • Jade / Pug
  • SCSS / LESS
  • Stylus / Sass

Screenshot

demo.gif

Settings

Now cakecrumbs.el is available on MELPA.

;; =======================================================
;; Cakecrumbs
;; =======================================================
;; Specify all major-mode (`cakecrumbs' decide how to deal with
;; cursor's context by variable `major-mode'.)
(setq cakecrumbs-html-major-modes   '(html-mode web-mode nxml-mode sgml-mode))
(setq cakecrumbs-jade-major-modes   '(yajade-mode jade-mode pug-mode))
(setq cakecrumbs-scss-major-modes   '(scss-mode less-css-mode css-mode))
(setq cakecrumbs-stylus-major-modes '(stylus-mode sass-mode))  ; currently, sass-mode use the same rule with stylus-mode

;; Auto `add-hook' for above major-mode.  (Auto enable `cakecrumbs'
;; for the major-modes which have specify in above variables)
;; This automatically do this for you:
;; (add-hook 'MODE-HOOK 'cakecrumbs-enable-if-disabled)
(cakecrumbs-auto-setup)

;; Set to number to refresh after idling N seconds.
;; Set to nil, refresh without any delay.
(setq cakecrumbs-refresh-delay-seconds 0.1)

;; Appearances
(setq cakecrumbs-separator " | ")
(setq cakecrumbs-ellipsis "[...] ")

;; Ignore some patterns in selector string
(setq cakecrumbs-ignored-patterns '(
                                    "[.]col-[a-z][a-z]-[0-9]+"  ; Bootstrap's .col-*
                                    ))

Known Issues

  • I’m too lazy to implement the supporting for nested-tag of Jade/Pug.

Because this is still a valid nested-tag:

a(ng-class="aClass"
  ng-click="apply()"): b(ng-repeat="x in xxx"
                         ng-model="b"): c hello
  
  • mmm-mode may disable cakecrumb-mode after cakecrumb-mode enabling. I don’t know how to deal with this currently.
  • Huge XML/HTML file may cause freeze.
  • Didn’t named breadcrumbs because that had been used by someone else.
  • Life is so painful.

License

GPLv3

About

Show parent-chain on header for HTML / Jade / Pug / LESS / SCSS / Sass / Stylus

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published