Disable golden-ratio by default and display a diminished lighter for it

when active
This commit is contained in:
syl20bnr 2014-09-29 22:27:59 -04:00
parent 224f8fb174
commit 6800b4c44d
2 changed files with 44 additions and 31 deletions

View File

@ -41,6 +41,7 @@
- [Buffers and Files](#buffers-and-files)
- [Bookmarks](#bookmarks)
- [Window manipulation](#window-manipulation)
- [Golden ratio](#golden-ratio)
- [Text manipulation commands](#text-manipulation-commands)
- [Change font size](#change-font-size)
- [Spell checking](#spell-checking)
@ -414,9 +415,6 @@ To save a new bookmark, just type the name of the bookmark and press `RET`.
### Window manipulation
Split windows are dynamically resized depending on whether they are selected or
not. Resizing is performed by the [golden-ratio][golden-ratio] mode.
Every window has a number displayed at the start of the mode-line and can
be quickly accessed using `<SPC> number`.
@ -454,6 +452,16 @@ Key Binding | Description
`<SPC> w v` | split a window vertically
`<SPC> w w` | cycle and focus between windows
#### Golden ratio
Split windows can be dynamically resized depending on whether they are selected
or not. Resizing is performed by the [golden-ratio][golden-ratio] mode.
By default `golden-ratio` if off.
The mode can be toggled on and off with:
<SPC> t g
### Text manipulation commands
Text related commands (start with `x`):
@ -595,6 +603,7 @@ The minor mode area can be toggled on and off with:
Lighter | Mode
-------------|-----------------------------------------------------------------
⊞ | [golden-ratio][golden-ratio] mode
Ⓐ | [auto-complete][auto-complete] mode
Ⓗ | [auto-highlight-symbol][auto-highlight] mode
Ⓒ | [centered-cursor][centered-cursor] mode

View File

@ -425,9 +425,6 @@ which require an initialization must be listed explicitly in the list.")
'(diminish 'elisp-slime-nav-mode))
(eval-after-load "hi-lock"
'(diminish 'hi-lock-mode))
(eval-after-load "golden-ratio"
'(diminish 'golden-ratio-mode))
(eval-after-load "abbrev"
'(diminish 'abbrev-mode)))
@ -722,33 +719,40 @@ which require an initialization must be listed explicitly in the list.")
(defun spacemacs/init-golden-ratio ()
(use-package golden-ratio
:defer t
:init
(golden-ratio-mode)
(evil-leader/set-key "tg"
'(lambda () (interactive)
(if (symbol-value golden-ratio-mode)
(progn (golden-ratio-mode -1)(balance-windows))
(golden-ratio-mode))))
:config
(setq golden-ratio-extra-commands
(append golden-ratio-extra-commands
'(evil-window-left
evil-window-right
evil-window-up
evil-window-down
select-window-0
select-window-1
select-window-2
select-window-3
select-window-4
select-window-5
select-window-6
select-window-7
select-window-8
select-window-9
ace-jump-mode-pop-mark
buf-move-left
buf-move-right
buf-move-up
buf-move-down
ess-eval-buffer-and-go
ess-eval-function-and-go
ess-eval-line-and-go)))))
(progn
(setq golden-ratio-extra-commands
(append golden-ratio-extra-commands
'(evil-window-left
evil-window-right
evil-window-up
evil-window-down
select-window-0
select-window-1
select-window-2
select-window-3
select-window-4
select-window-5
select-window-6
select-window-7
select-window-8
select-window-9
ace-jump-mode-pop-mark
buf-move-left
buf-move-right
buf-move-up
buf-move-down
ess-eval-buffer-and-go
ess-eval-function-and-go
ess-eval-line-and-go)))
(spacemacs//diminish golden-ratio-mode ""))))
(defun spacemacs/init-google-translate ()
(use-package google-translate