If you don't want to waste your time!
So far , this article is only for EMACS-ers, and was originally created only for me
As far as I know, many programmers use VIM, and some also use VIM, but they do it in EMACS, EVIL (evil) mode, which means that these people understand all the charms of VIM (quick text editing without using a mouse, the presence of several modes etc.), but they really love the ability to add billions of plugins. But I also know that VIM was made several million years ago, for the programmers of that time and in order to be a separate editor (not for EMACS), so VIM does not use all the features that it could, for example: The key to enter the command mode is in the very bottom corner of the keyboard (and yes, I know that this can be easily corrected in .vimrc), also if I want to go to editing another file, then I need:
Go to command mode (By clicking yourself you know where)
Print `: find` and filename
If I made a mistake in the file name ---> in point 2
This can take forever, and you have to change the current file very often! Also, if you are using the dvorak layout, how is it possible to use VIM at all? And in general, all VIM keys are configured not in order to quickly use them, but in order to quickly remember this is also of course cool, because each command in VIM can turn into a whole beautiful and understandable sentence for any native speaker, and XAH FLY KEYS cannot boast of such maybe, because it is cool in another, quick text editing, and if you are a user of some unpopular layout, then you are unlikely to find better!
Let's move on to the most important thing in this excellent article.
XAH FLY KEYS
XAH FLY KEYS, VIM, !
-
XAH LEE, EMACS- , ErgoEmacs .
1 ( , ), , , :
, XAH FLY KEYS 10- , ( QWERTY DVORAK AZURE).
github , - :
xah-fly-keys MELPA package manager EMACS
Emacs Lisp :
(require 'xah-fly-keys) (xah-fly-keys-set-layout "qwerty") ; (xah-fly-keys 1)
XAH-FLY-KEYS 2 : COMMAND INSERT ( VIM), COMMAND , HOT-KEYS, :
INSERT mode - ( COMMAND f)
COMMAND mode - ( INSERT Alt+SPACE)
COMMAND mode, - - , f, INSERT mode, SPACE (), , Space f, , SPACE, , Space i f, .
- :
j -
i -
k -
l -
o - 1
u - 1
; - 1 , :
h - 1
m -
. -
/ - , :
0 - .
, import , , , 0, , .
Ctrl+4 - ( flycheck-mode)
Ctrl+3 - ( flycheck-mode)
Space H - (Space - )
Space N - (Space - )
Space p - ( -> , -> , -> )
8 - , , ,
1 - , , ,
2 7 -
6 - ""
9 -
t - , (VISUAL MODE)
Space a -
Space o Space -
d - 1
5 - 1
e -
r -
x - - , (. /)
Space g -
g - :
Space k f - , ,
Space k t -
Space k g -
Space k a - ""
' - . ( -> , -> ()), :
z - / ,
w - , .
.
p - ( INSERT )
b - ( , , )
Space 6 -
Space k e -
Space k p - ( "\" ", )
Space k k -
Space o f - , ,
Space o g -
s - ,
/ (FRAMES)
, - (FRAME)
4 -
Space 4 -
Space 5 -
Ctrl+7 - ( )
Ctrl+8 - ( )
Ctrl+t -
Ctrl+w - ( )
Ctrl+s - ( )
Space m - dired
Ctrl+Shift+s - ...
Space l b -
Space i w -
Space i g -
Space i s -
Space i f - ( )
Space , Del -
Space , x - +
Space , c -
, :
php
perl
python
ruby
go
haskell
js
typescript
shell
clojure
racket
ocaml
cscript
tex/latex
java
Space l Space -
Space l . - ( f11 )
Space l 2 -
Space l 4 - ./.
Soace l t - ./.
Ctrlr+= -
Ctrlr+- -
Space l g - EMACS
( Emacs)
Space l 6 - ( )
Space l 9 -
Space l 0 - ,
Space l c -
Space l , - Emacs
Space l d - Emacs
Space 9 -
a - ELisp ( , Alt+X)
. HELP
Space j a -
Space j j -
Space j v -
Space j l -
Space j g -
Space o e -
Space o r -
Space o h -
Space o w -
n - , , :
Space k r - + , , :
SPACE,
DEL,
ENTER,
Space k d - ( )
Space y -
/
- ( )
v -
x - ( )
1. WTF?
, 1 - , , , .. ..
Space k 1 - 1 ( -> )
Space k 2 - 1
Space k 3 - 1 = 1; 1
Space k 4 -
Emaces - Eisp ELisp-.
- - COMMAND , :
(defun my-xfk-addon-command () "Modify keys for xah fly key command mode keys To be added to `xah-fly-command-mode-activate-hook'" (interactive) (define-key xah-fly-key-map (kbd "- ") ' - ) ) (add-hook 'xah-fly-command-mode-activate-hook 'my-xfk-addon-command) ;; my-xfk-addon-command, ;; - - . ;; add-hook Command mode
To do the same thing only in INSERT mode, you need to execute almost the same code:
(defun my-xfk-addon-command () "Modify keys for xah fly key command mode keys To be added to `xah-fly-command-mode-activate-hook'" (interactive) (define-key xah-fly-key-map (kbd "- ") ' - ) ) (add-hook 'xah-fly-insert-mode-activate-hook 'my-xfk-addon-command) ;; my-xfk-addon-command, ;; - - . ;; add-hook insert mode
It's all!!!