Skip to main content

Questions tagged [prettify-symbols-mode]

Filter by
Sorted by
Tagged with
3 votes
1 answer
119 views

Disabling some symbols from being prettified in a given mode

In AucTeX, I want to use prettify-symbols-mode but not prettify "--" and "---". Why is the following not working? (add-hook 'LaTeX-mode-hook #'(lambda () ...
scaramouche's user avatar
  • 1,796
2 votes
1 answer
51 views

How to make prettify symbols work inside of words?

I would like to be able to replace a_e with aₑ using prettify symbols. However, if I add ("_e" . ₑ) to the prettify symbols alist, it will show the subscript e if _e is surrounded with ...
userrandrand's user avatar
2 votes
1 answer
40 views

Highlight prettified code

is there a way of highlighting a prettified phrase? Something like: (push '("\\qquad " . "⧢") prettify-symbols-alist) (highlight-phrase "⧢" 'shadow) (highlight-...
Alois Pichler's user avatar
1 vote
1 answer
25 views

prettify text, escape characters

I have (appendq! prettify-symbols-alist '( ("_\\infty" . (? (bl . cl) ?∞)) ;; works ("_{-\\infty}" . (? (bl . cl) "-∞")) ;; does not work ...
Alois Pichler's user avatar
1 vote
1 answer
83 views

prettify combined characters

I would like to prettify combined characters as x̂. The code should be something like (push '("\\hat{x}" . 120) prettify-symbols-alist) ;; x̂ Any suggestions how to accomplish visually ...
Alois Pichler's user avatar
0 votes
0 answers
21 views

prettify-symbols-mode text search requirements when combined with org-mode

In a fundamental-mode buffer, I run the following (setq-local prettify-symbols-alist '(("\\(" . ?⟦) ("\\)" . ?⟧))) The purpose of this is to ...
user615536's user avatar
3 votes
1 answer
200 views

Disable 'beautification' of text when point is on same line in org

When writing org documents, some parts of the text (like links and figures) automatically get 'beautified' (I'm unsure what the technically correct term is), meaning that some surrounding text ...
n0542344's user avatar
  • 185
2 votes
1 answer
598 views

Disable Prettify-Symbols for C-mode

I'm using doom emacs. It enables prettify-symbols in all modes (I think) by default, although I would like to disable it in c-mode. I have placed the following in my config.el file: (add-hook 'c-mode-...
Aronurr64's user avatar
1 vote
0 answers
3k views

Adding Fira Code on either emacs < 27 or emacs >= 27

There's a thing I really never understood in emacs, and it comes to changing the default font. I tried following this tutorial to add Fira Code to emacs: https://github.com/tonsky/FiraCode/wiki/Emacs-...
Lhooq's user avatar
  • 230
2 votes
2 answers
884 views

prettify-symbols-mode enabled for major mode, but ligatures don't show until toggling prettify on and off

I'm pretty new to emacs and giving it a shot because it seems to be much better integrated with the OCaml tool chain than any other editor. Since OCaml uses a lot of symbols, I want to enable ligature ...
Evan's user avatar
  • 121
3 votes
1 answer
144 views

Fira Code Ligatures: What is the flying trashcan icon replacing colons in Python buffers?

There is a strange icon appearing in place of colons (:) in my Python buffers. I cannot identify it easily using C-x = or any other command to inspect the character at the point because the icon ...
Metropolis's user avatar
2 votes
1 answer
179 views

Prettify `-lambda`

I have ("lambda" . 955) in my prettify-symbols-alist for Emacs Lisp to transform lambda to λ. I would like to do something similar for -lambda from dash.el. I have tried adding ("-lambda" . (?- (Br . ...
Matthew Piziak's user avatar
0 votes
1 answer
111 views

Append Prettify Ignore Symbols

Prettify seems to work well with languages like matlab or python by ignoring things like addition (+) or multiplication (*) when directly next to the symbol. I'd like to add things like underscore (_) ...
strange's user avatar
  • 91
0 votes
1 answer
121 views

prog-mode-hook not recognizing .ex files in user-config

I'm trying to display prettify-symbols-mode to display for certain characters. I would like for this minor mode to be enabled across all programming languages - thus prog-mode. When I navigate to a ....
colonelrascals's user avatar
3 votes
1 answer
329 views

How to prettify symbols inside comments?

I'm using prettify-symbol mode together with Pragmata Pro.el. Ligatures work perfectly fine in the source code but for some reason with comments they don't. I think I'm missing something since it's ...
FieryCod's user avatar
  • 177
7 votes
1 answer
5k views

Configuring Prettify Symbols Mode

I've configured prettify-symbols-mode as below. However, only in the scratch buffer is any drawing performed. Further, lambda (λ) is the only multi-character token drawn as a unicode glyph. Is ...
Ari's user avatar
  • 339
1 vote
1 answer
236 views

Is it possible to have a global prettify-symbols-alist that other modes add to?

Is it possible to have a global prettify-symbols-alist that other modes add to? A lot of major modes override prettify-symbols-alist instead of pushing into it. One solution I thought of is to push ...
HappyFace's user avatar
  • 920
4 votes
1 answer
1k views

prettify-symbols-mode and multi-character replacements?

With prettify-symbols-mode it is possible to replace strings by a character, or a character composition, e.g. ;; \lambda → λ (push '("\\lambda" . ?λ) prettify-symbols-alist) Optionally, it allows ...
kdb's user avatar
  • 1,591
3 votes
0 answers
75 views

Remove surrounding markup when prettifying symbols

Is there any way to get Emacs to hide surrounding markup when prettifying? That's a feature I really miss from Vim. For example, when editing LaTeX in Vim, the conceal feature can be made to replace ...
user8033428's user avatar
4 votes
1 answer
2k views

How to add symbols to prettify and pretty modes?

I am trying to configure Emacs with ProofGeneral (the Coq IDE) to display mathematical symbols in place of the abbreviations ->, =>, forall and exists. My current .emacs script is as follows: ;...
ryan221b's user avatar
  • 151
5 votes
1 answer
1k views

Using Prettify Symbols with strings instead of characters

I want to the prettify-symbols-mode functionality, but using strings instead of chars as visual replacements: ;; typical replacement for chars (push '("lambda" . ?λ) prettify-symbols-alist) (defun ...
Felipe Lema's user avatar
3 votes
1 answer
108 views

How to highlight "prettified" symbols?

I would like to highlight where prettify-symbols-mode has prettified a symbol. For example, if Emacs displays lambda as λ it could be displayed with a gray background, but if a literal λ occurs in the ...
Nova's user avatar
  • 1,129
4 votes
0 answers
212 views

Prettify symbols without screwing up alignment

Is there a way to prettify symbols without running into alignment issues? E.g. replacing not with ¬is visually pleasing, but screws up code alignment, b/c not is 3 chars while ¬ is one char. Since ...
Tianxiang Xiong's user avatar
5 votes
1 answer
565 views

Export pretty symbols in org source blocks?

I make substantial use of prettify-symbols in my programming buffers. A snippet of some of my python symbols: (add-hook 'python-mode-hook (lambda () (mapc (lambda (pair) (push pair ...
Eric Kaschalk's user avatar
2 votes
0 answers
82 views

Possible to take whitespace into account with prettify symbols? (without removing whitespace)

With a C like language, it might be nice to be able to display: (var * t) as (var x t) - using the unicode multiply symbol. However this causes problems with casting. eg:void fn(MyStruct *s) becomes ...
ideasman42's user avatar
  • 9,157
4 votes
0 answers
708 views

prettify-symbols-mode not working in auctex

In my .emacs file, I have (global-prettify-symbols-mode), and if I visit a .el document, I see the lambda character instead of lambda. My understanding is that in a .tex file I should see the beta ...
Alex's user avatar
  • 1,058
2 votes
0 answers
649 views

Can emacs beautify existing tcl source code?

I'm just getting started with tcl; what sort of beautifier, or prettifier, or formatter, is there for tcl with emacs? My main interest would be to fix existing scripts so that particularly the ...
Thufir's user avatar
  • 121
2 votes
0 answers
65 views

How can I export compositions with html-fontify?

Prettify-symbols-mode is a very nice way to make source code more readable, especially in math-heavy languages. Unfortunately, exporting to HTML with html-fontify-buffer doesn't respect ...
Clément's user avatar
  • 4,035
8 votes
3 answers
2k views

Is it possible to get prettified symbols in Org-mode source blocks?

I have a few symbols in prettify-symbols-alist that improve the appearance of elisp code in my configuration file. I am migrating my configuration file from Elisp to Org-mode and I would like to keep ...
Matthew Piziak's user avatar
7 votes
3 answers
1k views

prettify-symbols-mode character replacement regex

I'm using the new emacs 24.4 prettify-symbols-mode, but it isn't behaving consistently. I turn it on with: (prettify-symbols-mode t) (global-prettify-symbols-mode t) And I'm trying to change the ...
mankoff's user avatar
  • 4,276