alt-space or home Command-mode f Insert-mode space-space Insert-mode
j l k i Left, right, down and up u o Word-left, word-right h ; (or ç) Beginning/end of line/indent/paragraph Space h Beginning-of-buffer Space n End-of-buffer
e r Delete word left/right d To deletes the left char or bracket. The brackets can be of any type ()[]{} Ctrl-u d Delete only the brackets 5 Deletes the right char or bracket g Deletes the current text block. Text blocks are separated by empty lines. w Shrink-whitespaces. Delete blank lines or white spaces. Space g Kill-line. Delete to end of line.
y Undo Ctrl+g y Redo. To redo again, just press y one or more time. To reverse direction, press Ctrl+g again.
I recommend not to use any undo/redo package. If you have them installed (e.g.undo tree), uninstall it.
x xah-cut-line-or-region to cut. It'll cut current line. c xah-copy-line-or-region v xah-paste-or-paste-previous. When pressed twice, it'll paste the previous copied text (kill-ring). Repeat to swap to earlier copied text. v Ctrl+g v Paste twice v Return v Paste twice v space v Paste twice To paste something 5 times Ctrl+u 5 v. Space c xah-copy-all-or-region Space x xah-cut-all-or-region Space t xah-show-kill-ring. Show copy history. Useful when you want text that you copied long ago. Just move cursor there and copy the part you want.
Space k 3 xah-copy-to-register-1 Space k 4 xah-paste-from-register-1
6 Selects text block. 7 Selects line. 8 Selects current word. If cursor is before a bracket, select the bracket and inner text. The command name is xah-extend-selection, but currently best used for just selecting word or bracket text. 9 Selects inner text between brackets or quotes, e.g. "inside string". Space a Mark-whole-buffer Ctrl-g Cancel a selection
t set-mark-command to mark. Then, move cursor will create selection. Press again to unmark. Space s exchange-point-and-mark This is sometimes useful. It puts cursor to the other side of selection. 0 Move cursor to previous marked position in current buffer. xah-pop-local-mark-ring. Try pressing it a few times. Ctrl+d Move cursor to previous marked position, of all buffers. pop-global-mark
a To call a command by name. Space Enter execute-extended-command
n isearch-forward. Use this to move cursor too. You don't need other packages to jump to locations. Or space-u/F9-u. [see [5]Emacs: avy ace-jump vs isearch] Space y xah-search-current-word or selection.
Ctrl+y To paste. left/right arrow keys ← → Do search backward/forward. up/down arrow keys ↑ ↓ Do previous/next search item. Return Exit isearch and leave cursor at the current location. Ctrl+g Exit isearch and leave cursor at original location.
Space r query-replace Space k r query-replace-regexp
Ctrl+n New buffer/file Ctrl+o Open buffer/file Ctrl+w Close buffer/file Ctrl+s Save buffer/file Ctrl+Shift+s Save as buffer/file Ctrl+Shift+t Open last closed buffer/file
Space i l New buffer/file Space i e Open buffer/file Space k j Close buffer/file Space ; Save buffer/file Space i , Save as buffer/file Space i r Open last closed buffer/file
Space i f xah-open-file-at-cursor Space i g xah-copy-file-path Space m Go to dired and place cursor on file name. (dired-jump) Open in external apps (for image, pdf, vidio/audio files, etc.): Space i w xah-open-in-external-app Space i s xah-show-in-desktop
Space i p bookmark-set Space i i bookmark-bmenu-list list bookmarks Space i o xah-open-file-fast
Space i j recentf-open-files Space i r xah-open-last-closed Space i y xah-open-recently-closed
3 Un-split all. Delete-other-windows 4 Split top/bottom split-window-below Ctr-space k , Switch cursor to next pane, and if no split pane, switch to next window if any. xah-next-window-or-frame Space 3 Remove current pane. delete-window Space 4 Split left/right. split-window-right
If you are on desktop with large monitor, do use a workflow of 2 windows (emacs frame) side by side. Avoid workflow with 1 fullscreen.
Space f switch-to-buffer Space i d (ibuffer) list buffers. Ctrl+8 xah-next-user-buffer Ctrl+7 xah-previous-user-buffer Ctrl+6 xah-next-emacs-buffer Ctrl+5 xah-previous-emacs-buffer
xah-fly-keys has a system to work with brackets. Brackets includes ()[]{}“” and all Unicode brackets.
These allows you to work efficiently in any programing language with lots brackets, such as Java, JavaScript, especially lisp.
You don't need other packages for working with brackets. If you code emacs lisp, i also recommend [9]Emacs: Xah Emacs Lisp Mode
m . Move to left/right bracket. (xah-backward-left-bracket) (xah-forward-right-bracket) / (xah-goto-matching-bracket). When cursor is on a bracket, jump to the matching one. If cursor is not on a bracket, move it to parent left bracket.
8 Selects the whole content - including the bracket - when the cursor in inside them (xah-extend-selection)
d To delete one char to the left. (xah-delete-backward-char-or-bracket-text) If the character is a bracket character (any of ()[]{}), the whole bracketed text will be deleted, including the bracket. Ctrl+u d Delete bracket on the left of cursor, and its matching pair. 5 To delete single bracket without pair, move cursor to the left of it, then press 5.
a xah-change-bracket-pairs M+x xah-change-bracket-pairs
Space d k Insert parenthesis pair. (xah-insert-paren) Space d l (xah-insert-square-bracket) Space d j (xah-insert-brace) Space d u (xah-insert-ascii-double-quote) Space d i (xah-insert-ascii-single-quote) Space d Ctrl+h To see all other brackets and quotes you can insert.
Ctrl++ text-scale-increase Ctrl+- text-scale-decrease Space l a text-scale-increase Space l a - text-scale-decrease b Cycle through capitalized, lowercase and uppercase word