Code Monkey home page Code Monkey logo

pair-colorizer's Introduction

pair-colorizer

It is a fork from the brilliant rainbow-delimiters, base it, I develop the feature of emphasising delimiters of current cursor mode. Since I change too much of it, So I make a new repo to develop it.

show case

./case.gif

Installation

You can install it manually, steps:

  • download pair-colorizer.el
  • put it into your load directory, ie: (add-to-list 'load-path "~/.emacs.d/xx/xx")
  • (require 'pair-colorizer)

You can also use package-install-from-buffer to install it.

Usage

To toggle the pair-colorizer-mode in the current buffer:

M-x pair-colorizer-mode

At default, the pair-colorizer-emphasise is enable, if you don’t like it, you can turn it off by follows:

(custom-set-variables '(pair-colorizer-emphasise nil))

To start the mode automatically in most programming modes (Emacs 24 and above):

(add-hook 'prog-mode-hook #'pair-colorizer-mode)

configuration

You can set your own rainbow colors use:

;; for light background
(setq pair-colorizer-light-colors ["#xx" "#xx"])
;; for dark background
(setq pair-colorizer-dark-colors ["#xx" "#xx"])

You can also use customize-group to customize various options, including the color theme:

M-x customize-group <RET> pair-colorizer

You can specify faces by customizing following faces:

  • The unmatched delimiter face: pair-colorizer-unmatched-face.
  • The mismatched delimiter face: pair-colorizer-mismatched-face.

You can change the strategy of picking colorized face or emphasised face for a certain depth.

  • To pick a face used to highlight a delimiter: pair-colorizer-pick-face-function
  • To pick a face used to emphasise a delimiter of current cursor: pair-colorizer-emphasise-pick-face-function.

Below is my configuration.

(custom-set-variables '(pair-colorizer-emphasise t))
(custom-set-faces
 '(pair-colorizer-unmatched-face ((t (:foreground "#ff5370" :inverse-video t :weight bold))))
 '(pair-colorizer-mismatched-face ((t (:inherit pair-colorizer-unmatched-face))))

(setq pair-colorizer-dark-colors
      ["#c792ea" "#f78c6c" "#c3e88d" "#89DDFF" "#bb80b3"
       "#ffcb6b" "#82aaff" "#44b9b1" "#80cbc4"])

Hope it will help you!

And I’ll appreciate it if you can star this repo.

If you have any bugs, please issue it, help me make it better!

pair-colorizer's People

Contributors

civitasv avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.