All Projects → zk-phi → Sublimity

zk-phi / Sublimity

Smooth-scrolling and minimap like sublime editor

Labels

Projects that are alternatives of or similar to Sublimity

Emacs Racer
Racer support for Emacs
Stars: ✭ 381 (-11.4%)
Mutual labels:  emacs
Awesome Dotfiles
Dotfiles for awesome people using the awesomewm linux environment
Stars: ✭ 409 (-4.88%)
Mutual labels:  emacs
Magit Todos
Show source files' TODOs (and FIXMEs, etc) in Magit status buffer
Stars: ✭ 419 (-2.56%)
Mutual labels:  emacs
Company Box
A company front-end with icons
Stars: ✭ 395 (-8.14%)
Mutual labels:  emacs
Emacs Purpose
Manage Windows and Buffers According to Purposes
Stars: ✭ 407 (-5.35%)
Mutual labels:  emacs
Centaur Tabs
Emacs plugin aiming to become an aesthetic, modern looking tabs plugin
Stars: ✭ 414 (-3.72%)
Mutual labels:  emacs
Kubernetes El
Emacs porcelain for Kubernetes.
Stars: ✭ 372 (-13.49%)
Mutual labels:  emacs
Poet
An emacs theme that's well suited for modes using variable pitch: particularly org-mode and markdown-mode.
Stars: ✭ 425 (-1.16%)
Mutual labels:  emacs
Jdee
The JDEE is an add-on software package that turns Emacs into a comprehensive system for creating, editing, debugging, and documenting Java applications.
Stars: ✭ 409 (-4.88%)
Mutual labels:  emacs
Deadgrep
fast, friendly searching with ripgrep and Emacs
Stars: ✭ 419 (-2.56%)
Mutual labels:  emacs
Org Capture Extension
A Chrome and firefox extension facilitating org-capture in emacs
Stars: ✭ 396 (-7.91%)
Mutual labels:  emacs
Parinfer Mode
Parinfer for Emacs :)
Stars: ✭ 406 (-5.58%)
Mutual labels:  emacs
Emacs From Scratch
An example of a fully custom Emacs configuration developed live on YouTube!
Stars: ✭ 412 (-4.19%)
Mutual labels:  emacs
.emacs.d
M-EMACS, a full-featured GNU Emacs configuration "distribution"
Stars: ✭ 387 (-10%)
Mutual labels:  emacs
Ewig
The eternal text editor — Didactic Ersatz Emacs to show immutable data-structures and the single-atom architecture
Stars: ✭ 422 (-1.86%)
Mutual labels:  emacs
Nord Emacs
An arctic, north-bluish clean and elegant Emacs theme.
Stars: ✭ 379 (-11.86%)
Mutual labels:  emacs
Emacs Tree Sitter
Tree-sitter for Emacs
Stars: ✭ 409 (-4.88%)
Mutual labels:  emacs
Emacs4developers
A document to help developers to use Emacs as a developer
Stars: ✭ 430 (+0%)
Mutual labels:  emacs
Emacs Kaolin Themes
Set of eye pleasing themes for GNU Emacs. Supports both GUI and terminal.
Stars: ✭ 421 (-2.09%)
Mutual labels:  emacs
Zero To Emacs And Org Roam
Step by step guide from zero to installing and setting up Emacs and Org-roam on Windows 10
Stars: ✭ 418 (-2.79%)
Mutual labels:  emacs
  • sublimity.el

sublime 風のスムーススクロール、ミニマップ、集中モード

smooth-scrolling, minimap and distraction-free mode (inspired by the sublime editor)

** Screencast

[[screencast.png]]

** Installation

Require this script and some of =sublimity-scroll=, =sublimity-map= and =sublimity-attractive=.

: (require 'sublimity) : ;; (require 'sublimity-scroll) : ;; (require 'sublimity-map) ;; experimental : ;; (require 'sublimity-attractive)

then call command =M-x sublimity-mode= (or put the following expression in your init file).

: (sublimity-mode 1)

** Notes

When you turn =sublimity-mode= on, =auto-hscroll-mode= is automatically disabled, and =sublimity-auto-hscroll-mode= will work instead. Thus, to disable horizontal scrolling, set =sublimity-auto-hscroll-mode= but not =auto-hscroll-mode= while =sublimity-mode= is turned on.

=sublimity-scroll= currently requires an unset/zero =scroll-margin=.

** Customization *** sublimity-scroll (smooth scrolling)

You may configure the speed of smooth-scroll by setting two variables.

: (setq sublimity-scroll-weight 10 : sublimity-scroll-drift-length 5)

Scroll is basically divided into (weight + drift-length) steps. for example, with the configuration above, 100 lines of scrolling is divided into 15 (= 10 + 5) steps

: (17 15 14 12 11 8 7 5 4 2 1 1 1 1 1)

and it looks smoother than 1 step scroll. Note that last 5 steps are all 1 line scrolls, because drift-length is set 5. So you may make scroll more smooth by setting drift-length greater. try :

: (setq sublimity-scroll-weight 5 : sublimity-scroll-drift-length 10)

With the configuration above, scroll is divided into 15 steps again,

: (30 24 18 12 6 1 1 1 1 1 1 1 1 1 1)

but the last 10 steps are all 1 line scrolls. this looks smoother but perhaps more annoying for some users.

For fast computers where the smooth scrolling effect happens too quickly, you can configure a small delay (in seconds) that occurs between scroll steps:

: (setq sublimity-scroll-vertical-frame-delay 0.01)

*** sublimity-map (minimap, experimental) **** sublimity-map-size, fraction, text-scale

: (setq sublimity-map-size 20) : (setq sublimity-map-fraction 0.3) : (setq sublimity-map-text-scale -7)

=sublimity-map-fraction= defines the maximum fraction of width that minimap can get. =sublimity-map-text-scale= is passed to =text-scale-set= on minimap setup.

**** sublimity-map-setup-hook

: (add-hook 'sublimity-map-setup-hook : (lambda () : (setq buffer-face-mode-face '(:family "Monospace")) : (buffer-face-mode)))

=sublimity-map-setup-hook= will run when minimap is created.

**** sublimity-map-set-delay

: (sublimity-map-set-delay 5)

With the setting above, minimap is displayed after 5 seconds of idle time. When =sublimity-map-set-delay= is called with =nil=, then minimap is shown with no delay. This defers from setting delay to 0, especially when used with sublimity-scroll, in the sense that minimap looks not deleted at all but gets worse performance.

*** sublimity-attractive (distraction-free mode) **** sublimity-attractive-centering-width

: (setq sublimity-attractive-centering-width 110)

When a positive integer is set, buffer width is truncated to this value and drawn centered. To cancel this feature, set this value nil.

**** sublimity-attractive-hide-xxxx

Following functions are available to hide some UI parts.

: (sublimity-attractive-hide-bars) : (sublimity-attractive-hide-vertical-border) : (sublimity-attractive-hide-fringes) : (sublimity-attractive-hide-modelines)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].