Use margin-line-mode rather than fringe-line-mode

master
Jacopo De Simoi 6 years ago
parent 872591dbe6
commit d1eb7587bd
  1. 59
      global.org

@ -113,7 +113,6 @@
#+BEGIN_SRC emacs-lisp
(blink-cursor-mode 0)
(set-default 'cursor-type 'box)
(global-hl-line-mode t)
#+END_SRC
Set frame title
#+BEGIN_SRC emacs-lisp
@ -136,9 +135,10 @@
#+END_SRC
Try to get along with large margins
#+BEGIN_SRC emacs-lisp
(setq-default left-margin-width 2
right-margin-width 2)
; (set-window-buffer nil (current-buffer))
(setq-default left-margin-width 3
right-margin-width 3)
(fringe-mode 10)
;(set-window-buffer nil (current-buffer))
#+END_SRC
** Mouseless
@ -481,55 +481,12 @@
; (require 'hlinum)
; (hlinum-activate)
#+END_SRC
Add marker for current line in the fringe (see
Add marker for current line in the margin (see
[https://github.com/kyanagi/fringe-current-line] and
[https://github.com/nschum/fringe-helper.el])
[https://github.com/nschum/fringe-helper.el] for inspiration)
#+BEGIN_SRC emacs-lisp
(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)
(require 'margin-current-line)
(global-margin-current-line-mode 1)
#+END_SRC
** Turn on echo mode

Loading…
Cancel
Save