vi-tilde-fringe is now available in MELPA

Also hide the lighter.
This commit is contained in:
syl20bnr 2014-10-28 13:34:14 -04:00
parent b36b43a054
commit 02241b1540
3 changed files with 8 additions and 107 deletions

View file

@ -20,7 +20,6 @@
o-blog
pylookup
spray
vi-tilde-fringe
))
;; Initialize the extensions
@ -158,8 +157,3 @@
(create-solarized-theme 'light 'solarized-light)
(spacemacs/post-theme-init 'solarized-light)
(redisplay))))
(defun spacemacs/init-vi-tilde-fringe ()
(use-package vi-tilde-fringe
:init
(global-vi-tilde-fringe-mode)))

View file

@ -1,101 +0,0 @@
;;; vi-tilde-fringe.el --- Displays tildes in the fringe on empty lines a la Vi.
;; Copyright (C) 2014 syl20bnr
;;
;;;; Author: Sylvain Benner <sylvain.benner@gmail.com>
;; Keywords: emulation
;; Created: 27 Oct 2014
;; Version: 1.0
;; Package-Requires: ((emacs "24"))
;; URL: https://github.com/syl20bnr/vi-tilde-fringe
;; This file is not part of GNU Emacs.
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
;; Usage
;; -----
;; To toggle the mode locally:
;; M-x vi-tilde-fringe-mode
;;
;; To toggle the mode globally:
;; M-x global-vi-tilde-fringe-mode
;;
;; To turn it on automatically only for programming modes:
;; (add-hook 'prog-mode-hook 'vi-tilde-fringe-mode)
;;
;; Customization
;; -------------
;;
;; Open the customization group buffer:
;; M-x customize-group RET vi-tilde-fringe RET
;;
;; There you can change the bitmap array or the face of the symbol drawn in
;; the fringe. By default the symbol is a tilde :-) and its face simply
;; inherits from `default'.
;;; Code:
(defgroup vi-tilde-fringe nil
"Vi tilde fringe customizations."
:group 'emulations
:prefix 'vi-tilde-fringe-)
(defface vi-tilde-fringe-face '((t (:inherit 'default)))
"Color for vi tilde displayed in the fringe when line is empty."
:group 'vi-tilde-fringe)
(defcustom vi-tilde-fringe-bitmap-array
[#b00000000
#b00000000
#b00000000
#b01110001
#b11011011
#b10001110
#b00000000
#b00000000]
"Bitmap array drawn in the fringe."
:type 'sexp)
;;;###autoload
(define-minor-mode vi-tilde-fringe-mode
"Buffer-local minor mode to display tildes in the fringe when the line is
empty."
:lighter " ~"
:group 'emulations
(if vi-tilde-fringe-mode
(progn
(define-fringe-bitmap 'vi-tilde-fringe-bitmap
vi-tilde-fringe-bitmap-array nil nil 'center)
(setq indicate-empty-lines t)
(add-to-list 'fringe-indicator-alist
'(empty-line . vi-tilde-fringe-bitmap)))
(setq indicate-empty-lines nil)))
;;;###autoload
(define-globalized-minor-mode global-vi-tilde-fringe-mode vi-tilde-fringe-mode
vi-tilde-fringe-mode--turn-on
:group 'vi-tilde-fringe)
(defun vi-tilde-fringe-mode--turn-on ()
(unless (minibufferp)
(vi-tilde-fringe-mode +1)))
(provide 'vi-tilde-fringe)
;;; vi-tilde-fringe.el ends here

View file

@ -115,6 +115,7 @@
tagedit
tern-auto-complete
undo-tree
vi-tilde-fringe
visual-regexp-steroids
volatile-highlights
wand
@ -1801,6 +1802,13 @@ DELETE-FUNC when calling CALLBACK.
:config
(spacemacs//hide-lighter undo-tree-mode)))
(defun spacemacs/init-vi-tilde-fringe ()
(use-package vi-tilde-fringe
:init
(global-vi-tilde-fringe-mode)
:config
(spacemacs//hide-lighter vi-tilde-fringe-mode)))
(defun spacemacs/init-visual-regexp-steroids ()
(use-package visual-regexp-steroids
:defer t