|
|
|
|
@ -364,11 +364,54 @@ |
|
|
|
|
; (hlinum-activate) |
|
|
|
|
#+END_SRC |
|
|
|
|
Add marker for current line in the fringe (see |
|
|
|
|
[https://github.com/kyanagi/fringe-current-line]) |
|
|
|
|
[https://github.com/kyanagi/fringe-current-line] and |
|
|
|
|
[https://github.com/nschum/fringe-helper.el]) |
|
|
|
|
#+BEGIN_SRC emacs-lisp |
|
|
|
|
(require 'fringe-current-line) |
|
|
|
|
(global-fringe-current-line-mode 1) |
|
|
|
|
(setq fcl-fringe-bitmap 'right-triangle) |
|
|
|
|
(fringe-mode 10) |
|
|
|
|
(require 'fringe-current-line) |
|
|
|
|
(global-fringe-current-line-mode 1) |
|
|
|
|
|
|
|
|
|
(defun +-fringe-helper-decimal (&rest strings) |
|
|
|
|
"Convert STRINGS into a vector usable for `define-fringe-bitmap'. |
|
|
|
|
Each string in STRINGS represents a line of the fringe bitmap. |
|
|
|
|
Periods (.) are background-colored pixel; Xs are foreground-colored. The |
|
|
|
|
fringe bitmap always is aligned to the right. If the fringe has half |
|
|
|
|
width, only the left 4 pixels of an 8 pixel bitmap will be shown. |
|
|
|
|
For example, the following code defines a diagonal line. |
|
|
|
|
\(+-fringe-helper-decimal |
|
|
|
|
\"XX......\" |
|
|
|
|
\"..XX....\" |
|
|
|
|
\"....XX..\" |
|
|
|
|
\"......XX\"\)" |
|
|
|
|
(unless (cdr strings) |
|
|
|
|
(setq strings (split-string (car strings) "\n"))) |
|
|
|
|
(apply 'vector |
|
|
|
|
(mapcar |
|
|
|
|
(lambda (str) |
|
|
|
|
(let ((num 0)) |
|
|
|
|
(dolist (c (string-to-list str)) |
|
|
|
|
(setq num (+ (* num 2) (if (eq c ?.) 0 1)))) |
|
|
|
|
num)) |
|
|
|
|
strings))) |
|
|
|
|
(define-fringe-bitmap '+-cursor-left-fringe-bitmap (+-fringe-helper-decimal |
|
|
|
|
"x......." |
|
|
|
|
"xx......" |
|
|
|
|
"xxx....." |
|
|
|
|
"xxxx...." |
|
|
|
|
"xxxxx..." |
|
|
|
|
"xxxxxx.." |
|
|
|
|
"xxxxxxx." |
|
|
|
|
"xxxxxxxx" |
|
|
|
|
"xxxxxxx." |
|
|
|
|
"xxxxxx.." |
|
|
|
|
"xxxxx..." |
|
|
|
|
"xxxx...." |
|
|
|
|
"xxx....." |
|
|
|
|
"xx......" |
|
|
|
|
"x.......") nil nil 'center) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(setq fcl-fringe-bitmap '+-cursor-left-fringe-bitmap) |
|
|
|
|
#+END_SRC |
|
|
|
|
|
|
|
|
|
** Turn on echo mode |
|
|
|
|
|