my .emacs

原创 2006年05月25日 13:53:00
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.
 )

相关文章推荐

How Emacs change my Life.pdf

  • 2014年09月27日 11:38
  • 856KB
  • 下载

my-emacs.d

  • 2017年11月17日 08:11
  • 59.9MB
  • 下载

my emacs configure

(setq split-height-threshold nil) (setq split-width-threshold 0) ;;shell 乱码 (setq ansi-co...
  • wbgxx
  • wbgxx
  • 2011年10月18日 10:00
  • 442

My Emacs 的配置文件--有待续写

每次重装emacs,都要重写其”.emacs“,还有一大堆东西,总忘,索性,写下来: Date:2012.04.06 我的emacs配置文件为:(这是win7的,所以,在linux下要适当的改一下...

Emacs_UserGuide

  • 2015年12月22日 14:13
  • 641KB
  • 下载

IBM_emacs学习资料(7章)

  • 2016年01月21日 11:36
  • 5.27MB
  • 下载

[EMACS]helm学习备忘

helm学习笔记

emacs help doc wget

  • 2012年06月27日 07:29
  • 17.58MB
  • 下载

Emacs使用记录

  • 2012年08月06日 17:16
  • 25KB
  • 下载

[Emacs] 1.3 我的常用按键配置

更新.emacs;;; 按键设置 (add-to-list 'load-path "~/.emacs.d/lisp/") (load "key.el")然后在.emacs.d中新建文件夹lisp,并新...
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:my .emacs
举报原因:
原因补充:

(最多只允许输入30个字)