spacemacs/layers/+emacs/typography/README.org

62 lines
2.5 KiB
Org Mode
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#+TITLE: Typography layer
* Table of Contents :TOC_4_gh:noexport:
- [[#description][Description]]
- [[#install][Install]]
- [[#key-bindings][Key bindings]]
- [[#typo-mode][Typo Mode]]
- [[#tildify-mode][Tildify Mode]]
* Description
This layer provides support for typographic text editing in Spacemacs. It
provides 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).
* Install
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.
Typographic editing however is disabled by default. To enable it by default set
=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
| Key Bindings | Description |
|--------------+------------------------------------------------------------------|
| ~SPC t T~ | Toggle Typo Mode (automatic insertion of typographic characters) |
| ~SPC t ~~ | Toggle Tildify Mode (automatic insertion of non-breaking spaces) |
| ~SPC x ~~ | Insert non-breaking spaces in the current region |
The following keybindings are available in insert state.
** Typo Mode
| Key Bindings | Description |
|--------------+------------------------------------------|
| ~"~ | Cycle among quotation marks |
| ~`~ | Cycle among left single quotation marks |
| ~'~ | Cycle among right single quotation marks |
| ~-~ | Cycle among dashes |
| ~.~ | Cycle among ellipsis |
| ~<~ | Cycle among left angle brackets |
| ~>~ | Cycle among right angle brackets |
** Tildify Mode
| Key bindings | Description |
|--------------+-----------------------------------------|
| ~SPC~ | Insert non-breaking space when required |