File: README.md

package info (click to toggle)
monokai-emacs 3.2.1-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 312 kB
  • ctags: 26
  • sloc: lisp: 4,668; makefile: 2
file content (123 lines) | stat: -rw-r--r-- 3,763 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
# About

Monokai for Emacs is a port of the popular TextMate theme
[Monokai](http://www.monokai.nl/blog/2006/07/15/textmate-color-theme/)
by Wimer Hazenberg. The inspiration for the theme came from Bozhidar Batsov and
his [Zenburn](https://github.com/bbatsov/zenburn-emacs) port and
[Sublime Text 2](http://www.sublimetext.com/2) which defaults to this color scheme.

I like the colors and I like Emacs. This followed.

The theme uses built-in theming support available Emacs 24 and later.

I recommend using [Prelude](http://batsov.com/prelude/) in conjunction with
this theme. Bozhidar Batsov has done some awesome work in making Emacs beautiful and
accessable to a newcomer.

# Installation

## Manual

Download `monokai-theme.el` to the directory `~/.emacs.d/themes/`. Add this to your
`.emacs`:

```lisp
(add-to-list 'custom-theme-load-path "~/.emacs.d/themes/")
```

Now you can load the theme with the interactive function `load-theme` like this:

`M-x load-theme RET monokai`

## Package.el

Monokai is available in both [Marmalade](http://marmalade-repo.org)
and [MELPA](http://melpa.milkbox.net).
Keep in mind the fact the version in the Marmalade repo may not always
be up-to-date.

You can install `monokai` with the following command:

`M-x package-install monokai-theme`

To load it automatically on Emacs startup add this to your init file:

```lisp
(load-theme 'monokai t)
```

# Customization

Please see full list of variables in the `defcustom` section.

You can override specific core colors using this in your `init.el` or equivalent file:

```lisp
  (setq ;; foreground and background
        monokai-foreground     "#ABB2BF"
        monokai-background     "#282C34"
        ;; highlights and comments
        monokai-comments       "#F8F8F0"
        monokai-emphasis       "#282C34"
        monokai-highlight      "#FFB269"
        monokai-highlight-alt  "#66D9EF"
        monokai-highlight-line "#1B1D1E"
        monokai-line-number    "#F8F8F0"
        ;; colours
        monokai-blue           "#61AFEF"
        monokai-cyan           "#56B6C2"
        monokai-green          "#98C379"
        monokai-gray           "#3E4451"
        monokai-violet         "#C678DD"
        monokai-red            "#E06C75"
        monokai-orange         "#D19A66"
        monokai-yellow         "#E5C07B")
```

## `org-mode` headers

If you would like to change the font size of your `org-mode` headers you can do so with:

```lisp
  (setq monokai-height-minus-1 0.8
        monokai-height-plus-1 1.1
        monokai-height-plus-2 1.15
        monokai-height-plus-3 1.2
        monokai-height-plus-4 1.3)
```

## Variable pitch

If you would like to use `variable-pitch-mode` you can enable it with:

```lisp
  (setq monokai-user-variable-pitch t)
```

This used to be enabled by default but broke the principle of least surprise which resulted in a couple of issues. See [#62](https://github.com/oneKelvinSmith/monokai-emacs/issues/62) & [#56](https://github.com/oneKelvinSmith/monokai-emacs/issues/56).


## Windows

If your're experiencing font issues using `org-mode` on Windows with emacs 25 try add this to
your `init.el` or equivalent file:

```lisp
    (add-hook 'after-init-hook '(lambda () (load-theme 'monokai t)))

    ;; FIX: Invalid font in org-mode on Windows
    (when (and sys/win32p (> emacs-major-version 24))
      (add-hook 'window-setup-hook '(lambda () (load-theme 'monokai t))))
```
For more info check the thread in [#56](https://github.com/oneKelvinSmith/monokai-emacs/issues/56)

# Bugs & Improvements

Please, report any problems that you find on the projects integrated
issue tracker. If you've added some improvements and you want them
included upstream please send a pull request.

Thank you,<br\>
Kelvin

=============