2015-12-02 14:23:39 +00:00
|
|
|
|
#+TITLE: Typography layer
|
2015-10-17 10:23:36 +00:00
|
|
|
|
|
2019-05-02 21:49:30 +00:00
|
|
|
|
#+TAGS: emacs|layer
|
|
|
|
|
|
2019-05-07 20:05:06 +00:00
|
|
|
|
* Table of Contents :TOC_5_gh:noexport:
|
2017-05-22 14:16:12 +00:00
|
|
|
|
- [[#description][Description]]
|
2017-11-03 12:44:36 +00:00
|
|
|
|
- [[#features][Features:]]
|
2017-05-22 14:16:12 +00:00
|
|
|
|
- [[#install][Install]]
|
|
|
|
|
- [[#key-bindings][Key bindings]]
|
|
|
|
|
- [[#typo-mode][Typo Mode]]
|
|
|
|
|
- [[#tildify-mode][Tildify Mode]]
|
2015-10-17 10:23:36 +00:00
|
|
|
|
|
2015-11-06 14:26:58 +00:00
|
|
|
|
* Description
|
2017-11-03 12:44:36 +00:00
|
|
|
|
This layer provides support for typographic text editing in Spacemacs.
|
|
|
|
|
|
|
|
|
|
** Features:
|
2018-09-19 03:54:47 +00:00
|
|
|
|
- Modes to automatically insert and cycle among typographic characters
|
|
|
|
|
- [[https://github.com/jorgenschaefer/typoel][Typo Mode]] automatically inserts and cycles among typographic Unicode
|
|
|
|
|
characters on some keys.
|
|
|
|
|
- Tildify Mode automatically inserts non-breaking spaces where
|
|
|
|
|
required (Only available on Emacs 25).
|
2015-10-17 10:23:36 +00:00
|
|
|
|
|
|
|
|
|
* Install
|
2016-01-06 05:21:55 +00:00
|
|
|
|
To use this configuration layer, add it to your =~/.spacemacs=. You will need to
|
|
|
|
|
add =typography= to the existing =dotspacemacs-configuration-layers= list in this
|
|
|
|
|
file.
|
2015-10-17 10:23:36 +00:00
|
|
|
|
|
2018-10-23 14:18:21 +00:00
|
|
|
|
Typographic editing however is disabled by default. To enable it by default set
|
2015-10-17 10:23:36 +00:00
|
|
|
|
=typography-enable-typographic-editing= to =t=:
|
|
|
|
|
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
|
(setq-default dotspacemacs-configuration-layers
|
|
|
|
|
'(typography :variables typography-enable-typographic-editing t))
|
|
|
|
|
#+END_SRC
|
|
|
|
|
|
|
|
|
|
This setting enables automatic insertion of non-breaking spaces where required
|
|
|
|
|
and automatic insertion and cycling among of typographic quotes and dashes.
|
|
|
|
|
|
|
|
|
|
* Key bindings
|
|
|
|
|
|
2018-12-05 03:03:03 +00:00
|
|
|
|
| Key bindings | Description |
|
2015-10-17 10:23:36 +00:00
|
|
|
|
|--------------+------------------------------------------------------------------|
|
2015-11-19 06:16:46 +00:00
|
|
|
|
| ~SPC t T~ | Toggle Typo Mode (automatic insertion of typographic characters) |
|
2015-11-16 13:04:42 +00:00
|
|
|
|
| ~SPC t ~~ | Toggle Tildify Mode (automatic insertion of non-breaking spaces) |
|
|
|
|
|
| ~SPC x ~~ | Insert non-breaking spaces in the current region |
|
2015-10-17 10:23:36 +00:00
|
|
|
|
|
2018-10-23 14:18:21 +00:00
|
|
|
|
The following key bindings are available in insert state.
|
2015-11-06 14:26:58 +00:00
|
|
|
|
|
2015-10-17 10:23:36 +00:00
|
|
|
|
** Typo Mode
|
|
|
|
|
|
2018-12-05 03:03:03 +00:00
|
|
|
|
| Key bindings | Description |
|
2015-11-06 14:26:58 +00:00
|
|
|
|
|--------------+------------------------------------------|
|
2016-02-29 09:23:14 +00:00
|
|
|
|
| ~"~ | Cycle among quotation marks |
|
2015-11-06 14:26:58 +00:00
|
|
|
|
| ~`~ | Cycle among left single quotation marks |
|
2016-02-29 09:23:14 +00:00
|
|
|
|
| ~'~ | Cycle among right single quotation marks |
|
2015-11-06 14:26:58 +00:00
|
|
|
|
| ~-~ | Cycle among dashes |
|
|
|
|
|
| ~.~ | Cycle among ellipsis |
|
|
|
|
|
| ~<~ | Cycle among left angle brackets |
|
|
|
|
|
| ~>~ | Cycle among right angle brackets |
|
2015-10-17 10:23:36 +00:00
|
|
|
|
|
|
|
|
|
** Tildify Mode
|
|
|
|
|
|
2015-11-06 14:26:58 +00:00
|
|
|
|
| Key bindings | Description |
|
|
|
|
|
|--------------+-----------------------------------------|
|
|
|
|
|
| ~SPC~ | Insert non-breaking space when required |
|