Git Product home page Git Product logo

boon's Introduction

Join the chat at https://gitter.im/boon-mode/Lobby MELPA MELPA-Stable

Boon: An Ergonomic Command Mode for Emacs

Boon is a complete package for modal editing, which is not Evil.

Strong points:

  • Ergonomic: common commands are easy to type.
  • Emacs-friendly: Emacs conventions are respected as much as compatible with design goals. This means that Boon integrates well with existing Emacs infrastructure, and leverages it. Existing user configuration can often be re-used.
  • Modular: No need to buy into the whole system: mix-and-match the parts you want.

Ergonomic Design

It is largely accepted that modal editing is more ergonomic than using key-chords. Boon attempts to take this advantage to its conclusion, making modal editing as comfortable as possible, by adhering to the following design principles:

  • Spacial allocation first, mnemonics second: the allocation of keys to commands is primarily based on the locations of keys on the keyboard. Whatever is printed on the key cap is a secondary concern.

  • Easy finger rolls: common key combinations should either be left/right hand alternation or easy one-hand rolls.

  • Use of home row and strong fingers for the most used commands.

  • Easy navigation: many keys are allocated to navigation. This strategy facilitates moving around, which is in fact the most common task when editing text. Because movements double up as region-definitions, this design also makes manipulation commands more powerful.

  • Prefer an easy two-keystroke combination to a single hard-to-reach key. Hard-to-reach keys are free for the user to bind to rarely used commands (often user and mode-dependenent).

In command mode, movement keys are bound to the right hand, while text manipulation is bound to the left hand. This division of tasks is reminiscent of game-console controllers.

Right-hand.

The leftwards (and upwards) movements are bound to the leftmost fingers (index and middle finger), while rightwards (and downwards) movements are bound to the rightmost fingers (ring finger and pinky.) Additional unpaired movements are bound to the middle column, which is reached with an extension of the index finger.

Left-hand.

The most common editing commands (cut, paste, parenthesis manipulation) are bound to the home row. The top row is (mainly) for searching. The bottom row gives access to user-defined (C-x) and mode-specific shortcuts (C-c), insert mode, and registers.

Emacs integration

  1. C-x and C-c shortcuts. Any 'C-x ' command is available via 'x '. (drop the 1st "Control"). Thus 'x s' will save all buffers, etc. C-c C- shortcuts are now typed simply as "c ". This means that no special configuration is required when you start using a new major or minor mode.

  2. 'Special' modes. Emacs already has several modes which have a modal interface. (Dired, Magit, etc.) Instead of re-inventing the wheel, Boon leaves these modes alone (mostly). Only the 'x' key is stolen by Boon (so splitting windows, switching buffers, etc. keep their usual shortcut.)

  3. Command repeats. Boon does not use its own mechanism to repeat commands: it simply uses the Emacs standard way. Commands which contain an insertion (eg. replace current word by something else) are properly recorded in Emacs command history. Emacs command history remains fully usable with Boon.

  4. Parsing commands. Boon does not have a special way to parse commands. Everything is done using Emacs keymaps and interactive arguments.

  5. Customize-friendly. Quick customization is easily done using M-x customize-group boon. (re)-Defining keys in the boon-...-keymaps is also supported.

  6. Multiple-cursors support. System of selectors supports multiple-cursors: (multiple regions will be returned when multiple cursors are active).

Modular design

Boon is designed as set of modules, largely independent of each other. Each module is customizable and provides reusable components, in following the Emacs spirit of hackability. This means that even if you disagree with the design choices explained above, you may still want to use some parts of Boon. The structure of Boon is as follows:

  1. boon-moves.el and boon-search.el provide a set of move and search commands. These work the same way as standard Emacs commands --- they are merely more powerful (or just have different emphasis). Layout-frontends typically bind these commands (in addition to standard ones) in the boon keymaps.
  2. boon-arguments.el provides a set of selectors to define regions. (These selectors are the equivalent of vim 'text objects'). Selectors include plain regions (words, lines, paragraphs, ...), but also region transformers (think: exclude borders, just borders, including spaces, "foreach", etc.). Additionally every move command (in the boon-moves-map keymap) can be used as a selector which means that they are easily customized.
  3. boon-core.el provides an infrastructure for modal editing. The implementation draws much inspiration from evil-core, but is heavily simplified.
  4. boon-main.el provides a set of commands. These are similar to standard Emacs commands, but they use the system of selectors described above. (For good measure, some random extra commands are thrown in.) These commands may be used in combination with a modal system or not. A few commands also switch to insert mode.
  5. boon-keys.el, boon-colemak.el, boon-qwerty.el, etc. are (layout-specific) frontends. Those require all the above and provide a mapping of moves, selectors and commands onto keys.

