New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

integration with spacemacs #47

gcentauri opened this Issue Jun 25, 2018 · 3 comments


None yet
2 participants
Copy link

gcentauri commented Jun 25, 2018

I'm a happy user of xah-fly-keys, it has helped me avoid serious RSI over the past year of professional work.

Recently, I have been trying to adopt Spacemacs rather than my traditonal .emacs configuration and there are some places where xfk could use a little help.

For example, spacemacs seems to control the cursor so the standard xfk behavior of switching from box to bar doesn't work. there is also inconsistent switching of keymaps when entering different modes (which i know is more of a emacs issue than a xfk issue) - for example, when using magit mode before spacemacs, many of the xfk commands still worked as expected (navigation and such). in spacemacs, magit commands seem to have precedence which is okay, but can be problematic for certain things. when switching to a magit sub-command buffer, suddenly xfk has precedence and i have to swich out of command mode in order to finish up a command.

i am happy to start digging in and seeing what can be done, but i wanted to raise this issue to see if you had any guidance on integrating with something as large as spacemacs. i think it would be awesome if someday xfk was just as important of an input mode as evil


This comment has been minimized.

Copy link

xahlee commented Jun 27, 2018

thank you!

about spacemacs, i never actually tried it, but have heard of lots good things about it.

about spacemacs + magit + xah-fly-keys (i have abbrev so xfk expands),
i don't have info to give you.

with gnu emacs + magit + xah-fly-keys... it has issues overriding xah-fly-keys.
but i haven't really investigated. I just switch to insert mode and make do.

some of the issue really can't be solved without serious hacking, which is not desirable.

e.g. emacs can have keybinding in text properties, so that key behavior depends on cursor position. I'm quite sure that's how part of magit works. e.g. when cursor is on a file, press s to add.

but other than this, also that emacs don't really have a good keybinding priority. So minor modes could override each other. I don't think there's a none tech policy about this neither.

so, am fraid you'll have to explore. But if you find something, post the issue, , i'll look into. (usually that's how i get to start to do things)


This comment has been minimized.

Copy link

gcentauri commented Dec 10, 2018

I opened a pull request into the spacemacs project to offer xah-fly-keys as a layer. syl20bnr/spacemacs#11701

I added some extra config for the cursor color to identify modes (something by default clobbers the block/bar switch), set the default layout to "qwerty" (spacemacs and evil assume qwerty for the most part), and turned the control key off by default. I also added a hook to switch to insert mode when in magit buffers and popups, seems to work great so far. I'd like to do a decent job of representing your choices about presenting the keymap though, so I thought I'd post here if you had any input on how to integrate with Spacemacs.

I've also been taking bits of your documentation, but giving credit to you for your great work! Just hoping to help, let me know if you have any opinions.


This comment has been minimized.

Copy link

xahlee commented Dec 10, 2018

that's fantastic! thank you very much.
In this week, let me look at spacemacs, and see if i can help in anything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment