2019-05-09 21:31:23 -04:00
|
|
|
#+TITLE: ui/window-select
|
|
|
|
#+DATE: October 8, 2017
|
|
|
|
#+SINCE: v2.0.7
|
|
|
|
#+STARTUP: inlineimages
|
2017-10-08 23:34:25 +02:00
|
|
|
|
2018-01-04 03:24:00 -05:00
|
|
|
* Table of Contents :TOC:
|
2019-05-09 21:31:23 -04:00
|
|
|
- [[#description][Description]]
|
|
|
|
- [[#module-flags][Module Flags]]
|
|
|
|
- [[#packages][Packages]]
|
|
|
|
- [[#prerequisites][Prerequisites]]
|
|
|
|
- [[#features][Features]]
|
2018-01-04 03:24:00 -05:00
|
|
|
- [[#configuration][Configuration]]
|
|
|
|
- [[#ace-window][ace-window]]
|
|
|
|
- [[#switch-window][switch-window]]
|
2017-10-08 23:34:25 +02:00
|
|
|
|
2019-05-09 21:31:23 -04:00
|
|
|
* Description
|
2019-05-09 21:39:16 -04:00
|
|
|
This module provides several methods for selecting windows without the use of
|
2019-11-24 14:57:14 -05:00
|
|
|
the mouse or spatial navigation (e.g. =C-w {h,j,k,l}=).
|
2019-05-09 21:31:23 -04:00
|
|
|
|
2019-11-24 14:57:14 -05:00
|
|
|
The command ~other-window~ is remapped to either ~switch-window~ or
|
|
|
|
~ace-window~, depending on which backend you've enabled. It is bound to ~C-x o~
|
|
|
|
(and ~C-w C-w~ for evil users).
|
2018-01-04 03:24:00 -05:00
|
|
|
|
2019-05-09 21:39:16 -04:00
|
|
|
It also provides numbered windows and selection with the ~winum~ package, if
|
|
|
|
desired. Evil users can jump to window N in =C-w <N>= (where N is a number
|
|
|
|
between 0 and 9). Non evil users have =C-x w <N>= instead.
|
|
|
|
|
|
|
|
** Module Flags
|
|
|
|
+ =+switch-window= Use the switch-window package as the backend, instead of
|
|
|
|
ace-window (avy).
|
|
|
|
+ =+numbers= Enable numbered windows and window selection (using winum).
|
2018-01-04 03:24:00 -05:00
|
|
|
|
2019-05-09 21:31:23 -04:00
|
|
|
** Packages
|
2019-05-09 21:39:16 -04:00
|
|
|
+ [[https://github.com/dimitri/switch-window][switch-window]] (if =+switch-window=)
|
|
|
|
+ [[https://github.com/abo-abo/ace-window][ace-window]] (if =+switch-window= isn't enabled)
|
|
|
|
+ [[https://github.com/deb0ch/emacs-winum][winum]] (if =+numbers=)
|
2018-01-04 03:24:00 -05:00
|
|
|
|
2019-05-09 21:31:23 -04:00
|
|
|
* Prerequisites
|
|
|
|
This module has no additional dependencies.
|
2018-01-04 03:24:00 -05:00
|
|
|
|
2019-05-09 21:39:16 -04:00
|
|
|
* TODO Features
|
2018-01-04 03:24:00 -05:00
|
|
|
* Configuration
|
|
|
|
This module provides two backends, both providing the same functionality, but
|
|
|
|
with different visual cues. They are =ace-window= and =switch-window=.
|
2017-10-08 23:34:25 +02:00
|
|
|
|
|
|
|
** ace-window
|
2018-01-04 03:24:00 -05:00
|
|
|
The first character of the buffers changes to a highlighted, user-selectable
|
|
|
|
character.
|
|
|
|
|
2019-05-09 21:31:23 -04:00
|
|
|
+ Pros: the content of the buffers are always visible.
|
2020-06-25 22:43:37 -04:00
|
|
|
+ Cons: The display characters are small and difficult to see (see below for a way to enlarge them).
|
2020-06-25 19:30:37 -04:00
|
|
|
|
|
|
|
**** Custom font-face example
|
|
|
|
This changes the ace-window display to show a white letter with a red background. The box attribute adds some padding.
|
|
|
|
#+BEGIN_SRC elisp
|
2020-06-25 22:43:37 -04:00
|
|
|
(custom-set-faces!
|
|
|
|
'(aw-leading-char-face
|
|
|
|
:foreground "white" :background "red"
|
|
|
|
:weight bold :height 2.5 :box (:line-width 10 :color "red")))
|
2020-06-25 19:30:37 -04:00
|
|
|
#+END_SRC
|
2017-10-08 23:34:25 +02:00
|
|
|
|
|
|
|
** switch-window
|
2018-01-04 03:24:00 -05:00
|
|
|
Replaces the entire buffer with large letters.
|
2017-10-08 23:34:25 +02:00
|
|
|
|
2018-01-04 03:24:00 -05:00
|
|
|
+ Pros: The displayed characters are /really/ easy to see.
|
|
|
|
+ Cons: You can't see the contents of the buffers.
|