space-doc: disable line numbers and resized images
Resize images to 600 pixel width (exclude README.org for now) Disable line numbers.
This commit is contained in:
parent
f147ec01e7
commit
dc822d5b9e
|
@ -246,7 +246,8 @@ and bugs are fixed quickly.
|
|||
|
||||
* Screenshots
|
||||
|
||||
/Python/ [[file:img/spacemacs-python.png]]
|
||||
[[file:img/spacemacs-python.png]]
|
||||
/Python/
|
||||
|
||||
*Note*: Even though screenshots are updated frequently, Spacemacs is evolving
|
||||
quickly and the screenshots may not reflect exactly the current state of the
|
||||
|
@ -283,9 +284,8 @@ Spacemacs. It is recommended to update the packages first; see the next section.
|
|||
Spacemacs will automatically check for a new version every startup. When it
|
||||
detects that a new version is available a arrow will appear in the modeline.
|
||||
Click it to update Spacemacs. You must restart Emacs after updating.
|
||||
|
||||
Update Button:
|
||||
[[file:img/powerline-update.png]]
|
||||
/Update Button/
|
||||
|
||||
*Note*: If you use the =develop= branch of Spacemacs, automatic update is
|
||||
disabled---you have to update manually using git.
|
||||
|
@ -961,11 +961,8 @@ The special property =:powerline-scale= is Spacemacs specific and it is for
|
|||
quick tweaking of the mode-line height in order to avoid crappy rendering of the
|
||||
separators like on the following screenshot (default value is 1.1).
|
||||
|
||||
/Ugly separators/
|
||||
|
||||
#+CAPTION: ugly-separators
|
||||
|
||||
[[file:img/crappy-powerline-separators.png]]
|
||||
/Ugly separators/
|
||||
|
||||
** GUI Toggles
|
||||
Some graphical UI indicators can be toggled on and off (toggles start with ~t~
|
||||
|
@ -1057,18 +1054,16 @@ separators render correctly.
|
|||
When [[https://github.com/flycheck/flycheck][Flycheck]] minor mode is enabled, a new element appears showing the number of
|
||||
errors, warnings and info.
|
||||
|
||||
#+CAPTION: powerline-wave
|
||||
|
||||
[[file:img/powerline-wave.png]]
|
||||
/Flycheck integration in mode-line/
|
||||
|
||||
**** Anzu integration
|
||||
[[https://github.com/syohex/emacs-anzu][Anzu]] shows the number of occurrence when performing a search. Spacemacs
|
||||
integrates nicely the Anzu status by displaying it temporarily when ~n~ or ~N~
|
||||
are being pressed. See the =5/6= segment on the screenshot below.
|
||||
|
||||
#+CAPTION: powerline-anzu
|
||||
|
||||
[[file:img/powerline-anzu.png]]
|
||||
/Anzu integration in mode-line/
|
||||
|
||||
**** Battery status integration
|
||||
[[https://github.com/lunaryorn/fancy-battery.el][fancy-battery]] displays the percentage of total charge of the battery as well as
|
||||
|
|
|
@ -46,11 +46,13 @@ keeping their content visible.
|
|||
|
||||
(defconst spacemacs--space-doc-modificators
|
||||
'(spacemacs//space-doc-set-space-doc-cache
|
||||
spacemacs//space-doc-hide-line-numbers
|
||||
spacemacs//space-doc-modf-emphasis-overlays
|
||||
spacemacs//space-doc-modf-meta-tags-overlays
|
||||
spacemacs//space-doc-modf-link-protocol
|
||||
spacemacs//space-doc-modf-org-block-line-face-remap
|
||||
spacemacs//space-doc-modf-org-kbd-face-remap
|
||||
spacemacs//space-doc-modf-resize-inline-images
|
||||
spacemacs//space-doc-modf-advice-org-do-emphasis-faces
|
||||
(lambda (flag) (spacemacs//space-doc-run-modfs-deferred
|
||||
'()
|
||||
|
@ -98,6 +100,13 @@ It is set by `spacemacs//space-doc-set-space-doc-cache'.")
|
|||
:btn-marker-face btn-marker-face
|
||||
:kbd-marker kbd-marker)))))
|
||||
|
||||
(defun spacemacs//space-doc-hide-line-numbers (&optional enable)
|
||||
"If ENABLE is non-nil then toggle off the line numbers."
|
||||
(if enable
|
||||
(spacemacs/toggle-line-numbers-off)
|
||||
(when dotspacemacs-line-numbers
|
||||
(spacemacs/toggle-line-numbers-on))))
|
||||
|
||||
(defun spacemacs//space-doc-org-do-emphasis-faces-advice (found)
|
||||
"If FOUND has non-nil value - modify emphasized regions
|
||||
appearances in the current buffer. The function uses
|
||||
|
@ -132,10 +141,10 @@ current buffer so piggybacking it should be pretty performant solution."
|
|||
The character should be one of the markers
|
||||
from `org-emphasis-alist'."
|
||||
|
||||
(let* ((beginnig-marker-overlay nil)
|
||||
(let* ((beginning-marker-overlay nil)
|
||||
(ending-marker-overlay nil))
|
||||
|
||||
(setq beginnig-marker-overlay
|
||||
(setq beginning-marker-overlay
|
||||
(make-overlay begin (1+ begin))
|
||||
ending-marker-overlay
|
||||
(make-overlay (1- end) end))
|
||||
|
@ -145,7 +154,7 @@ from `org-emphasis-alist'."
|
|||
(spacemacs//space-doc-cache-kbd-marker
|
||||
spacemacs--space-doc-cache))
|
||||
(progn
|
||||
(overlay-put beginnig-marker-overlay
|
||||
(overlay-put beginning-marker-overlay
|
||||
'face
|
||||
(spacemacs//space-doc-cache-btn-marker-face
|
||||
spacemacs--space-doc-cache))
|
||||
|
@ -160,7 +169,7 @@ from `org-emphasis-alist'."
|
|||
(beginning-of-line)
|
||||
(looking-at-p org-table-any-line-regexp))
|
||||
(progn
|
||||
(overlay-put beginnig-marker-overlay
|
||||
(overlay-put beginning-marker-overlay
|
||||
'face
|
||||
(spacemacs//space-doc-cache-marker-face
|
||||
spacemacs--space-doc-cache))
|
||||
|
@ -169,12 +178,12 @@ from `org-emphasis-alist'."
|
|||
(spacemacs//space-doc-cache-marker-face
|
||||
spacemacs--space-doc-cache)))
|
||||
|
||||
(overlay-put beginnig-marker-overlay
|
||||
(overlay-put beginning-marker-overlay
|
||||
'invisible t)
|
||||
(overlay-put ending-marker-overlay
|
||||
'invisible t)))
|
||||
|
||||
(overlay-put beginnig-marker-overlay
|
||||
(overlay-put beginning-marker-overlay
|
||||
'space-doc-emphasis-overlay t)
|
||||
(overlay-put ending-marker-overlay
|
||||
'space-doc-emphasis-overlay t)))
|
||||
|
@ -210,6 +219,16 @@ default."
|
|||
(face-remap-remove-relative
|
||||
spacemacs--space-doc-org-kbd-face-remap-cookie)))
|
||||
|
||||
(defun spacemacs//space-doc-modf-resize-inline-images (&optional enable)
|
||||
"If ENABLE is non nil then resize inline images."
|
||||
;; resizing is always performed even when the image is smaller
|
||||
;; so we don't resize in README.org buffers for now
|
||||
(let ((org-image-actual-width
|
||||
(and enable
|
||||
(not (string-match-p ".*README.org\\'" (buffer-file-name)))
|
||||
600)))
|
||||
(org-display-inline-images)))
|
||||
|
||||
(defun spacemacs//space-doc-modf-meta-tags-overlays (&optional enable)
|
||||
"If ENABLE has non-nil value - modify `org-mode' meta tags
|
||||
appearance in the current buffer. Otherwise - disable."
|
||||
|
|
Loading…
Reference in New Issue