forked from joostkremers/writeroom-mode
-
Notifications
You must be signed in to change notification settings - Fork 0
/
writeroom-mode.info
192 lines (144 loc) · 6.3 KB
/
writeroom-mode.info
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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
This is writeroom-mode.info, produced by makeinfo version 4.13 from
./writeroom-mode.texi.
INFO-DIR-SECTION Emacs START-INFO-DIR-ENTRY * Writeroom mode:
(writeroom-mode). Distraction-free writing. END-INFO-DIR-ENTRY
File: writeroom-mode.info, Node: Top, Next: Writeroom-mode, Up: (dir)
Top
***
* Menu:
* Writeroom-mode::
File: writeroom-mode.info, Node: Writeroom-mode, Prev: Top, Up: Top
1 Writeroom-mode
****************
`writeroom-mode' is a minor mode for Emacs that implements a
distraction-free writing mode similar to the famous Writeroom editor
for OS X. `writeroom-mode' is meant for GNU Emacs 24, lower versions
are not actively supported.
* Menu:
* Installation::
* Usage::
* Customisation::
* Multiple writeroom-mode buffers::
* Adding global effects::
* New in version 2::
File: writeroom-mode.info, Node: Installation, Next: Usage, Up: Writeroom-mode
1.1 Installation
================
`writeroom-mode' can be installed by putting `writeroom-mode.el' in
your `load-path' and calling `(load "writeroom-mode")' in your
`init.el' or, more conveniently, through the package manager:
`writeroom-mode' is available on Melpa (http://melpa.milkbox.net/).
File: writeroom-mode.info, Node: Usage, Next: Customisation, Prev: Installation, Up: Writeroom-mode
1.2 Usage
=========
`writeroom-mode' can be activated in a buffer by calling `M-x
writeroom-mode RET'. By default, `writeroom-mode' does the following
things:
* activate fullscreen
* disable transparency
* disable the menu bar
* disable the tool bar
* disable the scroll bar
* maximise the current window (i.e., delete all other windows in the
frame)
* disable the fringes
* disable the mode line
* add window margins to the current buffer so that the text is 80
characters wide
The last three effects are buffer-local. The other effects apply to the
current frame. Because `writeroom-mode' is a minor mode, this isn't
entirely on the up and up, since minor modes aren't supposed to have
such global effects. But `writeroom-mode' is meant for distraction-free
writing, so these effects do make sense.
There is also the option to add a border around the text area, but this
is disabled by default.
File: writeroom-mode.info, Node: Customisation, Next: Multiple writeroom-mode buffers, Prev: Usage, Up: Writeroom-mode
1.3 Customisation
=================
All `writeroom-mode' effects can be switched off separately in the
customisation group `writeroom'. The option `writeroom-global-effects'
lists the global effects (fullscreen, transparency, scroll bar, menu
bar, tool bar, and border), which can be switched off individually. The
fringes, the mode line and the window maximisation each have a toggle
option.
Normally, the option 'fullscreen' disables the window decorations and
makes the Emacs frame occupy the entire screen, covering the window
manager's panel or task bar. If you prefer to "just" maximise the frame
(i.e., keep the window decorations and do not cover the window
manager's panel), you can set the option `writeroom-fullscreen-effect'
to `maximized' instead of `fullboth' (the default).
The width of the (normally disabled) border around the text area is
controlled by the user option `writeroom-border-width'. To use this
option, check the relevant box in the customisation option 'Global
Effects' or add the symbol `writeroom--border' to the variable
`writeroom-global-effects'.
The width of the text area can be specified with the option
`writeroom-width'. It can be an absolute value, in which case it
indicates the number of columns, or it can be a percentage of the
window's width. In that case, it should be a number between 0 and 1.
File: writeroom-mode.info, Node: Multiple writeroom-mode buffers, Next: Adding global effects, Prev: Customisation, Up: Writeroom-mode
1.4 Multiple writeroom-mode buffers
===================================
It is possible to activate `writeroom-mode' in more than one buffer.
The global effects are of course activated only once and they remain
active until `writeroom-mode' is deactivated in _all_ buffers.
Alternatively, if you use `writeroom-mode' in multiple buffers with
particular major modes (e.g., `text-mode', `markdown-mode'), you can
use the global minor mode `global-writeroom-mode'. This function
enables the global effects and activates the buffer-local effects in
all (current and future) buffers that have a major mode listed in the
user option `writeroom-major-modes' (by default only `text-mode').
When `global-writeroom-mode' is active, the function `writeroom-mode'
can still be called to enable or disable `writeroom-mode' in individual
buffers (regardless of their major mode, of course). Calling
`global-writeroom-mode' again disables `writeroom-mode' in all buffers
in which it is active, also those in which it was activated manually.
File: writeroom-mode.info, Node: Adding global effects, Next: New in version 2, Prev: Multiple writeroom-mode buffers, Up: Writeroom-mode
1.5 Adding global effects
=========================
It is possible to define your own global effects and have them
activated automatically when `writeroom-mode' is activated. For
example, you may want to add your own font or colour effects, or
replace the default fullscreen function with one that works in an older
Emacs version. To do this, write a function that takes one argument and
that activates the effect when this argument is `t' and deactivates it
when it is `nil'. Then add this function to the user option
`writeroom-global-effects' by checking the box "Custom effects" and
adding the function to the list.
File: writeroom-mode.info, Node: New in version 2, Prev: Adding global effects, Up: Writeroom-mode
1.6 New in version 2
====================
* Add a global minor mode.
* Automatically adjust margins when window width changes.
* Rename `writeroom-global-functions' to `writeroom-global-effects'.
Tag Table:
Node: Top226
Node: Writeroom-mode340
Ref: #writeroom-mode449
Node: Installation815
Ref: #installation935
Node: Usage1197
Ref: #usage1325
Node: Customisation2251
Ref: #customisation2414
Node: Multiple writeroom-mode buffers3725
Ref: #multiple-writeroom-mode-buffers3940
Node: Adding global effects4895
Ref: #adding-global-effects5093
Node: New in version 25662
Ref: #new-in-version-25810
End Tag Table
Local Variables:
coding: utf-8
End: