This repository has been archived on 2024-10-22. You can view files and clone it, but cannot push or open issues or pull requests.
spacemacs/contrib/colors
syl20bnr d704688dfe Adjust light and saturation for rainbow-identifier
For the light solarized-theme
Changed to 60s, 55l
2015-03-31 06:49:40 -04:00
..
extensions/nyan-mode Move nyan-mode to extensions 2015-02-01 18:16:41 -05:00
img Move rainbow packages to colors layer 2015-01-24 00:24:49 -05:00
config.el Move helm-colors key binding in SPC C l 2015-03-20 21:49:50 -04:00
extensions.el Fix compatibility with use-package 2.0 2015-03-15 18:51:18 -04:00
packages.el Adjust light and saturation for rainbow-identifier 2015-03-31 06:49:40 -04:00
README.md Update wrong code snippets in READMEs 2015-02-17 22:36:12 -05:00

Colors contribution layer for Spacemacs

logo

Table of Contents

Description

This layer colors your life with:

rainbow identifiers mode will colorize each variables and functions with an almost unique color. The keywords and the declaration of function colors are disabled in order to make the colorized variables and functions stand out.

rainbow mode displays strings representing colors with the color they represent as background.

nyan mode display a Nyan cat progress bar in the mode-line.

Install

To use this contribution add it to your ~/.spacemacs

(setq-default dotspacemacs-configuration-layers '(colors))

Enable rainbow-identifiers

To enable the package rainbow-identifiers set the variable colors-enable-rainbow-identifiers to t:

(setq-default dotspacemacs-configuration-layers '(
  (colors :variables colors-enable-rainbow-identifiers t)))

Enable Nyan cat

To enable the package nyan-mode set the variable colors-enable-nyan-cat-progress-bar to t:

(setq-default dotspacemacs-configuration-layers '(
  (colors :variables colors-enable-nyan-cat-progress-bar t)))

It may be handy to enable it only in a GUI, you can do it by using a quasi-quoted list:

(setq-default dotspacemacs-configuration-layers
  `((colors :variables
            colors-enable-nyan-cat-progress-bar ,(display-graphic-p))))

Key bindings

The prefix associated with colors is C.

Rainbow Identifiers

theme_tweaks_python

rainbow-identifiers mode can be toggled on and off with:

<SPC> t C i

Note that the toggle is local to the current buffer.

The saturation and lightness of identifier colors can be adjusted live with the micro-state:

Key Binding Description
<SPC> C i s initiate change saturation mini-mode
<SPC> C i l initiate change lightness mini-mode
+ increase the saturation or lightness
- decrease the saturation or lightness
= reset the saturation or lightness
Any other key leave the change mini-mode

Rainbow Mode

rainbow_mode

rainbow-mode mode can be toggled on and off with:

<SPC> t C c

Nyan Mode

nyan-mode mode can be toggled on and off with:

<SPC> t m n

Note that the toggle is local to the current buffer.