· 9 years ago · Jan 22, 2017, 01:52 PM
1#+TITLE: aiezue's Notes of Learning Emacs
2#+AUTHOR: Alex Yan aka "aiezue"
3#+EMAIL: (concat "aiezue" at-sign "gmail.com")
4#+DESCRIPTION: Emacs learning notes listed as an org file
5#+KEYWORDS: emacs, orgmode, learning, notes
6#+LANGUAGE: en
7 [fn:1]
8* Learning Emacs
9
10This is the note I took while learning emacs
11
12** Basics
13
14Here are the basic keybinds and helps i've noted.
15
16*** Bookmarks
17On how to creat and view and list bookmarks. Bookmarks are very useful in not only edition one single file but also jumping between different files and even different modes.
18- Create Bookmark :: C-x r m
19- Go to Bookmark :: C-x r b
20- List Bookmark :: C-x r l
21You can create bookmarks in Dired Mode and info as well as man pages.
22
23*** Basic Movement
24- C-f :: forward by one char
25- M-f :: forward one word
26- C-b :: backward by one char
27- M-b :: backward one word
28- C-p :: upward one line
29- C-n :: next line
30- C-a :: head of line
31- M-a :: move to the head of a sentence
32- C-e :: end of line
33- M-e :: move to the end of a sentence
34- C-v :: scroll forward one screen
35- M-v :: scroll backward one screen
36- C-l :: recenter a screen
37- M-r :: reposition the point to top, middle and bottom of screen
38- M-< :: move to top of the buffer
39- M-> :: move to the end of buffer
40- M-g c :: move to the nth character (c is the number)
41- M-g g :: move to the nth line
42
43Keybinds for pairs navigation
44- C-M-f :: forward to pair
45- C-M-b :: backward to pair
46- C-M-k :: kill contents between the pairs
47- C-M-t :: drag back
48- C-M-@ :: put mark at the end of the pairs
49
50*** Editing
51- C-d :: kill char
52- C-S-DEL :: delete whole line
53- M-d :: kill forward a word
54- M-DEL :: kill backward a word
55- M-\ :: kill all spaces
56- M-SPC :: kill all spaces except the one at
57- C-K :: kill to the end of the line
58- M-k :: kill a sentence
59
60For comments:
61- M-; :: toggle comments
62 + if not highlighted, the comment will be added to the end of the lin
63
64*** Kill Ring
65- C-y :: yank previous killed contents
66- C-{1,2,3,...,n} C-y :: yank the nth entry of the kill ring
67 + This is called prefix arguments
68
69*** Mark and Region
70
71
72- C-SPC C-SPC :: to mark
73- C-u C-SPC :: to go to mark
74- C-W :: to kill the region
75- M-W :: to copy the region
76- C-y :: to yank the region
77- C-x C-x (or C-u C-SPC) :: go back after the yank, namely exchange point after yank.
78
79*** Undo
80- C-/ :: same as C-x u, the undo
81- redo :: is the same, as redo in emacs is simply undo the last undos.
82
83*** Search
84 To any text editor, search is crucially important.
85- C-s :: search forward
86- C-r :: backward search
87- C-s C-w :: put the word at the point to search
88- C-u C-s :: search by regex
89- M-P & M-N :: can be used to get to the previous and next search keywords.
90
91*** Replace
92- M-% :: replace
93- C-M-% :: replace with regex
94
95*** Grep
96- M-x rgrep :: to enable grep search
97However, I use helm-ag to do this, and it proves to be much easier.
98
99
100* Learning Orgmode
101I have to admit that orgmode is the main driving force of my turn from vim to emacs.I have been a fan of note-taking and time-managing from the very day i put on fingers on the computer keyboards. To me, to managing them in plain text is trully enchanting. So here are the note i took while learing the mighty Orgmode.
102* Footnotes
103
104[fn:1] The note is stored in Dropbox and will be publisHed to personal website upon compeltion.