Delete vim-empty-lines layer and merge its code into spacemacs-evil
1. Delete vim-empty-lines layer and merge its code into spacemacs-evil 2. Remove unused function from spacemacs-evil/funcs.el 3. Add variable dotspacemacs-evil-show-empty-line-indicators to toggle vim-empty-lines-mode 4. Update related documents 5. Compatibilities
This commit is contained in:
parent
ee95121e6b
commit
ebd920e23a
|
@ -344,6 +344,8 @@ In org-agenda-mode
|
||||||
- Key bindings:
|
- Key bindings:
|
||||||
- Add ~J/K~ to scroll up/down (or next/previous node) in Info-mode
|
- Add ~J/K~ to scroll up/down (or next/previous node) in Info-mode
|
||||||
- Add ~o~ to link-hint-open-link in woman-mode
|
- Add ~o~ to link-hint-open-link in woman-mode
|
||||||
|
***** Spacemacs-evil
|
||||||
|
- Replace =vi-tilde-fringe= package with =vim-empty-lines-mode=
|
||||||
***** Shaders
|
***** Shaders
|
||||||
- =shaders= layer has been moved to =gpu= layer.
|
- =shaders= layer has been moved to =gpu= layer.
|
||||||
***** Syntax checking
|
***** Syntax checking
|
||||||
|
@ -376,6 +378,8 @@ In org-agenda-mode
|
||||||
Constantin Gușoi)
|
Constantin Gușoi)
|
||||||
- Add ~SPC g f m~ for ~magit-file-dispatch~ (thanks to Ag Ibragimov and Ilya Grigoriev)
|
- Add ~SPC g f m~ for ~magit-file-dispatch~ (thanks to Ag Ibragimov and Ilya Grigoriev)
|
||||||
- Removed [[https://github.com/defunkt/gist.el][gist.el]] due to it being broken and unmaintained (thanks to Robby O'Connor)
|
- Removed [[https://github.com/defunkt/gist.el][gist.el]] due to it being broken and unmaintained (thanks to Robby O'Connor)
|
||||||
|
***** Vim Empty Lines
|
||||||
|
- The =vim-empty-lines= layer has been deleted and moved to the =spacemacs-evil= layer. (thanks to Ray Wang)
|
||||||
***** YAML
|
***** YAML
|
||||||
- Added LSP support (thanks to Seong Yong-ju)
|
- Added LSP support (thanks to Seong Yong-ju)
|
||||||
***** ycmd
|
***** ycmd
|
||||||
|
@ -502,6 +506,7 @@ In org-agenda-mode
|
||||||
- extra-langs (replaced by =ad-hoc= layers)
|
- extra-langs (replaced by =ad-hoc= layers)
|
||||||
- flow-type (replaced by LSP in =javascript= layer)
|
- flow-type (replaced by LSP in =javascript= layer)
|
||||||
- ycmd (moved to =c-c++=)
|
- ycmd (moved to =c-c++=)
|
||||||
|
- vim-empty-lines (moved to =spacemacs-evil=)
|
||||||
*** Dotfile changes
|
*** Dotfile changes
|
||||||
- Added type bases validation for .spacemacs variables.
|
- Added type bases validation for .spacemacs variables.
|
||||||
- New Variables:
|
- New Variables:
|
||||||
|
@ -544,6 +549,7 @@ In org-agenda-mode
|
||||||
- New variable =dotspacemacs-scroll-bar-while-scrolling= (thanks to duianto)
|
- New variable =dotspacemacs-scroll-bar-while-scrolling= (thanks to duianto)
|
||||||
- New variable =dotspacemacs-show-startup-list-numbers= (thanks to duianto)
|
- New variable =dotspacemacs-show-startup-list-numbers= (thanks to duianto)
|
||||||
- New variable =dotspacemacs-startup-banner-scale= (thanks to Daniel)
|
- New variable =dotspacemacs-startup-banner-scale= (thanks to Daniel)
|
||||||
|
- New variable =dotspacemacs-evil-show-empty-line-indicators= (thanks to Ray Wang)
|
||||||
- Removed Variables:
|
- Removed Variables:
|
||||||
- Removed unused variable =dotspacemacs-verbose-loading= from
|
- Removed unused variable =dotspacemacs-verbose-loading= from
|
||||||
=.spacemacs.template= (thanks to Ying Qu)
|
=.spacemacs.template= (thanks to Ying Qu)
|
||||||
|
|
|
@ -201,6 +201,12 @@ in `dotspacemacs-themes'.")
|
||||||
(const hybrid) (cons symbol sexp))
|
(const hybrid) (cons symbol sexp))
|
||||||
'spacemacs-dotspacemacs-init)
|
'spacemacs-dotspacemacs-init)
|
||||||
|
|
||||||
|
(spacemacs|defc dotspacemacs-evil-show-empty-line-indicators t
|
||||||
|
"If non-nil, show vim-like empty line indicators at the end of files.
|
||||||
|
It defaults to `t', and only works when `spacemacs-evil' layer is enabled."
|
||||||
|
'boolean
|
||||||
|
'spacemacs-dotspacemacs-layers)
|
||||||
|
|
||||||
(spacemacs|defc dotspacemacs-startup-banner 'official
|
(spacemacs|defc dotspacemacs-startup-banner 'official
|
||||||
"Specify the startup banner. Default value is `official', it displays
|
"Specify the startup banner. Default value is `official', it displays
|
||||||
the official spacemacs logo. An integer value is the index of text
|
the official spacemacs logo. An integer value is the index of text
|
||||||
|
|
|
@ -167,6 +167,12 @@ It should only modify the values of Spacemacs settings."
|
||||||
;; (default 'vim)
|
;; (default 'vim)
|
||||||
dotspacemacs-editing-style 'vim
|
dotspacemacs-editing-style 'vim
|
||||||
|
|
||||||
|
;; If non-nil, show vim-like empty line indicators at the end of files.
|
||||||
|
;; Takes effect only if `spacemacs-evil' layer is enabled.
|
||||||
|
;; NOTICE: `spacemacs-evil' is included in `spacemacs' distribution.
|
||||||
|
;; See `dotspacemacs-distribution'.
|
||||||
|
dotspacemacs-evil-show-empty-line-indicators t
|
||||||
|
|
||||||
;; If non-nil show the version string in the Spacemacs buffer. It will
|
;; If non-nil show the version string in the Spacemacs buffer. It will
|
||||||
;; appear as (spacemacs version)@(emacs version)
|
;; appear as (spacemacs version)@(emacs version)
|
||||||
;; (default t)
|
;; (default t)
|
||||||
|
@ -351,7 +357,7 @@ It should only modify the values of Spacemacs settings."
|
||||||
|
|
||||||
;; If non-nil the frame is fullscreen when Emacs starts up. (default nil)
|
;; If non-nil the frame is fullscreen when Emacs starts up. (default nil)
|
||||||
;; (Emacs 24.4+ only)
|
;; (Emacs 24.4+ only)
|
||||||
dotspacemacs-fullscreen-at-startup nil
|
dotspacemacs-fullscreen-at-startup t
|
||||||
|
|
||||||
;; If non-nil `spacemacs/toggle-fullscreen' will not use native fullscreen.
|
;; If non-nil `spacemacs/toggle-fullscreen' will not use native fullscreen.
|
||||||
;; Use to disable fullscreen animations in OSX. (default nil)
|
;; Use to disable fullscreen animations in OSX. (default nil)
|
||||||
|
|
|
@ -154,7 +154,8 @@ set the layer variable =enable-flyspell-auto-completion= to t:
|
||||||
| ~SPC S . S~ | Add word to dict (session) |
|
| ~SPC S . S~ | Add word to dict (session) |
|
||||||
|
|
||||||
* Known issues
|
* Known issues
|
||||||
Vim-empty-lines layer seems incompatible with spell-checking inside org-mode. If
|
Vim-empty-lines package seems incompatible with spell-checking inside org-mode. If
|
||||||
you experience "Args out of range" error message when invoking ~SPC S c~ inside
|
you experience "Args out of range" error message when invoking ~SPC S c~ inside
|
||||||
org-mode buffer then check if you don't have vim-empty-lines layer enabled and
|
org-mode buffer then check if you don't have vim-empty-lines package enabled and
|
||||||
disable it.
|
disable it by setting =dotspacemacs-evil-show-empty-line-indicators= to =nil= in
|
||||||
|
your =.spacemacs= file.
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
(company-coq :requires company)
|
(company-coq :requires company)
|
||||||
proof-general
|
proof-general
|
||||||
smartparens
|
smartparens
|
||||||
vi-tilde-fringe))
|
vim-empty-lines-mode))
|
||||||
|
|
||||||
|
|
||||||
(defun coq/init-company-coq ()
|
(defun coq/init-company-coq ()
|
||||||
|
@ -123,7 +123,7 @@
|
||||||
(defun coq/post-init-smartparens ()
|
(defun coq/post-init-smartparens ()
|
||||||
(add-hook 'coq-mode-hook #'spacemacs//activate-smartparens))
|
(add-hook 'coq-mode-hook #'spacemacs//activate-smartparens))
|
||||||
|
|
||||||
(defun coq/post-init-vi-tilde-fringe ()
|
(defun coq/post-init-vim-empty-lines-mode ()
|
||||||
(spacemacs/add-to-hooks 'spacemacs/disable-vi-tilde-fringe
|
(spacemacs/add-to-hooks 'spacemacs/disable-vim-empty-lines-mode
|
||||||
'(coq-response-mode-hook
|
'(coq-response-mode-hook
|
||||||
coq-goals-mode-hook)))
|
coq-goals-mode-hook)))
|
||||||
|
|
|
@ -32,7 +32,7 @@ throughout the entirety of Spacemacs.
|
||||||
- Evilification of various modes if the editing style is =vim= or =hybrid=
|
- Evilification of various modes if the editing style is =vim= or =hybrid=
|
||||||
- Improves the comment function to be able to also do the inverse operation
|
- Improves the comment function to be able to also do the inverse operation
|
||||||
- Persistent highlight of searched text with =evil-search-highlight-persist=
|
- Persistent highlight of searched text with =evil-search-highlight-persist=
|
||||||
- Display tildes in non-buffer area with =vi-tilde-fringe=
|
- Display tildes in non-buffer area with =vim-empty-lines-mode=
|
||||||
- Add =evil-collection=
|
- Add =evil-collection=
|
||||||
|
|
||||||
* Install
|
* Install
|
||||||
|
|
|
@ -74,16 +74,20 @@ Otherwise, revert to the default behavior (i.e. enable `evil-insert-state')."
|
||||||
(evil-escape-mode -1)))
|
(evil-escape-mode -1)))
|
||||||
|
|
||||||
|
|
||||||
;; vi-tilde-fringe
|
;; vim-empty-lines-mode
|
||||||
|
|
||||||
(defun spacemacs/disable-vi-tilde-fringe ()
|
(defun spacemacs/disable-vim-empty-lines-mode ()
|
||||||
"Disable `vi-tilde-fringe' in the current buffer."
|
"Disable `vim-empty-lines-mode' in the current buffer."
|
||||||
(vi-tilde-fringe-mode -1))
|
(vim-empty-lines-mode -1))
|
||||||
|
|
||||||
(defun spacemacs/disable-vi-tilde-fringe-read-only ()
|
(defun spacemacs/disable-vim-empty-lines-mode-read-only ()
|
||||||
"Disable `vi-tilde-fringe' in the current buffer if it is read only."
|
"Disable `vim-empty-lines-mode' in the current buffer if it is read only."
|
||||||
(when buffer-read-only
|
(when buffer-read-only
|
||||||
(spacemacs/disable-vi-tilde-fringe)))
|
(spacemacs/disable-vim-empty-lines-mode)))
|
||||||
|
|
||||||
|
;; Backward compatibility
|
||||||
|
(defalias 'spacemacs/disable-vi-tilde-fringe 'spacemacs/disable-vim-empty-lines-mode)
|
||||||
|
(defalias 'spacemacs/disable-vi-tilde-fringe-read-only 'spacemacs/disable-vim-empty-lines-mode-read-only)
|
||||||
|
|
||||||
|
|
||||||
;; lisp state
|
;; lisp state
|
||||||
|
|
|
@ -48,7 +48,7 @@
|
||||||
evil-visual-mark-mode
|
evil-visual-mark-mode
|
||||||
evil-visualstar
|
evil-visualstar
|
||||||
(hs-minor-mode :location built-in)
|
(hs-minor-mode :location built-in)
|
||||||
vi-tilde-fringe
|
(vim-empty-lines-mode :toggle dotspacemacs-evil-show-empty-line-indicators)
|
||||||
eldoc))
|
eldoc))
|
||||||
|
|
||||||
(defun spacemacs-evil/init-evil-anzu ()
|
(defun spacemacs-evil/init-evil-anzu ()
|
||||||
|
@ -417,27 +417,32 @@
|
||||||
(defun spacemacs-evil/init-hs-minor-mode ()
|
(defun spacemacs-evil/init-hs-minor-mode ()
|
||||||
(add-hook 'prog-mode-hook 'spacemacs//enable-hs-minor-mode))
|
(add-hook 'prog-mode-hook 'spacemacs//enable-hs-minor-mode))
|
||||||
|
|
||||||
(defun spacemacs-evil/init-vi-tilde-fringe ()
|
(defun spacemacs-evil/init-vim-empty-lines-mode ()
|
||||||
(spacemacs|do-after-display-system-init
|
(spacemacs|do-after-display-system-init
|
||||||
(use-package vi-tilde-fringe
|
(use-package vim-empty-lines-mode
|
||||||
:init
|
:init
|
||||||
(progn
|
(spacemacs/add-to-hooks (lambda () (vim-empty-lines-mode -1))
|
||||||
(global-vi-tilde-fringe-mode)
|
'(comint-mode-hook
|
||||||
(spacemacs|add-toggle vi-tilde-fringe
|
eshell-mode-hook
|
||||||
:mode global-vi-tilde-fringe-mode
|
eww-mode-hook
|
||||||
:documentation
|
shell-mode-hook
|
||||||
"Globally display a ~ on empty lines in the fringe."
|
term-mode-hook))
|
||||||
:evil-leader "T~")
|
|
||||||
;; don't enable it on some special buffers
|
|
||||||
(with-current-buffer spacemacs-buffer-name
|
|
||||||
(spacemacs/disable-vi-tilde-fringe))
|
|
||||||
(add-hook 'which-key-init-buffer-hook 'spacemacs/disable-vi-tilde-fringe)
|
|
||||||
;; after a major mode is loaded, check if the buffer is read only
|
|
||||||
;; if so, disable vi-tilde-fringe-mode
|
|
||||||
(add-hook 'after-change-major-mode-hook
|
|
||||||
'spacemacs/disable-vi-tilde-fringe-read-only)
|
|
||||||
;; TODO move this hook if/when we have a layer for eww
|
|
||||||
(spacemacs/add-to-hooks 'spacemacs/disable-vi-tilde-fringe
|
|
||||||
'(eww-mode-hook)))
|
|
||||||
:config
|
:config
|
||||||
(spacemacs|hide-lighter vi-tilde-fringe-mode))))
|
(progn
|
||||||
|
(spacemacs|hide-lighter vim-empty-lines-mode)
|
||||||
|
(global-vim-empty-lines-mode)
|
||||||
|
(spacemacs|add-toggle vim-empty-lines-mode
|
||||||
|
:mode global-vim-empty-lines-mode
|
||||||
|
:documentation
|
||||||
|
"Display an overlay of ~ on empty lines."
|
||||||
|
:evil-leader "t~")
|
||||||
|
;; Don't enable it where it is detrimental.
|
||||||
|
(dolist (x (list spacemacs-buffer-name
|
||||||
|
"*Messages*"))
|
||||||
|
(with-current-buffer x (vim-empty-lines-mode -1)))
|
||||||
|
(add-hook 'which-key-init-buffer-hook (lambda () (vim-empty-lines-mode -1)))
|
||||||
|
;; after a major mode is loaded, check if the buffer is read only
|
||||||
|
;; if so, disable vim-empty-lines-mode
|
||||||
|
(add-hook 'after-change-major-mode-hook (lambda ()
|
||||||
|
(when buffer-read-only
|
||||||
|
(vim-empty-lines-mode -1))))))))
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
(term :location built-in)
|
(term :location built-in)
|
||||||
xterm-color
|
xterm-color
|
||||||
terminal-here
|
terminal-here
|
||||||
vi-tilde-fringe
|
vim-empty-lines-mode
|
||||||
window-purpose
|
window-purpose
|
||||||
(vterm :toggle (not (spacemacs/system-is-mswindows)))))
|
(vterm :toggle (not (spacemacs/system-is-mswindows)))))
|
||||||
|
|
||||||
|
@ -332,8 +332,8 @@
|
||||||
"p \"" 'terminal-here-project-launch))))
|
"p \"" 'terminal-here-project-launch))))
|
||||||
|
|
||||||
|
|
||||||
(defun shell/post-init-vi-tilde-fringe ()
|
(defun shell/post-init-vim-empty-lines-mode ()
|
||||||
(spacemacs/add-to-hooks 'spacemacs/disable-vi-tilde-fringe
|
(spacemacs/add-to-hooks 'spacemacs/disable-vim-empty-lines-mode
|
||||||
'(comint-mode-hook
|
'(comint-mode-hook
|
||||||
eshell-mode-hook
|
eshell-mode-hook
|
||||||
shell-mode-hook
|
shell-mode-hook
|
||||||
|
|
|
@ -1,28 +0,0 @@
|
||||||
#+TITLE: Vim-empty-lines layer
|
|
||||||
|
|
||||||
#+TAGS: layer|vim
|
|
||||||
|
|
||||||
* Table of Contents :TOC_5_gh:noexport:
|
|
||||||
- [[#description][Description]]
|
|
||||||
- [[#features][Features:]]
|
|
||||||
- [[#install][Install]]
|
|
||||||
|
|
||||||
* Description
|
|
||||||
This layer is a drop-in replacement for the =vi-tilde-fringe= mode, for those
|
|
||||||
who desire behaviour closer to =vim='s.
|
|
||||||
|
|
||||||
It has better compatibility with retina displays, as it uses a text overlay
|
|
||||||
using your font, rather than a pixel-art tilde. The empty line indicators are
|
|
||||||
overlaid in within the buffer as in =vim=, and not in the fringe. The indicator
|
|
||||||
behaviour with trailing empty lines matches =vim='s behaviour.
|
|
||||||
|
|
||||||
For details, see the [[https://github.com/jmickelin/vim-empty-lines-mode][vim-empty-lines-mode]] repository.
|
|
||||||
|
|
||||||
** Features:
|
|
||||||
- Emulation of original vim behaviour.
|
|
||||||
- Brings you as close to vim as one can be without using vim itself.
|
|
||||||
|
|
||||||
* Install
|
|
||||||
To use this configuration layer, add it to your =~/.spacemacs=. You will need to
|
|
||||||
add =vim-empty-lines= to the existing =dotspacemacs-configuration-layers= list in this
|
|
||||||
file.
|
|
|
@ -1,33 +0,0 @@
|
||||||
(setq vim-empty-lines-packages
|
|
||||||
'(
|
|
||||||
vim-empty-lines-mode
|
|
||||||
(vi-tilde-fringe :excluded t)))
|
|
||||||
|
|
||||||
(defun vim-empty-lines/init-vim-empty-lines-mode ()
|
|
||||||
(use-package vim-empty-lines-mode
|
|
||||||
:init
|
|
||||||
(spacemacs/add-to-hooks (lambda () (vim-empty-lines-mode -1))
|
|
||||||
'(comint-mode-hook
|
|
||||||
eshell-mode-hook
|
|
||||||
eww-mode-hook
|
|
||||||
shell-mode-hook
|
|
||||||
term-mode-hook))
|
|
||||||
:config
|
|
||||||
(progn
|
|
||||||
(spacemacs|hide-lighter vim-empty-lines-mode)
|
|
||||||
(global-vim-empty-lines-mode)
|
|
||||||
(spacemacs|add-toggle vim-empty-lines-mode
|
|
||||||
:mode global-vim-empty-lines-mode
|
|
||||||
:documentation
|
|
||||||
"Display an overlay of ~ on empty lines."
|
|
||||||
:evil-leader "t~")
|
|
||||||
;; Don't enable it where it is detrimental.
|
|
||||||
(dolist (x (list spacemacs-buffer-name
|
|
||||||
"*Messages*"))
|
|
||||||
(with-current-buffer x (vim-empty-lines-mode -1)))
|
|
||||||
(add-hook 'which-key-init-buffer-hook (lambda () (vim-empty-lines-mode -1)))
|
|
||||||
;; after a major mode is loaded, check if the buffer is read only
|
|
||||||
;; if so, disable vim-empty-lines-mode
|
|
||||||
(add-hook 'after-change-major-mode-hook (lambda ()
|
|
||||||
(when buffer-read-only
|
|
||||||
(vim-empty-lines-mode -1)))))))
|
|
|
@ -256,7 +256,6 @@
|
||||||
- [[#evil-better-jumper][Evil-better-jumper]]
|
- [[#evil-better-jumper][Evil-better-jumper]]
|
||||||
- [[#evil-commentary][Evil-commentary]]
|
- [[#evil-commentary][Evil-commentary]]
|
||||||
- [[#evil-snipe][Evil-snipe]]
|
- [[#evil-snipe][Evil-snipe]]
|
||||||
- [[#vim-empty-lines][Vim-empty-lines]]
|
|
||||||
- [[#vinegar][Vinegar]]
|
- [[#vinegar][Vinegar]]
|
||||||
- [[#web-services][Web services]]
|
- [[#web-services][Web services]]
|
||||||
- [[#confluence][Confluence]]
|
- [[#confluence][Confluence]]
|
||||||
|
@ -931,7 +930,7 @@ Features:
|
||||||
- Evilification of various modes if the editing style is =vim= or =hybrid=
|
- Evilification of various modes if the editing style is =vim= or =hybrid=
|
||||||
- Improves the comment function to be able to also do the inverse operation
|
- Improves the comment function to be able to also do the inverse operation
|
||||||
- Persistent highlight of searched text with =evil-search-highlight-persist=
|
- Persistent highlight of searched text with =evil-search-highlight-persist=
|
||||||
- Display tildes in non-buffer area with =vi-tilde-fringe=
|
- Display tildes in non-buffer area with =vim-empty-lines-mode=
|
||||||
- Add =evil-collection=
|
- Add =evil-collection=
|
||||||
|
|
||||||
** Spacemacs-language
|
** Spacemacs-language
|
||||||
|
@ -3292,23 +3291,6 @@ Features:
|
||||||
- Support for alternative scopes for default search operations.
|
- Support for alternative scopes for default search operations.
|
||||||
- Support for alternative motions based on configurable regexps.
|
- Support for alternative motions based on configurable regexps.
|
||||||
|
|
||||||
** Vim-empty-lines
|
|
||||||
[[file:+vim/vim-empty-lines/README.org][+vim/vim-empty-lines/README.org]]
|
|
||||||
|
|
||||||
This layer is a drop-in replacement for the =vi-tilde-fringe= mode, for those
|
|
||||||
who desire behaviour closer to =vim='s.
|
|
||||||
|
|
||||||
It has better compatibility with retina displays, as it uses a text overlay
|
|
||||||
using your font, rather than a pixel-art tilde. The empty line indicators are
|
|
||||||
overlaid in within the buffer as in =vim=, and not in the fringe. The indicator
|
|
||||||
behaviour with trailing empty lines matches =vim='s behaviour.
|
|
||||||
|
|
||||||
For details, see the [[https://github.com/jmickelin/vim-empty-lines-mode][vim-empty-lines-mode]] repository.
|
|
||||||
|
|
||||||
Features:
|
|
||||||
- Emulation of original vim behaviour.
|
|
||||||
- Brings you as close to vim as one can be without using vim itself.
|
|
||||||
|
|
||||||
** Vinegar
|
** Vinegar
|
||||||
[[file:+vim/vinegar/README.org][+vim/vinegar/README.org]]
|
[[file:+vim/vinegar/README.org][+vim/vinegar/README.org]]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue