From 666a5359f3a2e77f3c5de4bbb257654c8f965cdf Mon Sep 17 00:00:00 2001 From: Daniel Wu Date: Tue, 9 Dec 2014 20:02:55 -0500 Subject: [PATCH] bind reposition window to z f --- doc/DOCUMENTATION.md | 9 +++++++++ spacemacs/packages.el | 2 ++ 2 files changed, 11 insertions(+) diff --git a/doc/DOCUMENTATION.md b/doc/DOCUMENTATION.md index 5cd899e7b..987d77be8 100644 --- a/doc/DOCUMENTATION.md +++ b/doc/DOCUMENTATION.md @@ -63,6 +63,7 @@ - [Vim motions with ace-jump mode](#vim-motions-with-ace-jump-mode) - [Window manipulation](#window-manipulation) - [Resizing windows](#resizing-windows) + - [Reposition window](#reposition-window) - [Golden ratio](#golden-ratio) - [Buffers and Files](#buffers-and-files) - [Ido](#ido) @@ -957,6 +958,14 @@ The micro-state text in minibuffer display the following information: [WidthxHeight] Resize window: (H/L) shrink/enlarge horizontally, (J/K) shrink/enlarge vertically +#### Reposition window + +Key Binding | Description +--------------------|------------------------------------------------------------ +z f | Make current function or comments visible + +`z f` tries to accommodate current function or comments into window as much as possible. + #### Golden ratio If you resize windows like crazy you may want to give a try to [golden-ratio][]. diff --git a/spacemacs/packages.el b/spacemacs/packages.el index 246460c6e..d782c40c1 100644 --- a/spacemacs/packages.el +++ b/spacemacs/packages.el @@ -604,6 +604,8 @@ determine the state to enable when escaping from the insert state.") ;; Make evil-mode up/down operate in screen lines instead of logical lines (define-key evil-normal-state-map "j" 'evil-next-visual-line) (define-key evil-normal-state-map "k" 'evil-previous-visual-line) + ;; Make the current definition and/or comment visible. + (define-key evil-normal-state-map "zf" 'reposition-window) ;; quick navigation (define-key evil-normal-state-map (kbd "L") (lambda () (interactive)