-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New VIM-like layouts - boon-colemak-hnei and boon-qwerty-hjkl (#132)
* Two new layouts: 'boon-qwerty-hjkl' and 'boon-colemak-hnei'
- Loading branch information
Showing
2 changed files
with
85 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
;;; boon/boon-colemak-hnei.el --- An Ergonomic VIM-like Command Mode -*- lexical-binding: t; -*- | ||
|
||
;;; Commentary: | ||
;;; Boon-colemak remapped to be more Vim-like. | ||
;;; Six of the eight movement keys (all except 'l' and ';') have been changed: | ||
;;; 'u' = move backward by sentence | ||
;;; 'y' = move forward by sentence | ||
;;; 'H' = move backward smarter (by word, element, etc.) | ||
;;; 'h' = move backward by character | ||
;;; 'N' = move faster down (forward-paragraph) | ||
;;; 'n' = move down by line (next-line) | ||
;;; 'e' = move up by line (previous-line) | ||
;;; 'E' = move faster up (backward-paragraph) | ||
;;; 'i' = move forward by character | ||
;;; 'I' = move forward smarter (by word, element, etc.) | ||
;;; In addition, the move commands mapped to h/H have been moved to o/O. | ||
|
||
;;; Code: | ||
(require 'boon-colemak) | ||
|
||
(define-key boon-moves-map "l" '("⇤" . boon-beginning-of-line)) | ||
(define-key boon-moves-map "u" 'backward-sentence) | ||
(define-key boon-moves-map "U" 'ignore) | ||
(define-key boon-moves-map "y" 'forward-sentence) | ||
(define-key boon-moves-map "Y" 'ignore) | ||
(define-key boon-moves-map ";" '("⇥" . boon-end-of-line)) | ||
|
||
(define-key boon-moves-map "H" '("⇠" . boon-smarter-backward)) ;word | ||
(define-key boon-moves-map "h" '("←" . backward-char)) ;character | ||
(define-key boon-moves-map "N" 'forward-paragraph) ;faster down | ||
(define-key boon-moves-map "n" '("↓" . next-line)) ;down | ||
(define-key boon-moves-map "e" '("↑" . previous-line)) ;up | ||
(define-key boon-moves-map "E" 'backward-paragraph) ;faster up | ||
(define-key boon-moves-map "i" '("→" . forward-char)) ;character | ||
(define-key boon-moves-map "I" '("→" . boon-smarter-forward)) ;word | ||
|
||
(define-key boon-moves-map "o" '("hOp" . avy-goto-word-1)) | ||
(define-key boon-moves-map "O" 'avy-goto-char) | ||
|
||
(provide 'boon-colemak-hnei) | ||
;;; boon-colemak-hnei.el ends here |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
;;; boon/boon-qwerty-hjkl.el --- An Ergonomic VIM-like Command Mode -*- lexical-binding: t; -*- | ||
|
||
;;; Commentary: | ||
;;; Boon-qwerty remapped to be more Vim-like. | ||
;;; Six of the eight movement keys (all except 'u' and 'p') have been changed: | ||
;;; 'i' = move backward by sentence | ||
;;; 'o' = move forward by sentence | ||
;;; 'H' = move backward smarter (by word, element, etc.) | ||
;;; 'h' = move backward by character | ||
;;; 'J' = move faster down (forward-paragraph) | ||
;;; 'j' = move down by line (next-line) | ||
;;; 'k' = move up by line (previous-line) | ||
;;; 'K' = move faster up (backward-paragraph) | ||
;;; 'l' = move forward by character | ||
;;; 'L' = move forward smarter (by word, element, etc.) | ||
;;; In addition, the move commands mapped to h/H have been moved to n/N. ("hop" has become "near") | ||
;;; The command mapped to n/N ("noon-walk") has been moved to m/M ("moon-walk") | ||
|
||
;;; Code: | ||
(require 'boon-qwerty) | ||
|
||
(define-key boon-moves-map "u" '("⇤" . boon-beginning-of-line)) | ||
(define-key boon-moves-map "i" 'backward-sentence) | ||
(define-key boon-moves-map "I" 'ignore) | ||
(define-key boon-moves-map "o" 'forward-sentence) | ||
(define-key boon-moves-map "O" 'ignore) | ||
(define-key boon-moves-map "p" '("⇥" . boon-end-of-line)) | ||
|
||
(define-key boon-moves-map "H" '("⇠" . boon-smarter-backward)) ;word | ||
(define-key boon-moves-map "h" '("←" . backward-char)) ;character | ||
(define-key boon-moves-map "J" 'forward-paragraph) ;faster down | ||
(define-key boon-moves-map "j" '("↓" . next-line)) ;down | ||
(define-key boon-moves-map "k" '("↑" . previous-line)) ;up | ||
(define-key boon-moves-map "K" 'backward-paragraph) ;faster up | ||
(define-key boon-moves-map "l" '("→" . forward-char)) ;character | ||
(define-key boon-moves-map "L" '("→" . boon-smarter-forward)) ;word | ||
|
||
(define-key boon-moves-map "n" '("near hop" . avy-goto-word-1)) | ||
(define-key boon-moves-map "N" 'avy-goto-char) | ||
(define-key boon-moves-map "m" '("moon walk" . boon-switch-mark)) | ||
(define-key boon-moves-map "M" 'xref-pop-marker-stack) | ||
|
||
(provide 'boon-qwerty-hjkl) | ||
;;; boon-qwerty-hjkl ends here |