Comments (2)
Here's an example if you are using KEYPAD mode.
(defvar window-keymap
(let ((keymap (make-keymap)))
(define-key keymap (kbd "w") #'ace-window)
(define-key keymap (kbd "u") #'winner-undo)
(define-key keymap (kbd "r") #'winner-redo)
(define-key keymap (kbd "h") #'split-window-below)
(define-key keymap (kbd "v") #'split-window-right)
(define-key keymap (kbd "c") #'delete-window)
(define-key keymap (kbd "o") #'delete-other-windows)
keymap))
;; define an alias for your keymap
(defalias 'window-keymap window-keymap)
(global-set-key (kbd "C-x C-w") 'window-keymap)
;; ^ note the quote
Then in KEYPAD popup, it will be displayed as +window-keymap
.
I think the alias way is the built-in way in Emacs, how kmacro-keymap is defined in emacs source code.
But if you define your keys in leader, there's no key description. The popup description in Meow is only for KEYPAD. The reason is leader is designed to be simple, since the shortcuts in leader is not baked by a normal key binding, it is not recommended to have complex keymap in leader.
If you want SPC w ?
, you should define C-w ?
, and add '("w" . meow-keypad-start)
in leader.
And C-w
is kill-region
by default, you should not overwrite it, since it is used by Meow. If you do, remember to binding kill-region
to another key, and set meow--kbd-kill-region
.
Maybe C-o
is an good option.
Feel free to ask if this is not clear to you.
from meow.
Defining the keymap as you describe definitely sounds like the best way to do it. And thanks for reminding me that C-w is bound to kill-region - I definitely need to change that binding!! I previously used evil, so I tend to forget about the basic Emacs keybindings.
Thanks for the help!
from meow.
Related Issues (20)
- Meow-visit only in grabbed region in beacon-mode HOT 18
- should be meow--set-wdired? HOT 1
- Should pasting activate the selection? HOT 6
- Motion override keys with prefix maps HOT 1
- bug of (meow-line -1) HOT 1
- Number for meow-next-word aren't colored in emacsclient HOT 5
- How to remove mathing parentheses? HOT 2
- `Backspace` key delete region not work, Bug or Design? HOT 3
- Issue with the last line in the grabbed region HOT 6
- SPC SPC errors in meow-motion-mode HOT 2
- Duplicate Input Issue with BEACON Mode using negative-argument + meow-line + meow-insert
- Keypad bug ~SPC key~ not mapping to ~C-c key~ HOT 3
- feature request: ability to customize the keypad hints font HOT 2
- Feature request: Digit keys in normal mode act as universal-argument without needing C-u HOT 1
- What is `<remap>` in minibuffer? HOT 3
- 我想要一个不加入剪贴板的meow-kill
- C-h m -> describe-mode <leader>-h m -> view-order-manuals
- feature request: show `meow-search-indicator` on the mode-line rather than overlay behind the result
- insert mode i and a do the same thing HOT 2
- Shim for sly-inspector
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from meow.