Moving to Doom Emacs!

This commit is contained in:
Derek Taylor
2019-12-16 20:21:19 -06:00
parent d9f2f456f1
commit d4b4c33550
683 changed files with 51877 additions and 100 deletions

View File

@@ -0,0 +1,57 @@
#+TITLE: ui/window-select
#+DATE: October 8, 2017
#+SINCE: v2.0.7
#+STARTUP: inlineimages
* Table of Contents :TOC:
- [[#description][Description]]
- [[#module-flags][Module Flags]]
- [[#packages][Packages]]
- [[#prerequisites][Prerequisites]]
- [[#features][Features]]
- [[#configuration][Configuration]]
- [[#ace-window][ace-window]]
- [[#switch-window][switch-window]]
* Description
This module provides several methods for selecting windows without the use of
the mouse or spatial navigation (e.g. =C-w {h,j,k,l}=).
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).
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).
** Packages
+ [[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=)
* Prerequisites
This module has no additional dependencies.
* TODO Features
* Configuration
This module provides two backends, both providing the same functionality, but
with different visual cues. They are =ace-window= and =switch-window=.
** ace-window
The first character of the buffers changes to a highlighted, user-selectable
character.
+ Pros: the content of the buffers are always visible.
+ Cons: The displayed characters are small and difficult to see.
** switch-window
Replaces the entire buffer with large letters.
+ Pros: The displayed characters are /really/ easy to see.
+ Cons: You can't see the contents of the buffers.

View File

@@ -0,0 +1,39 @@
;;; ui/window-select/config.el -*- lexical-binding: t; -*-
(use-package! switch-window
:when (featurep! +switch-window)
:defer t
:init
(global-set-key [remap other-window] #'switch-window)
:config
(setq switch-window-shortcut-style 'qwerty
switch-window-qwerty-shortcuts '("a" "s" "d" "f" "g" "h" "j" "k" "l")))
(use-package! ace-window
:unless (featurep! +switch-window)
:defer t
:init
(global-set-key [remap other-window] #'ace-window)
:config
(setq aw-keys '(?a ?s ?d ?f ?g ?h ?j ?k ?l)
aw-scope 'frame
aw-background t))
(use-package! winum
:when (featurep! +numbers)
:after-call doom-switch-window-hook
:config
(winum-mode +1)
(map! :map evil-window-map
"0" #'winum-select-window-0-or-10
"1" #'winum-select-window-1
"2" #'winum-select-window-2
"3" #'winum-select-window-3
"4" #'winum-select-window-4
"5" #'winum-select-window-5
"6" #'winum-select-window-6
"7" #'winum-select-window-7
"8" #'winum-select-window-8
"9" #'winum-select-window-9))

View File

@@ -0,0 +1,9 @@
;; -*- no-byte-compile: t; -*-
;;; ui/window-select/packages.el
(if (featurep! +switch-window)
(package! switch-window)
(package! ace-window))
(when (featurep! +numbers)
(package! winum))