Installation

REQUIREMENTS

  • Emacs version >= 25.1
  • Qwerty, Qwertz or Colemak layout (Workman version partially implemented -- contributions welcome).

Install Boon (perhaps using MELPA), and add the following to your configuration:

(require 'boon-colemak)
;; (require 'boon-qwerty) ;; for qwerty variant

Then

(boon-mode) ;; to enable boon everywhere

If you just eval'ed the above (or just did not want to enable boon everywhere), Boon may not be active in the current buffer. If it is not activated and you want to try it locally, activate it by

M-x turn-on-boon-mode

Usage

You can jump-start by reading any of the cheat sheets (colemak, qwerty) directly, but reading through the tutorial is highly recommended:

(require 'boon-tutorial)
M-x boon-tutorial

(You'll get the version of the tutorial adapted to the layout-frontend you have activated, qwerty, colemak, etc.)

Configuration

The main variables to configure are:

  • boon-select-map, boon-moves-map, boon-command-map, boon-insert-map, boon-special-map. (Those are keymaps.)

  • boon-enclosures (can be customized.)

If you use powerline (or mutatis mutandis spaceline), you may want to:

(require 'boon-powerline)
(boon-powerline-theme) ;; if you want use powerline with Boon
  • Per-mode keybinding can be implemented by setting the boon-map property of the mode symbol. Example:

    (let ((map (make-sparse-keymap))) (set-keymap-parent map boon-command-map) (define-key map "j" 'org-open-at-point-global) (put 'org-mode 'boon-map map))

Comparison with other modal layers for Emacs

If possible I would have liked not to develop Boon (or parts of it) and use an existing package. Hence I have looked into other options and have documented my research below. In summary, even though I would like to share code and/or replace parts of Boon with similar package, at the moment no package offers enough that I feel the urge to try and use them. This is partly due to the fact that Boon maintenance burden is fairly low. (And at the time of inception, the only conceivable alternative was Evil.)

  • Evil

    Evil is a (quite) complete vi emulation layer for Emacs.

    In contrast, in Boon, much of Emacs structure is leveraged and user experience is retained. Examples: the x key gives the C-x prefix map. The usual Emacs (interactive) arguments are used for text objects. Thus most of Boon remains usable even if one does not wish to use modal editing.

    Besides, the vi keybindings do not provide the best ergonomics (IMO).

    Making a boon-like layer on top of Evil appears theoretically possible, but I judge that the amount of work to gain an understanding of the code such that this would be practical would require more work than using Boon separately. Additionally, Emacs integration would still be poorer.

  • Xah Fly Keys http://ergoemacs.org/misc/ergoemacs_vi_mode.html

    Like boon, Xah Fly Keys (hereafter abbreviated to XFK) aims at providing a layout whose design is ergonomic. (According to the author it constitutes "the most efficient editing system in the universe".) Regardless, there follows a comparison based on my understanding.

    1. As far as I can tell XFK has no notion of selectors (vim's ``text objects''). Instead some keys are specially purposed to delete specific chunks of texts. Boon has a smaller set of useful commands and modifiers which can be combined in useful ways. It leaves keys for more "clever" navigation commands (eg. browsing errors) and editing shortcuts (eg. replace and insert in one keystroke).

    2. XFK binds digits to actions, boon leaves them for prefixes. (I may be misunderstanding here --- perhaps they are bound to special characters.)

    3. XFK seem to have less of a systematic assignment of keys to actions, even though the movements are roughly bound to the right hand. I believe that a more systematic binding startegy is easier to learn.

    4. Boon provides 1-key access to C-x and C-c prefixes. Instead, XFK puts everything under a single "leader key" (space), presumably without preserving emacs convention.

    5. The set of supported layouts is different. (Even though I'd expect ports to be easy.) As far as I can see, XFK has an automatic way to construct maps for a new keyboard layout. This is a worthy idea, but unfortunately boon already uses ad-hoc mapping depending on the layout, so adopting this strategy is not backwards compatible.

  • Fingers https://github.com/fgeller/fingers.el

    Fingers borrows a few ideas from Boon, including the division of work between left and right hand. The author (fgeller) gives a detailed account of the particular differences with Boon. My opinion is that Fingers is compatible with Boon concepts and could (and probably should) be implemented as a Boon layout-frontend.

  • Modalka https://github.com/mrkkrp/modalka

    Modalka is an engine to "introduce native modal editing of your own design". Thus its purpose is similar to boon-core.el. It could be possible and beneficial in the future to replace parts of boon-core with a dependency on Modalka. However at the moment it does not seem suitable. The main issue is that modalka does not support several states; it can only be either activated or not. Also, this part of Boon is sufficently simple that adding a dependency may be more troublesome than helpful.

  • RYO modal mode https://github.com/Kungsgeten/ryo-modal

    RYO modal has the same purpose as Modalka and boon-core; it is also a candidate to replace boon-core.el, but still falls short. Compared to Modalka, it provides support for repeating a command. However boon can repeat insertion commands, while RYO modal cannot. Additionally it also suffers from having a single non-insertion state.

  • God-mode https://github.com/emacsorphanage/god-mode

    God-mode is similar to "sticky modifier keys" in principle. Its simplicity allows to quickly get up to speed with it. However, it lacks the main benefit of a true modal layer: text operators. (what vi people call a "language for text editing"). Boon integrates god-mode functionality for the C-c prefix map specifically (bound to the c key).

  • Modal Mode http://retroj.net/modal-mode (Last updated in 2014)

    Another modal layer for Emacs, which is also lightweight and aims to integrate with Emacs. However, as far as I can see, there is no special attention paid to ergonomics.

boon's People

Contributors

aaronjensen avatar antifuchs avatar aspiwack avatar bernardjoseph avatar contrapunctus-1 avatar dkellner avatar duianto avatar emacsomancer avatar feltcat avatar gitter-badger avatar ivan-krukov avatar jacmoe avatar joelpet avatar jyp avatar moesasji avatar snan avatar syohex avatar tomterl avatar ttuegel avatar vale981 avatar yantar92 avatar zhaojiangbin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

boon's Issues

smarter-backward not jumping correctly with counts

When using smarter-backward to jump defined number of words the behavior is not correct on the current master.

Testcase
One Two Three Four
Five Six Seven Eight

Jumping words in the above with 2 followed by smarter-forward (C-u 2 o) jumps two words at a time as expected. For the equivalent 2 followed by smarter-backward jumps are however not correct. In the above testcase jumps are both one and 2 words in length, while all these jumps should be two words long.

In case it helps: error-message displayed: "Looking-back: Invalid search bound (wrong side of point)"

Make keymaps buffer local

Sometimes, I want to chenge the meaning of, say, boon-smarter-downward in specific buffers. For example, it makes more sense for me to use org-next-visible-heading binded to the same key as boon-smarter-downward.

Is it possible to set the keymap changes only for the current buffer?

Add copy operator

Like d operator but with kill-ring-save instead of kill-region maybe using y in qwerty.

Boon command mode and chinese-py input method

When chinese-py is selecteed as input method, moving commands (i.e. "o") in boon command mode trigger inserting characters, which is not expected behavior.

Steps to reproduce:

  1. emacs -Q
  2. Load the following config:
 (require 'package)
  (setq package-archives '(("MELPA" . "https://melpa.org/packages/") ("ELPA" . "http://tromey.com/elpa/") ("gnu" . "http://elpa.gnu.org/packages/") ("org" . "http://orgmode.org/elpa/"))
	load-prefer-newer t
	package-user-dir "~/.emacs.d/elpa/"
	package--init-file-ensured t
	package-enable-at-startup nil)
  (unless (file-directory-p package-user-dir)
    (make-directory package-user-dir t))
  (setq load-path (append '("~/.emacs.d/site-lisp/") load-path))
  (setq load-path (append (directory-files "~/.emacs.d/site-lisp/" t "^[^.]" t) load-path))
  (setq load-path (append (directory-files package-user-dir t "^[^.]" t) load-path))
  (add-hook 'after-init-hook #'package-initialize)
  (package-initialize 'NO-ACTIVATE)
(require 'use-package)
(use-package diminish :ensure t)
(require 'bind-key)

(use-package boon :ensure t
:config
(use-package boon-qwerty))

  1. M-x turn-on-boon-mode
  2. C-\ chinese-py
  3. o ;; the chinese input is triggered instead of moving next line

Per mode keybindings

I saw in #25 and #31 that there's some interest in having boon state keybindings in a per mode basis. I'd like to share one way of how I've implemented it. If there's enough interest in the full functionality of this, I can make a PR. Or maybe it could be put in the boon wiki.

The idea

The following buffer local symbols are added to emulation-mode-map-alists:

  • One for the major-mode: boon-major-mode-map-alist
    • The format of its value is the same as boon-mode-map-alist.
    • It updates to point to the keymap alist for the active major mode (e.g., boon-org-mode-map-alist) or nil.
  • One for minor modes: boon-minor-mode-map-alist
    • The format of its value is the same as minor-mode-map-alist.
    • When there's a change of boon state, it updates to point to a corresponding keymap alist:
      • boon-minor-mode-command-map-alist
      • boon-minor-mode-special-map-alist
      • boon-minor-mode-insert-map-alist

The functions boon-boonify-major-name and boon-boonify-minor-name setup the extra keymaps and alists for a mode.

Sample implementation

To keep things simple, I've done it only for command state:

boon-boonify.el

Sample usage

With org-mode, I'd like to follow links with the Enter key when I'm in command state, but always insert newlines otherwise.

First, I run this once:

(boon-boonify-major-name 'org-mode)

It will create a keymap named boon-org-mode-command-map. Then:

(define-key boon-org-mode-command-map (kbd "RET") 'org-return)
(define-key org-mode-map              (kbd "RET") 'boon-newline-dwim)

(edit: moved code to gist; improved the idea a bit)

Boon removing selection when switching mode

If I select a region then go into insert mode the region is unselected, is there an option to stop this from happening ?

This is quite annoying if you use expand-region in command mode then want to enter insert mode for example.

A binding for C-u C-c

I've come across a mode that binds something useful to C-u C-c C-<something>. I could work around this with some custom configuration, but in the spirit of being as compatible with existing modes as possible, I'm wondering if it would be worth adding a binding that resolves to C-u C-c C-.

I can suggest using C for this.

Block changing to CMD mode in special modes

So while modes in the Boon Special Mode List start in SPC mode, they still enter CMD mode on ESC, requiring vto return to SPC mode. (I'm using a CapsLck-as-both-Ctrl-and-ESC thing, so it's easy to accidentally turn on CMD mode in a SPC mode buffer.) Can't this just be blocked?

tutorial: outdated special buffers instruction?

The special buffers sections last sentence says:

You can get the original behavior of x keys by prefixing it
with (').

boon/boon-tutorial.el

Lines 533 to 534 in 675719e

You can get the original behavior of x keys by prefixing it
with (\\<boon-special-map>\\[boon-quote-character]).

But this doesn't seem to be true, because x works, the minibuffer shows: x-
and for example: x o switches to another window.

Pressing: ' x
in for example a help buffer, shows:
Buffer is read-only: #<buffer *Help*>

Maybe the last line in the special buffers section could be removed.

Everything gets highlighted when searching for a period

Everything gets highlighted when searching for a: . (period)

one.
two.
one.
two.

When e SPC searching for: .
before pressing RET then the cursor jumps to the next occurrence of a ., and all periods are highlighted, but when RET is pressed, then all characters becomes highlighted.

This is most likely because the . is detected as a regexp "any" character.

In this state, the region is below the highlight, this makes it difficult to see what's selected.

The workarounds are to either search for a short word, or to un-highlighting with:
C-x w r RET or M-s h u RET

But it might be better if everything didn't become highlighted when one is trying to jump to a period by searching for it.

boon-20181014.927
GNU Emacs 26.1 (build 1, x86_64-w64-mingw32) of 2018-05-30
Windows 10

Discussion: what to do with (qwerty) `e` and `w`?

There used to be two prefixes (e and w) which lead to a number of search commands. E.g. e was bound to isearch.

After an update to the latest build, today, they appear to have been replaced by boon-navigate-forward (resp backward). And I can't locate bindings for isearch, for instance.

Boon not working in special modes

Should I be able to use boon in special buffers like messages buffers, currently its active for most buffers but not for buffers like this.

Also similar question for things like helm magit and diff should it be easy enough to make boon work with these perhaps, trying to replace shortcuts so everything is consistant across all buffers.

How to: add a key map under x in command mode

I use projectile, which defines a keymap, I bound this keymap to C-x p like this:

(use-package projectile
  :ensure t
  :bind-keymap
  ("C-x p" . projectile-command-map)

However, if I use x p in command mode, emacs complain that (from *Messages*):

use-package-autoload-keymap: Key sequence x p starts with non-prefix key x

I'm not sure what I should do to make this work properly.

I'll transform the answer in this thread into a documentation PR.

[suggestion] implement repeat last command using dot-mode minor mode

I've been looking at Boon as an alternative to Evil as the keybindings make a lot more sense on Colemak, but the big thing missing seems to be the "repeat last command" and in your todo.org you say you don't know how to implement it.

Have you considered using the dot-mode minor mode to get this to work? See: https://github.com/wyrickre/dot-mode

Based on the description it looks like it should get most of the functionality that is needed (if not all).

When switch to insert mode cancel if buffer is readonly

When I am in a buffer using command mode and switch to insert mode if the buffer is read only it causes issues.

Basically it should stay in command mode currently it seems to leave me in a mode that is neither insert or command mode so my keybindings no longer work.

Perhaps check current buffers status before changing mode no sense even trying to use insert mode if the buffer is read only.

Why the boon-helm-command-state stuff?

I noticed that you go through some effort to bind escape to helm-keyboard-quit. Why is that? It looks like someone else has encountered (possibly) the same problem and I've pointed them to your config here. Maybe you could elaborate why it had to be done that way and couldn't be done with a simple:

(define-key helm-map [escape] 'helm-keyboard-quit)

Use Insert mode for special buffers

For me personally, having a special mode for special buffers like dired causes confusion. In ansi-term for example, I have to quote x or call boon-insert before typing. Is there a built in way to use Insert mode for special buffers? I am brand new to elisp, but I am willing to do the work if you could point me in the right direction.

Thanks!

Boon-c-god and lambda binding

Boon-c-god does not allow to bind lambda functons.
For example, (bind-key "C-c C-b" (lambda () (interactive) (org-edit-special)) org-mode-map) and c b in command mode does not execute the lambda.

The issue in the code is indicated below:

(defun boon-c-god (arg)
...
    (while (and binding
                (or (eq binding 'mode-specific-command-prefix)
                    ;; if using universal prefix, the above will happen.
                    (not (symbolp binding)))) ;; <<--- this line only considers symbol bindings

boon-qsearch-next-at-point `e s` jumps to part of words

e s jumps to occurrences that are part of words.

one
two
bone
two

With the cursor on the first line.
pressing: e s
highlights the first word one, but it also highlights and jumps to one in the word bone

boon-20181014.927
GNU Emacs 26.1 (build 1, x86_64-w64-mingw32) of 2018-05-30
Windows 10

Starting a buffer in insert mode

I want my LaTeX documents to start in insert mode rather than command mode, but adding

'boon-set-insert-like-state
or
'boon-set-insert-state

to the hook does nothing. Documents are still opened in CMD mode.

Strange behavior on arrow keys with 'boon-drop-mark

When making a selection by pressing "SPC" in Command mode, some strange behavior appears:

Replicate:

  1. Press "SPC". Minibuffer shows "mark 0"
  2. Press any arrow key ex. "down", mini buffer displays "Wrong type argument: number-or-marker-p, down"

In my setup the down key is bound to " 'next-line". So is "k", however if I press "k" rather than down, the next line down is selected as expected. Also if I press "k" or any other non-arrow key bound to moving between lines or chars first, I can freely use the arrow keys to control the selection afterwards. There is only a problem if an arrow key is the first key pressed after "SPC". The problem is not present if I envoke 'set-mark-command

Special state not working in magit-blame-mode

To reproduce:

  1. Enable boon everywhere with boon-mode.
  2. Open a file tracked by git, then M-x magit-blame. I'd expect that mode line to show "SPC" at this point but its shows "CMD" instead. The keys from boon-command-map block the keys of the magit-blame keymaps.
  3. In the same buffer, run M-x boon-local-mode twice to turn the mode off, then back on. Mode-line now shows "SPC" and the special map is active. Can use the magit-blame keys now.
  4. However, after the magit-blame-mode quits, the buffer stays in the special state instead of going back to the state before magit-blame started.

Running master at commit 0c25219.

turn-off-boon-mode doesn't seem to work

’M-x turn-off-boon-mode’ doesn't disable the keybindings.

The only difference seems to be that the modeline indicator is removed: Boon:

boon-20181014.927
GNU Emacs 26.1 (build 1, x86_64-w64-mingw32) of 2018-05-30
Windows 10

Docs: RYO modal repeat

Hi! Just a small thing, but the documentation mentions that RYO modal doesn't work with the Emacs repeat command. Since version 0.4 (February 2018) this is no longer true.

How to: start org outline navigation in special mode

When using org-goto (traditionally bound to C-c C-j) to navigate an Org document's outline, Boon immediately goes into command mode. However, the org-goto mode rebinds keys, in particular the arrows.

In order for the navigation mode to work well, I need to drop to insert mode. But really, it should open in special mode. Is there a way to make this outline navigation mode use the special mode ? If not, is there at least a way to make it start in insert mode?

Better error message for: d v w

When the cursor is on whitespace, and there is a whitespace character before the cursor, ex:

one  two

Place the cursor on the whitespace before the 't'.
Press: d v w

The minibuffer shows:
Wrong type argument: integer-or-marker-p, nil

It should probably have a better error message.

Possibly something like:
Word deletion failed, cursor not on a word.

boon-20181014.927
GNU Emacs 26.1 (build 1, x86_64-w64-mingw32) of 2018-05-30
Windows 10

error with boon-smarter-forward/backward at end/beginning of string

boon-smarter-forward raises the following error when point is on a closing quotation mark:

Wrong type argument: integer-or-marker-p, nil

The same happens with boon-smarter-backward when point is right after an opening quotation mark. Also, this error doesn't happen when major-mode is text-mode.

Test case:

;;  ,---- boon-smarter-forward from here
;;  v      
"foo" "bar"
;;     ^
;;     '---- boon-smarter-backward from here

One potential fix is using reimplementations of er--move-point-backward-out-of-string and er--move-point-forward-out-of-string, like these:

(defun boon-backward-out-of-string ()
  "Move point backward until it exits the current quoted string."
  (when-let ((char (nth 8 (syntax-ppss))))
    (goto-char char)))

(defun boon-forward-out-of-string ()
  "Move point forward until it exits the current quoted string."
  (and (boon-backward-out-of-string) (forward-sexp)))

So that they don't call goto-char when (nth 8 (syntax-ppss)) is nil, which is the cause of the error message mentioned above.

Tested with:

  • emacs 26.2
  • boon 20190529.849
  • expand-region 20190416.538

V doesn't work on the last line of a buffer

When the cursor is on the last line of a buffer, boon-open-next-line-and-insert fails with « End of buffer » (an, interestingly, moves the cursor to the end of the line).

Boon commands in latex mode

First of all, thank you for the great package, I used xah-fly-keys and ryo-modal mode before but I like boon better, because it's so simple and small!

I often edit latex files with auctex and tried the command for multiple cursors on this code

\begin{labeling}[:]{xxxxxxxxxx}
  \item[vgl. \LR{loeffler1} -- \LR{loeffler2}] Viele übergewichtige Kinder
    und Jugendliche durch ungesundes Essen und Bewegungsmangel
  \item[vgl. \LR{loeffler3} -- \LR{loeffler4}] Ursachen des Übergewichts
  \item[vgl.\LR{loeffler5} -- \LR{loeffler6}] Psychische und physische
    Folgen des Übergewichts
  \item[vgl. \LR{loeffler7} -- \LR{loeffler8}] Diagnose durch den Arzt
  \item[vgl. \LR{loeffler9} -- \LR{loeffler10}] Eltern und Kinder arbeiten
    bei Therapie zusammen
  \item[vgl. \LR{loeffler11} -- \LR{loeffler12}] Vorbeugendes Verhalten
    gegen Übergewicht bei Kindern \bewp{}
\end{labeling}

So I'm on the word labeling and hit
s @ s g

and only the first appearance of labeling is matched. When I save the file as *.txt it works as expected. When I try to select the whole paragraph with SPC g it's the same. I works for *.txt but not for a latex buffer.

Can this be fixed?

Regards
Thorsten

Mnemonics should adapt to the frontend

Frontends should store mnemonics in the keymap, as if it were the name of a menu item. Example:

(define-key boon-command-map "a" '("around" . boon-enclose))

Then the tutorial will be able to lookup those mnemonics.

magit-blame buffer should be in special mode

Following #40, it becomes much harder to use the magit-blame buffer: it's a read only buffer with some keys remapped. If I type q q, to quit, it will not use the remapping but try to write q in the buffer instead (which fails, of course). (as it happens, we can still quit the magit-blame buffer with c q, but enter will not work, for instance).

It may be related to #34 .

I don't have time to investigate at the moment. I'll try to get back to this in a few weeks.

C-God does not reach C-c [::alpha::]

First I set with (global-set-key (kbd "C-c f") 'ggtags-find-file).
If I press c followed by f in command mode, I get an error that C-c C-f is not bound. (No command bound to C-c C-f)
My examples:
C-c i -> No command bound to C-c TAB
C-c o -> No command bound to C-c C-o
C-c p -> No command bound to C-c C-p

I would like to understand the logic behind C-God. If I know correct, in the original God mode, c directly followed by i would mean C-c C-i whereas c followed by space and then by i would be C-c i.

Debugging strategy ?

I keep hitting issues which are likely not boon specific but effect boon and likely others will hit this type of issue.

Basically when using boon shortcuts I have defined something happens in the buffer which remaps the keys to different behaviors, the issue is I don't know how to find the cause

Any tips / suggestions on how you can find the source of this could you hook into lisp in some way when a boon key has been changed and what triggered the change perhaps ?

An example is in insert mode I can no longer type q this changes my buffer and spc goes to the bottom of the buffer instead of inserting a space.

No focus on minibuffer

Thanks for writing boon-mode. I enjoy it a lot and have spend some time setting up my own QWERTY mode. I have found an annoying bug. It can be reproduced like this:

  1. Run emacs in daemon mode
  2. Open a file
  3. Close emacs using "C-x C-c"
  4. Change the file outside of emacs
  5. Open the file again.

Emacs will show the "Revert buffer from file " minibuffer, but it will not be active.

Example of using boon core ?

Looks like this may be the plugin I am after I wish to define my own modes and keys however.

Are there any existing examples of this the readme just talks about the boon keymap but it also mentions you could use boon-core to do your own.

What are the functions for defining a new mode and attaching key combinations to it perhaps something in the readme on this could be useful for others ? or have i completely mis understood and you cant define new modes and key combinations for the modes ?

Document independent usage of `boon-core.el`/separate it out

It seems that you mention several times in the comparison that several packages (modalka and ryo-modal) are similar to boon-core.el but pale in comparison in several ways. As someone interested in generating their own modal editing mode based on their own editing habits who's looked at modalka and ryo-modal before and found them lacking and poorly integrated at times, this leaves me very interested in working with boon-core.el.

Are there any plans to document its usage (other than the existing code already using it) or, even better, separate it out and consider boon to be a modal editing package built on top of it?

esc does not close minibuffers

This is a minimal config for boon, I use a local mirror of melpa but it's up to date.
If I type M-x I can't go out by typing esc, and a warning is shown "Wrong type argument: commandp minibuffer-keyboard-quit"

       (require 'package)       
       (setq package-enable-at-startup nil)

       (add-to-list 'package-archives  '("melpa" . "~/elpa-mirror/melpa"))
       (add-to-list 'package-archives  '("org"   . "~/elpa-mirror/org/"))
       (add-to-list 'package-archives  '("gnu"   . "~/elpa-mirror/gnu/"))
       (package-initialize)
       
       (unless (package-installed-p 'use-package)
         (package-refresh-contents)
         (package-install 'use-package))
       (use-package boon
         :ensure t
         :init
         (require 'boon-qwerty)
         :config
         (boon-mode)
       )

boon-qsearch-previous-at-point `w s` doesn't work

w s doesn't jump to the next occurrence of a word under the cursor.

one
two
one
two

With the cursor on the letter o on the first line.
pressing: e s
highlights both occurrences of one, and the cursor jumps to the second occurrence (as expected).

But if the cursor is moved to the t on the last line.
pressing: w s
highlights both occurrences of two, but the cursor doesn't jump to the previous occurrence.

boon-20181014.927
GNU Emacs 26.1 (build 1, x86_64-w64-mingw32) of 2018-05-30
Windows 10

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.