Git Product home page Git Product logo

Pretty Mode Readme

Re-display parts of the Emacs buffer as pretty Unicode symbols. Highly configurable and extendable

Installation

Install the ELPA package from MELPA.

Usage

(require 'pretty-mode)
; if you want to set it globally
(global-pretty-mode t)
; if you want to set it only for a specific mode
(add-hook 'my-pretty-language-hook 'turn-on-pretty-mode)

If you are using the Emacs package Swiper you might want to disable global-pretty-mode as it generates a lot of garbage: instead enable pretty mode on a per-mode basis with turn-on-pretty-mode.

Development

In your Cask file:

(source melpa)
(depends-on "pretty-mode")

Then run:

cask install
make test
cask exec emacs -q -L . -l .dev/init.el

Credits

  • Arthur Danskin released pretty-mode in 2008 which fontifies various symbols.
  • Dmitri Akatov served as a maintainer and added support for more symbols, more modes and customization.
  • Grant Rettke added support for some Lispy stuff, Unicode character documentation, and Unicode source references and serves as the current maintainer.

Related Packages

latex-pretty-symbols
Makes emacs display unicode characters instead of latex commands for a lot of the most usual symbols..
prettify-symbols-mode
Built into Emacs

Discussion

Why Use It?

Some programming languages are wordy. They require a lot of words to write functions and problems. Early on it helps because you understand what is happening. But once you understand how to program well with that language, all of those words just get in the way: they take up a lot of space doing things that have nothing to do with solving your problem. For example in most language you need to explicitly return the result of a function.

In both Java and R the word is return. It isn’t a big deal to write it and see it, but, you just don’t even really see it. You know where you are, that the function is over, and you are returning (at any point) so you don’t need a reminder. In a case like this then you might replace return with a Smalltalk or a fun . There are a lot of other cases.

Browse the code and look at what is available. You will find it easy to enable logical groups of characters like Mathematics or Greek to get started pretty quickly. If it doesn’t have what you need then try writing one yourself: it is really easy.

If you are having fun with it then you are doing it right.

Versus Other Packages

The elephant in the living room is the question of whether or not to use this package or prettify-symbols-mode which is built into Emacs. Most of the time the answer is easy: use the built in package. In this case however it requires some consideration on your part.

This package covers more symbols and is more flexible with how it does it. prettify-symbols-mode does less so on both parts, but eventually it will catch up.

My advice: get what you need from both.

pretty-mode's Projects

pretty-mode icon pretty-mode

Redisplay parts of the Emacs buffer as pretty symbols.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.