(use-package sniem :init (global-sniem-mode t) :config (sniem-set-keyboard-layout 'qwerty))
Sniem means Simple United Editing Method，it’s a new editing method for Emacs.
last-point is a thing that through all motions and most of operations. Like its name, when execute any motions, the last position will be set to
Sniem has leader key，the key of leader map can be set by
(sniem-leader-set-key). And you can use
(sniem-set-leader-key) to set the key of leader.
(sniem-leader-set-key "d" 'sniem-digit-argument-or-fn "D" 'dired) (sniem-set-leader-key ",")
Sniem has 3 modes.
NORMAL: This mode is the default mode for the editing buffers.
You can use
(sniem-normal-set-key) to set keys for normal mode. Its usage is same as
INSERT: This mode will be used when you executed
NORMALmode. It’s used to edit. In this mode, there’s only one binding for
sniem, that is
<ESC>which will make you exit
INSERTmode back to
MOTION: This mode is used in special modes, there’s only has one binding for
sniem, that is
<SPC>which can let you use leader keys.
EXPAND: This mode is used to expand region more comfortablely.
You can use
(sniem-expand-set-key) to set keys for normal mode. Its usage is same as
||Call the object-catch function|
||Repeat the object-catch|
||Catch the parent pair of the content selected|
||Catch pair by its prefix char|
||Catch the parent pair of the content selected by its prefix char|
||Catch ~”~ pair|
||Catch parent ~”~ pair for the content selected|
||Catch ~”“~ pair|
||Catch parent ~”“~ pair for the content selected|
||Reverse the direction of catch|
|Other alpha keys||Quit expand mode and goto NORMAL mode|
Sniem provides supports for the mainly 4 layouts，you can use
(sniem-set-keyboard-layout) to set.
(sniem-set-keyboard-layout 'qwerty) (sniem-set-keyboard-layout 'colemak) (sniem-set-keyboard-layout 'dvorak) (sniem-set-keyboard-layout 'dvp) ;For Dvorak Programmer
After you set the keyboard layout, Sniem will set the default keys in
NORMAL mode accroding to your layout, then create the cheatsheet.
Sniem provides the Keypad function, After you execute the Keypad, When you press: , is
C- , . is
M- , / is
C-M- . After you press
<SPC>, it will reture the next key itself which you press.
This function is defaultly bound on
<SPC>. After you execute it, the middle keys of the keyboard can be instead of numbers and
-, the record will be over after you pressed
<SPC>. You can also use the keys in the table to do the special operations:
|.||Mark the content at point or a region|
|SPC||Execute function in motion-hint|
|/||Reverse the direction of object-catch|
|p||Add, change or delete the pair of region|
|<||Jump to prev comment mark|
|>||Jump to next comment mark|
|m||Insert new comment mark|
middle-keyboard to get the lines to forward or backward, then execute it.
Normally, goto the next or previous word. If there is a content selected, goto the next or previous content same as it.
Normally, goto the
last-point. If the
sniem-mark-content is exists, goto the
Most of the editing operations is related to
pafter the operations to execute it with
(sniem-lock-unlock-last-point)Lock or unlock the
last-point. When it is locked, it will display in the buffer.
All of the operations which are end with
-in-region will edit the area from the forward point of the start of region to the backward point of the end of the region.
Sniem provides functions to get the object smartly:
Get the closest pair to cursor.
Get the parent pair of the selected pair.
Input the char of the pair, then get the closest to cursor.
Input the char of the pair, then get the parent of the selected pair.
Quickly get the pair.
p to enter the interface of the
sniem-paste. Then you can use
p to flip. You can paste the first content when you press
p in the first page.
[1-9] to select the content.
Sniem provides some great kmacro functions.
q for record,
e for execution,
n to name the last kmacro.
(sniem-prev-word)to goto the next or previous content same as it. Execute
(keyboard-quit)can cancel the content record.
sniem-mark-jump provides two motions. They are
Normally, execute them can goto the next or previous comment mark. But if you use them with
digit-argument, they’ll find the next or previous comment mark with type which is the number you input of the mark type alist.
Theses variables are the help message for their operations. If you don’t want them, you can execute this function:
(setq sniem-center-message nil sniem-mark-message nil sniem-delete-message nil sniem-change-message nil sniem-yank-message nil sniem-macro-message nil)
xxx can be:
This is the sit time for motion hint. Default is
If you use awesome-tray, sniem will automaticly set
(sniem-state) to the alist, so you can use it.
Otherwise, you can set the state hint accroding to your modeline.
If you use the default modeline, you can try this:
(setq-default mode-line-format (append '((:eval (sniem-state))) mode-line-format)) (force-mode-line-update)
This is the author name for the comment mark.
This variable is the status of the author name’s enablement.
：Code submit frequency
：React/respond to issue & PR etc.
：Well-balanced team members and collaboration
：Recent popularity of project
：Star counts, download counts etc.