Skip to content
프로젝트

소개

부드러운 스크롤과 Sublime 에디터 같은 미니맵을 제공합니다.

개발 도구

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
0
in 7 days
0
in 15 days
0
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

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)

관련 프로젝트 살펴보기

불러오는 중…