MELPA

Focus

Focus provides focus-mode that dims the text of surrounding sections, similar to iA Writer's Focus Mode.

Installation

You can install Focus using elpa. It's available on melpa:

M-x package-install focus

The package has only been tried on Emacs 24.4 and 24.5, but should work on Emacs 24 or higher.

Usage

Enable the focus-mode with M-x focus-mode .

Also, focus-read-only-mode is provided, which is a mode optimized for continuous reading. It inhibits change in the buffer, hides the cursor and provides bindings for moving between things (defined in Thing At Point). One can toggle focus-read-only-mode with M-x focus-read-only-mode or C-c C-q if focus-mode is enabled.

Some bindings for simple navigation and exiting focus-read-only-mode are provided.

Keybinding Description
n Jump to next thing
SPC Jump to next thing
p Jump to previous thing
S-SPC Jump to previous thing
i Exit focus-read-only-mode
q Exit focus-read-only-mode

Configuring

The amount of dimness can be customized by setting the focus-dimness variable, where a positive integer indicates a more dim color (i.e. more blended with the background color of your theme), and a negative integer indicates a less dim color.

Focus uses the Thing At Point library to choose what section should be in focus. By default, modes derived from prog-mode uses defun, and modes derived from text-mode uses sentence. This a customizable by setting the focus-mode-to-thing variable, which is a list containing pairs on the form (mode . thing).

Example

This is what it looks like:

Light Theme (leuven) Dark Theme (monokai)


Focus

Focus提供 focus-mode ,可以使周围部分的文字变暗,类似于 iA Writer的聚焦模式。

安装

您可以使用elpa安装Focus。它可以在 melpa 上使用:

M-x package-install focus

该包仅在Emacs 24.4和24.5上尝试过,但应在Emacs 24或更高版本上工作。

用法

使用 M-x对焦模式启用对焦模式

此外,还提供了 focus-read-only-mode ,这是为连续读取而优化的模式。它禁止缓冲区的更改,隐藏游标并提供绑定以在事物之间移动(在 Thing At Point )。如果对焦模式,可以使用 Mx focus-read-only-mode Cc Cq 切换 focus-read-only-mode 已启用。

提供了一些用于简单导航和退出 focus-read-only-mode 的绑定。

Keybinding Description
n Jump to next thing
SPC Jump to next thing
p Jump to previous thing
S-SPC Jump to previous thing
i Exit focus-read-only-mode
q Exit focus-read-only-mode

配置

可以通过设置 focus-dimness 变量来定制淡度的量,其中正整数表示更暗的颜色(即与主题的背景颜色混合),负值整数表示较暗的颜色。

Focus使用 Thing At Point 图书馆选择应该关注的部分。默认情况下,派生自 prog-mode 的模式使用 defun ,从 text-mode 派生的模式使用句子。这可以通过设置 focus-mode-to-thing 变量来定制,这是一个包含表单(mode。thing)的对的列表。

示例

这是它的样子:

Light Theme (leuven) Dark Theme (monokai)




相关问题推荐