diff options
author | johannst <johannes.stoelp@gmail.com> | 2020-03-14 17:05:14 +0100 |
---|---|---|
committer | johannst <johannes.stoelp@gmail.com> | 2020-03-14 17:05:14 +0100 |
commit | 4fdac145ec419d081df43de97aeca20728c0bcaf (patch) | |
tree | da66f8c10e4c6fd5c166d8c56d9fcc235dd0f836 /src | |
parent | ec28dd55498a1caea9ccdc3732ec60793181161c (diff) | |
download | notes-4fdac145ec419d081df43de97aeca20728c0bcaf.tar.gz notes-4fdac145ec419d081df43de97aeca20728c0bcaf.zip |
migrated emacs.txt
Diffstat (limited to 'src')
-rw-r--r-- | src/SUMMARY.md | 1 | ||||
-rw-r--r-- | src/emacs.md | 67 |
2 files changed, 68 insertions, 0 deletions
diff --git a/src/SUMMARY.md b/src/SUMMARY.md index 2d6757f..db14b8c 100644 --- a/src/SUMMARY.md +++ b/src/SUMMARY.md @@ -3,6 +3,7 @@ - [git](./git.md) - [gdb](./gdb.md) - [radare2](./radare2.md) +- [emacs](./emacs.md) - [strace](./strace.md) - [lsof](./lsof.md) - [pidstat](./pidstat.md) diff --git a/src/emacs.md b/src/emacs.md new file mode 100644 index 0000000..4d59f68 --- /dev/null +++ b/src/emacs.md @@ -0,0 +1,67 @@ +# emacs(1) + +## help +```markdown + C-h f describe function + C-h b list buffer available keymaps + <kseq> C-h list possible keymaps with <kseq> + eg C-x C-h -> list keymaps beginning with C-x +``` + +## window +```markdown + C-x 0 kill focused window + C-x 1 kill all other windows + C-x 2 split horizontal + C-x 3 split vertical +``` + +## block/rect +```markdown + C-x <SPC> activate rectangle-mark-mode + M-x string-rectangle <RET> insert text in marked rect +``` + +## mass edit +```makrdown + C-x h mark whole buffer (mark-whole-buffer) + M-x delete-matching-line <RET> delete lines matching regex + M-x % search & replace region (query-replace) + C-M-x % search & replace regex (query-replace-regexp) +``` + +## grep +```markdown + M-x find-grep <RET> run find-grep result in *grep* buffer + n/p navigate next/previous match in *grep* buffer +``` + +## lisp mode +```markdown + M-x lisp-interaction-mode activate lisp mode + C-M-x evaluate top expr under cursor + C-x C-e eval-last-sexp + C-u C-x C-e eval-last-sexp and prints result in current buffer +``` + +## narrow +```markdown + C-x n n show only focused region (narrow) + C-x n w show whole buffer (wide) +``` + +## org +```markdown + M-up/M-down re-arrange items in same hierarchy + M-left/M-right change item hierarchy + C-RET create new item below current + C-S-RET create new TODO item below current + S-left/S-right cycle TODO states +``` + +### org source +```markdown + <s TAB generate a source block + C-c ' edit source block (in lang specific buffer) + C-c C-c eval source block +``` |