Differences between revisions 1 and 8 (spanning 7 versions)
Revision 1 as of 2007-01-13 03:30:15
Size: 466
Editor: nickcheng
Comment:
Revision 8 as of 2007-01-15 05:35:25
Size: 3033
Editor: nickcheng
Comment:
Deletions are marked like this. Additions are marked like this.
Line 10: Line 10:
= 文章大标 =
''简述''
== 章标题1 ==
= Emacs23 (Unicode branch) =
''Emacs23是Emacs在CVS中的一个分支: emacs-unicode-2 branch, 这个分支的内部编码改为了Unicode. 这样一来, 在Emacs21和Emacs22中困扰咱们的中文问题就直接迎刃而解了! 再也不用配置那么一大堆CJK的东东了!''
 * 据目前的了解, Emacs的主力都在应对Emacs22的最后的bug, 也许是RMS想现Release Emacs22, 然后再把主力放入Emacs23的开发. -- ["nickcheng"] [[[DateTime(2007-01-13T03:40:42Z)]]]
== 下载 ==
Line 14: Line 15:
=== 小节标题1 === === Win32平台 ===
 * http://ntemacs.sourceforge.net/
   * 这下面有编译好的22, 23版本的exe文件, 还有打包的源代码. -- ["nickcheng"]
=== Linux平台 ===
 * 期待您的添加
=== 其他平台 ===

==== MacOS ====
 * 期待您的添加
==== Any others? ====
 * 期待您的添加

== 配置 ==

=== 用于Python开发的配置 ===
'' 在啄木鸟, 当然要说Python相关的话题了! ''
 * 期待您的添加

== 技巧 ==

=== .emacs文件的位置 ===

=== 如何方便的加载配置 ===

=== Folding ===
'' 参考: http://groups.google.ca/group/comp.lang.python/browse_thread/thread/43a4d75404cc64fe/956f1c2d37f93995?&hl=en#956f1c2d37f93995 ''
python-mode不带folding功能. 我们只能使用Emacs内建的outline-minor-mode, 来为python设置不同的outline-regexp和outline-level. 参考下面的代码:
Line 16: Line 43:
#!python
Python code
;; setup python mode
(setq auto-mode-alist ; trigger python mode automatically
      (cons '("\\.py$" . python-mode) auto-mode-alist))
(setq interpreter-mode-alist
      (cons '("python" . python-mode)
            interpreter-mode-alist))
(autoload 'python-mode "python-mode" "Python editing mode." t)
; add my customization
(add-hook 'python-mode-hook 'my-python-hook)
; this gets called by outline to deteremine the level. Just use the length of the whitespace
(defun py-outline-level ()
  (let (buffer-invisibility-spec)
    (save-excursion
      (skip-chars-forward "\t ")
      (current-column))))
; this get called after python mode is enabled
(defun my-python-hook ()
  ; outline uses this regexp to find headers. I match lines with no indent and indented "class"
  ; and "def" lines.
  (setq outline-regexp "[^ \t]\\|[ \t]*\\(def\\|class\\) ")
  ; enable our level computation
  (setq outline-level 'py-outline-level)
  ; do not use their \C-c@ prefix, too hard to type. Note this overides some python mode bindings
  (setq outline-minor-mode-prefix "\C-c")
  ; turn on outline mode
  (outline-minor-mode t)
  ; initially hide all but the headers
  (hide-body)
  ; I use CUA mode on the PC so I rebind these to make the more accessible
  (local-set-key [?\C-\t] 'py-shift-region-right)
  (local-set-key [?\C-\S-\t] 'py-shift-region-left)
  ; make paren matches visible
  (show-paren-mode 1)
)
Line 19: Line 78:

==== 次节标题1 ====
xxx

== 章标题2 ==

=== 小节标题2 ===
{{{
其它
代码引用
}}}

==== 次节标题2 ====
yyy

含有章节索引的中文 文章模板

::-- ["nickcheng"] [DateTime(2007-01-13T03:30:15Z)] TableOfContents

1. Emacs23 (Unicode branch)

Emacs23是Emacs在CVS中的一个分支: emacs-unicode-2 branch, 这个分支的内部编码改为了Unicode. 这样一来, 在Emacs21和Emacs22中困扰咱们的中文问题就直接迎刃而解了! 再也不用配置那么一大堆CJK的东东了!

  • 据目前的了解, Emacs的主力都在应对Emacs22的最后的bug, 也许是RMS想现Release Emacs22, 然后再把主力放入Emacs23的开发. -- ["nickcheng"] [DateTime(2007-01-13T03:40:42Z)]

1.1. 下载

1.1.1. Win32平台

1.1.2. Linux平台

  • 期待您的添加

1.1.3. 其他平台

1.1.3.1. MacOS

  • 期待您的添加

1.1.3.2. Any others?

  • 期待您的添加

1.2. 配置

1.2.1. 用于Python开发的配置

在啄木鸟, 当然要说Python相关的话题了!

  • 期待您的添加

1.3. 技巧

1.3.1. .emacs文件的位置

1.3.2. 如何方便的加载配置

1.3.3. Folding

参考: http://groups.google.ca/group/comp.lang.python/browse_thread/thread/43a4d75404cc64fe/956f1c2d37f93995?&hl=en#956f1c2d37f93995 python-mode不带folding功能. 我们只能使用Emacs内建的outline-minor-mode, 来为python设置不同的outline-regexp和outline-level. 参考下面的代码:

;; setup python mode
(setq auto-mode-alist ; trigger python mode automatically
      (cons '("\\.py$" . python-mode) auto-mode-alist))
(setq interpreter-mode-alist
      (cons '("python" . python-mode)
            interpreter-mode-alist))
(autoload 'python-mode "python-mode" "Python editing mode." t)
; add my customization
(add-hook 'python-mode-hook 'my-python-hook)
; this gets called by outline to deteremine the level. Just use the length of the whitespace
(defun py-outline-level ()
  (let (buffer-invisibility-spec)
    (save-excursion
      (skip-chars-forward "\t ")
      (current-column))))
; this get called after python mode is enabled
(defun my-python-hook ()
  ; outline uses this regexp to find headers. I match lines with no indent and indented "class"
  ; and "def" lines.
  (setq outline-regexp "[^ \t]\\|[ \t]*\\(def\\|class\\) ")
  ; enable our level computation
  (setq outline-level 'py-outline-level)
  ; do not use their \C-c@ prefix, too hard to type. Note this overides some python mode bindings
  (setq outline-minor-mode-prefix "\C-c")
  ; turn on outline mode
  (outline-minor-mode t)
  ; initially hide all but the headers
  (hide-body)
  ; I use CUA mode on the PC so I rebind these to make the more accessible
  (local-set-key [?\C-\t] 'py-shift-region-right)
  (local-set-key [?\C-\S-\t] 'py-shift-region-left)
  ; make paren matches visible
  (show-paren-mode 1)
) 

Emacs23 (last edited 2010-01-11 17:55:01 by flyinflash)