Comments (10)
Another suggestion: let the user map a second key for a non-sticky version of
SPC
. E.g:,
.
Thanks for chiming in, @viniciussbs!
That's a good option, with the caveat that they can't enter bindings with ,
/C-,
.
I'm slightly inclined to implement pressing SPC
again toggles the sticky literal key.
from god-mode.
Hi @doneself!
xSPC4j actually translates to C-x4j due to sticky literal key behaviour which uses SPC by default.
If you want to disable this behaviour, set god-literal-key
to nil
in your configuration.
(setq god-literal-key nil)
from god-mode.
When the value of god-literal-key is set to nil, i don't know how to use god-mod to execute the command (dired-jump-other-window). Because dired-jump-other-window is bound to C-x 4 C-j.
from god-mode.
Ah yes, my bad.
There needs to be some indirection to disable sticky literal key behaviour then.
Would that work for you? If yes, I can implement that fairly quickly.
I suppose a temporary workaround would be to bind dired-jump-other-window
to C-x4j.
from god-mode.
OK, thank you for your help and guidance.
from god-mode.
I've given this a bit of thought, and there are a couple options to help users with similar key bindings.
C-x4C-j has a modifier key (C-
) that's used in a key sequence after a key without a modifier key (4), but it's still a valid key sequence and doesn't break key binding conventions.
We could define a customisation to either:
- Toggle sticky literal key if the literal key is entered again
(xSPC4SPCj → C-x4C-j), or - Disable sticky literal key behaviour altogether, so that the literal key only applies to the first subsequent key
(xSPC4j → C-x4C-j).
I'll leave this open for folks to discuss what the best option would be to implement in God mode.
from god-mode.
from god-mode.
I could adopt to a toggling god-literal-key
equally well as to a non-sticky one, but without beeing able to enter either of C-x x C-x
or C-x x x
, god-mode would be pretty much broken for me :-(
For now, I fix this for me with the non-sticky version, since that's what's easier for me to do from within my config file with:
(defun advice/god-mode-clear-literal-sequence-flag (&rest _)
(setq god-literal-sequence nil))
(advice-add 'god-key-string-after-consuming-key :before
#'advice/god-mode-clear-literal-sequence-flag)
from god-mode.
I like the idea of pressing SPC
again to toggle sticky behavior. Another suggestion: let the user map a second key for a non-sticky version of SPC
. E.g: ,
. So:
x
SPC
4
SPC
j
→C-x
4
C-j
x
,
4
j
→C-x
4
C-j
This would attend @doneself . And also @federkamm, see:
x
,
x
x
→C-x
x
C-x
x
SPC
x
x
→C-x
x
x
I think this second non-stick key should not be defined be default, letting the user define it if they want.
What do you think?
from god-mode.
I came back here to see if anything happened since. I also like the idea best to make SPC toggle the sticky behavior because it would be a non-breaking change. I wouldn't need a non-sticky literal key alternative, then.
As far as I can tell, this would only requires to change the t
in (setq god-literal-sequence t)
in line 316 in function god-key-string-after-consuming-key
to (not god-literal-sequence)
.
from god-mode.
Related Issues (20)
- The function "my-god-mode-update-modeline" does not work reliably HOT 4
- Fix mode line suggested in README resulting in unreadable mode line HOT 3
- God mode does not work in Transient UI HOT 8
- god-mode-all doesn't work in shell-mode HOT 4
- Keybinds recommendation
- Use Eldev HOT 1
- Idea: One-shot god-mode HOT 3
- [Idea] Disabling god mode after certain functions/key-presses HOT 5
- Have a discussion page for this project? HOT 1
- Extending god-mode system wide outside of Emacs HOT 13
- feature request: make describe-key work with god-mode HOT 10
- Make ESC just enter god-mode HOT 3
- Conflict with lispy-mode HOT 3
- Shifted key translation HOT 5
- Customize option to disable head icon showing on mode-line HOT 7
- god-mode doesn't work in *scratch* buffer
- god-mode does not work with "un-initialized" `projectile-mode-map` HOT 17
- binding for <C-tab> doesn't work in god-mode HOT 10
- Org-mode header navigation. HOT 1
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 god-mode.