Learning is always from book.Reading "Learning
gnu Emacs,2nd(Debra Cameron,Bill Rosenblatt, Eric Raymond)",clutz' cut in the way.
Useful memo is here:
C-f move forward one character
C-b move backward one character
M-f move forward one word
M-b move backward one word
C-a move ahead of line
C-e move to the end of line
M-a move ahead of statement
M-e move to end of statement
M-{ move to paragraph beginning
M-} move to paragraph end
C-n move to next line
C-p move to previous line
C-v continue to view
M-v return to view
C-l view in middle
-------------------------------------these are move key sequences
--more enhanced in C mode:
C-M-a move to function ahead
C-M-e move to function end
M-m move to mark beginning
C-M-p move to previous block {
C-M-n move to next block }
M-; add comment here
M-x comment-region comment activated region
C-x C-u current preprocessor conditional
C-x C-p previous preprocessor conditional
C-x C-n next preprocessor conditional
C-/ fill activated region
M-j jump to next line and continue comment
M-q fill current comment region
-------with etags(M-! etags * --language=c RET):
M-x visit-tags-table load TAGS
M-. search word under cursor according to TAGS table
M-, search forward
--------using bookmark:
C-x r m bookmark cursor with a name
C-x r b jump to bookmark (input name)
-------------------------------------about frame and buffer
C-x b switch to previous buffer
C-x C-b select buffer by name
C-x k close buffer by name
C-x C-q lock buffer (read-only)
C-x 0 close current frame
C-x 1 keep only current frame
C-x 2 horizontally split frame
C-x 3 vertically split frame
C-M-v continue view in the other frame
M-x compare-windows (set cursor first)
------------------------------------------search and replace
C-s C-w search word under cursor
C-s search increasely
C-r search return
M-% replace
------------------------------------------select and operation
C-@ mark region beginning(then cursor position is the end)
C-x C-x exchange region begining and cursor
C-w remove region to kill-ring
M-w copy region to kill-ring
C-k kill to line end
C-y yank back the nearest region in kill-ring
M-y select and yank back region in kill-ring
C-/ undo previous action
C-x C-t exchange line in context
C-t exchange character in context
M-t exchange word in context
---------------------------------------when compile
M-x compile compile current buffer
C-x ` jump to the line complier report error at
M-p view report previous
M-n view report next
;; .emacs
;;; uncomment this line to disable loading of "default.el" at startup
;; (setq inhibit-default-init t)
;; turn on font-lock mode
(when (fboundp 'global-font-lock-mode)
(global-font-lock-mode t))
;; enable visual feedback on selections
;(setq transient-mark-mode t)
;; default to better frame titles
(setq frame-title-format
(concat "%b - emacs@" (system-name)))
;; default to unified diffs
(setq diff-switches "-u")
;; always end a file with a newline
;(setq require-final-newline 'query)
(custom-set-variables
[jin@localhost ~]$ more .emacs
;; .emacs
;;; uncomment this line to disable loading of "default.el" at startup
;; (setq inhibit-default-init t)
;; turn on font-lock mode
(when (fboundp 'global-font-lock-mode)
(global-font-lock-mode t))
;; enable visual feedback on selections
;(setq transient-mark-mode t)
;; default to better frame titles
(setq frame-title-format
(concat "%b - emacs@" (system-name)))
;; default to unified diffs
(setq diff-switches "-u")
;; always end a file with a newline
;(setq require-final-newline 'query)
(custom-set-variables
;; custom-set-variables was added by Custom -- don't edit or cut/paste it!
;; Your init file should contain only one such instance.
'(auto-compression-mode t nil (jka-compr))
'(case-fold-search t)
'(current-language-environment "Chinese-GB")
'(default-input-method "chinese-py-punct")
'(global-font-lock-mode t nil (font-lock))
'(show-paren-mode t nil (paren))
'(transient-mark-mode t))
(custom-set-faces
;; custom-set-faces was added by Custom -- don't edit or cut/paste it!
;; Your init file should contain only one such instance.
)
Useful memo is here:
C-f move forward one character
C-b move backward one character
M-f move forward one word
M-b move backward one word
C-a move ahead of line
C-e move to the end of line
M-a move ahead of statement
M-e move to end of statement
M-{ move to paragraph beginning
M-} move to paragraph end
C-n move to next line
C-p move to previous line
C-v continue to view
M-v return to view
C-l view in middle
-------------------------------------these are move key sequences
--more enhanced in C mode:
C-M-a move to function ahead
C-M-e move to function end
M-m move to mark beginning
C-M-p move to previous block {
C-M-n move to next block }
M-; add comment here
M-x comment-region comment activated region
C-x C-u current preprocessor conditional
C-x C-p previous preprocessor conditional
C-x C-n next preprocessor conditional
C-/ fill activated region
M-j jump to next line and continue comment
M-q fill current comment region
-------with etags(M-! etags * --language=c RET):
M-x visit-tags-table load TAGS
M-. search word under cursor according to TAGS table
M-, search forward
--------using bookmark:
C-x r m bookmark cursor with a name
C-x r b jump to bookmark (input name)
-------------------------------------about frame and buffer
C-x b switch to previous buffer
C-x C-b select buffer by name
C-x k close buffer by name
C-x C-q lock buffer (read-only)
C-x 0 close current frame
C-x 1 keep only current frame
C-x 2 horizontally split frame
C-x 3 vertically split frame
C-M-v continue view in the other frame
M-x compare-windows (set cursor first)
------------------------------------------search and replace
C-s C-w search word under cursor
C-s search increasely
C-r search return
M-% replace
------------------------------------------select and operation
C-@ mark region beginning(then cursor position is the end)
C-x C-x exchange region begining and cursor
C-w remove region to kill-ring
M-w copy region to kill-ring
C-k kill to line end
C-y yank back the nearest region in kill-ring
M-y select and yank back region in kill-ring
C-/ undo previous action
C-x C-t exchange line in context
C-t exchange character in context
M-t exchange word in context
---------------------------------------when compile
M-x compile compile current buffer
C-x ` jump to the line complier report error at
M-p view report previous
M-n view report next
;; .emacs
;;; uncomment this line to disable loading of "default.el" at startup
;; (setq inhibit-default-init t)
;; turn on font-lock mode
(when (fboundp 'global-font-lock-mode)
(global-font-lock-mode t))
;; enable visual feedback on selections
;(setq transient-mark-mode t)
;; default to better frame titles
(setq frame-title-format
(concat "%b - emacs@" (system-name)))
;; default to unified diffs
(setq diff-switches "-u")
;; always end a file with a newline
;(setq require-final-newline 'query)
(custom-set-variables
[jin@localhost ~]$ more .emacs
;; .emacs
;;; uncomment this line to disable loading of "default.el" at startup
;; (setq inhibit-default-init t)
;; turn on font-lock mode
(when (fboundp 'global-font-lock-mode)
(global-font-lock-mode t))
;; enable visual feedback on selections
;(setq transient-mark-mode t)
;; default to better frame titles
(setq frame-title-format
(concat "%b - emacs@" (system-name)))
;; default to unified diffs
(setq diff-switches "-u")
;; always end a file with a newline
;(setq require-final-newline 'query)
(custom-set-variables
;; custom-set-variables was added by Custom -- don't edit or cut/paste it!
;; Your init file should contain only one such instance.
'(auto-compression-mode t nil (jka-compr))
'(case-fold-search t)
'(current-language-environment "Chinese-GB")
'(default-input-method "chinese-py-punct")
'(global-font-lock-mode t nil (font-lock))
'(show-paren-mode t nil (paren))
'(transient-mark-mode t))
(custom-set-faces
;; custom-set-faces was added by Custom -- don't edit or cut/paste it!
;; Your init file should contain only one such instance.
)