

GitHub - vspinu/company-math: Completion back-ends for for math unicode symbols...
source link: https://github.com/vspinu/company-math
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

This add-on defines three company-mode backends:
-
company-math-symbols-latex
- math latex tags (by default, active only on latex math faces) -
company-math-symbols-unicode
- math unicode symbols and sub(super)scripts (by default, active everywhere except math faces) -
company-latex-commands
- latex commands
Usage
Start math completion by typing the prefix \
key. To select the
completion type RET. Depending on the context and your configuration
unicode symbol or latex tag will be inserted.
Since version 1.2 sub(super)script completion is available for the
company-math-symbols-unicode
backend. Subscripts are inserted with either __
or \_
prefixes. Superscripts with ^^
or \^
. Customize
company-math-subscript-prefix
and company-math-superscript-prefix
if you
don't like this default.
Activation
Install from ELPA or MELPA repositories.
You can either register each backend globally:
;; global activation of the unicode symbol completion
(add-to-list 'company-backends 'company-math-symbols-unicode)
or locally per emacs mode:
;; local configuration for TeX modes
(defun my-latex-mode-setup ()
(setq-local company-backends
(append '((company-math-symbols-latex company-latex-commands))
company-backends)))
(add-hook 'tex-mode-hook 'my-latex-mode-setup)
If you are using AUCTeX
you might need to use TeX-mode-hook
instead:
(add-hook 'TeX-mode-hook 'my-latex-mode-setup)
Further Customization
Set company-tooltip-align-annotations
to t in order to align symbols to the
right as in the snapshots from above.
By default unicode symbols backend (company-math-symbols-unicode
) is not
active in latex math environments and latex math symbols
(company-math-symbols-latex
) is not available outside of math latex
environments. You can use the following custom lists of faces to change this
behavior: company-math-disallow-unicode-symbols-in-faces
,
company-math-allow-unicode-symbols-in-faces
,
company-math-disallow-latex-symbols-in-faces
,
company-math-allow-latex-symbols-in-faces
.
Recommend
-
270
Unicode plugin A Vim plugin for handling unicode and digraphs characters This plugin aims to make the handling of unicode and digraphs chars in Vim easier. It serves 3 purposes: Complete Cha...
-
151
README.md slime-company A company-mode completion backend for
-
75
README.md Completion backend for irony-mode This package provides a
-
10
Proposal for new characters Name Description TEXTILE CARE SYMBOL WASHING TUB washing, shows a tub TEXTILE CARE SYMBOL WASHING TUB WITH THIRTY DEGREES US and Canadian variant comes with one heavy dot TEXTILE CARE SYMBOL WASHING TUB WITH...
-
5
Generic Session Manager for Emacs Sesman provides facilities for session management and interactive session association with the current contexts (e.g. project, directory, buffers). While sesman can be used to manage arbitrary "sessi...
-
6
company-mode completion back-end for inf-ruby buffers. NOTE: Now that inf-ruby 2.4.0 supports completion-at-point, this backend is deprecated. Y...
-
7
company-restclient Company-mode completion back-end for restclient-mode. It provides auto-completion for HTTP methods and he...
-
8
How to find and insert Unicode symbols in HTML When I started using MacBook, I couldn’t remember how to type the right arrow (→) symbol. I...
-
6
This is a "storage" package used by completion engines such as company-math.el and ac-math.el. Defined (a)lists are: math-symbol-list-basic math-symbol-list-extended math...
-
14
Add Unicode symbols and format text labels in SAS 0 ...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK