Replace linum by nlinum and nlinum-relative
This commit is contained in:
parent
b4b4491019
commit
fa4eeb49f0
|
@ -117,13 +117,7 @@ It runs `tabulated-list-revert-hook', then calls `tabulated-list-print'."
|
|||
(setq window-combination-resize t)
|
||||
;; Show column number in mode line
|
||||
(setq column-number-mode t)
|
||||
;; Activate linum-mode in all prog-mode and text-mode buffers if the setting is
|
||||
;; enabled.
|
||||
(when dotspacemacs-line-numbers
|
||||
(add-hook 'prog-mode-hook 'linum-mode)
|
||||
(add-hook 'text-mode-hook 'linum-mode))
|
||||
;; line number
|
||||
(setq linum-format "%4d")
|
||||
|
||||
;; highlight current line
|
||||
(global-hl-line-mode t)
|
||||
;; no blink
|
||||
|
|
|
@ -246,9 +246,9 @@
|
|||
:documentation "Move point according to visual lines."
|
||||
:evil-leader "tL")
|
||||
(spacemacs|add-toggle line-numbers
|
||||
:status linum-mode
|
||||
:on (linum-mode)
|
||||
:off (linum-mode -1)
|
||||
:status nlinum-mode
|
||||
:on (nlinum-mode)
|
||||
:off (nlinum-mode -1)
|
||||
:documentation "Show the line numbers."
|
||||
:evil-leader "tn")
|
||||
(spacemacs|add-toggle auto-fill-mode
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
(hi-lock :location built-in)
|
||||
(holy-mode :location local :step pre)
|
||||
(hybrid-mode :location local :step pre)
|
||||
nlinum
|
||||
(package-menu :location built-in)
|
||||
(process-menu :location built-in)
|
||||
(recentf :location built-in)
|
||||
|
@ -183,6 +184,18 @@
|
|||
:evil-leader "tEh")
|
||||
(spacemacs|diminish hybrid-mode " Ⓔh" " Eh"))))
|
||||
|
||||
(defun spacemacs-base/init-nlinum ()
|
||||
(use-package nlinum
|
||||
:init
|
||||
(progn
|
||||
;; Activate nlinum-mode in all prog-mode and text-mode buffers if the setting is
|
||||
;; enabled.
|
||||
(when dotspacemacs-line-numbers
|
||||
(add-hook 'prog-mode-hook 'nlinum-mode)
|
||||
(add-hook 'text-mode-hook 'nlinum-mode))
|
||||
;; line number
|
||||
(setq nlinum-format "%4d"))))
|
||||
|
||||
(defun spacemacs-base/init-package-menu ()
|
||||
(evilified-state-evilify-map package-menu-mode-map
|
||||
:mode package-menu-mode))
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
;; see https://github.com/syl20bnr/spacemacs/issues/2529
|
||||
(hl-anything :excluded t)
|
||||
indent-guide
|
||||
linum-relative
|
||||
nlinum-relative
|
||||
rainbow-delimiters
|
||||
volatile-highlights
|
||||
))
|
||||
|
@ -370,17 +370,20 @@
|
|||
:config
|
||||
(spacemacs|diminish indent-guide-mode " ⓘ" " i")))
|
||||
|
||||
(defun spacemacs-editing-visual/init-linum-relative ()
|
||||
(use-package linum-relative
|
||||
:commands (linum-relative-toggle linum-relative-on)
|
||||
(defun spacemacs-editing-visual/init-nlinum-relative ()
|
||||
(use-package nlinum-relative
|
||||
:commands (nlinum-relative-toggle nlinum-relative-on)
|
||||
:init
|
||||
(progn
|
||||
(when (eq dotspacemacs-line-numbers 'relative)
|
||||
(linum-relative-on))
|
||||
(spacemacs/set-leader-keys "tr" 'linum-relative-toggle))
|
||||
(nlinum-relative-setup-evil)
|
||||
(add-hook 'nlinum-mode-hook 'nlinum-relative-on))
|
||||
(spacemacs/set-leader-keys "tr" 'nlinum-relative-toggle))
|
||||
:config
|
||||
(progn
|
||||
(setq linum-relative-current-symbol ""))))
|
||||
(setq nlinum-relative-current-symbol "")
|
||||
(setq nlinum-relative-redisplay-delay 0)
|
||||
)))
|
||||
|
||||
(defun spacemacs-editing-visual/init-rainbow-delimiters ()
|
||||
(use-package rainbow-delimiters
|
||||
|
|
Loading…
Reference in a new issue