Join GitHub today
integration with spacemacs #47
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
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),
with gnu emacs + magit + xah-fly-keys... it has issues overriding xah-fly-keys.
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)
I opened a pull request into the spacemacs project to offer
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.