<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Erlang非业余研究 &#187; emacs</title>
	<atom:link href="http://blog.yufeng.info/archives/tag/emacs/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.yufeng.info</link>
	<description>Erlang系统深度探索和应用</description>
	<lastBuildDate>Tue, 17 Jan 2012 06:05:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>我的emacs配置</title>
		<link>http://blog.yufeng.info/archives/578</link>
		<comments>http://blog.yufeng.info/archives/578#comments</comments>
		<pubDate>Wed, 26 May 2010 10:00:38 +0000</pubDate>
		<dc:creator>Yu Feng</dc:creator>
				<category><![CDATA[杂七杂八]]></category>
		<category><![CDATA[emacs]]></category>
		<category><![CDATA[配置]]></category>

		<guid isPermaLink="false">http://blog.yufeng.info/?p=578</guid>
		<description><![CDATA[原创文章，转载请注明： 转载自Erlang非业余研究 本文链接地址: 我的emacs配置 贴上来方便有用emacs的同学。配置部分是从网上淘来的，忘记出处了，见谅！ Post Footer automatically generated by wp-posturl plugin for wordpress.]]></description>
			<content:encoded><![CDATA[<div style="margin-top: 15px; font-style: italic">
<p><strong>原创文章，转载请注明：</strong> 转载自<a href="http://blog.yufeng.info/">Erlang非业余研究</a></p>
<p><strong>本文链接地址:</strong> <a href="http://blog.yufeng.info/archives/578">我的emacs配置</a></p>
</div>
<p>贴上来方便有用emacs的同学。配置部分是从网上淘来的，忘记出处了，见谅！</p>
<pre class="brush: plain; title: ; notranslate">
;;(keyboard-translate ?\C-h ?\C-?)
(defalias 'yes-or-no-p 'y-or-n-p)

(setq time-stamp-active t)
(setq time-stamp-warn-inactive t)
(setq time-stamp-format &quot;%:y-%02m-%02d %3a %02H:%02M:%02S&quot;)
(add-hook 'write-file-hooks 'time-stamp)

(global-set-key [f2] 'rgrep)
(global-set-key [(f5)] 'eshell)
(global-set-key [C-f5] 'shell)
(global-set-key (kbd &quot;M-3&quot;) 'capitalize-word)

(global-set-key [f6] 'find-file)
(global-set-key [C-Z] nil)
(global-set-key [C-f4] 'kill-this-buffer)

(global-set-key [(f4)] 'ibuffer)
(global-set-key [(f8)] 'other-window)

(require 'color-theme)
;;(color-theme-initialize)
(color-theme-dark-blue2)
(setq font-lock-verbose t)
;;(set-default-font &quot;Bitstream Vera Sans Mono-12&quot;)
(global-font-lock-mode t)
(tool-bar-mode -1)
(setq column-number-mode t)
(setq display-battery-mode t)
(setq size-indication-mode t)
(setq default-major-mode 'outline-mode)
(add-hook 'outline-mode-hook 'turn-off-auto-fill)

(setq transient-mark-mode t)
(setq-default shell-cd-regexp nil)
(setq-default shell-pushd-regexp nil)
(setq-default shell-popd-regexp nil)
(setq inhibit-startup-message t)
(setq visible-bell t)
(setq mouse-yank-at-point t)
(setq kill-ring-max 100)
(setq default-fill-column 60)

(global-set-key (kbd &quot;M-g&quot;) 'goto-line)
(global-set-key (kbd &quot;M-o&quot;) 'ff-find-related-file)

(setq require-final-newline t)

(setq track-eol t)

(setq gnus-inhibit-startup-message t)

(setq enable-recursive-minibuffers t)
(setq auto-save-mode nil)
(setq Man-notify-method 'pushy)

(display-time-mode 1)
(setq display-time-24hr-format t)
(setq display-time-day-and-date t)
(setq display-time-use-mail-icon t)
(setq display-time-interval 10)

(tool-bar-mode -1)
(customize-set-variable 'scroll-bar-mode 'right)

(setq speedbar-show-unknown-files t)
(setq speedbar-update-flag nil)
(setq speedbar-use-images nil)
(setq speedbar-verbosity-level 0)
(global-set-key [f9] 'speedbar)

;; set paren mode
(show-paren-mode t)
(setq show-paren-style 'parentheses)
(mouse-avoidance-mode 'animate)

;; set the default username and email
(setq user-full-name &quot;yufeng&quot;)
(setq user-mail-address &quot;mryufeng@gmail.com&quot;)

;; set the title name
(setq frame-title-format &quot;Emacs - %f&quot;)

;;-------------------------Shell 使用 ansi color-------------
(autoload 'ansi-color-for-comint-mode-on &quot;ansi-color&quot; nil t)
(add-hook 'shell-mode-hook 'ansi-color-for-comint-mode-on)

(require 'uniquify)
(setq
  uniquify-buffer-name-style 'post-forward
  uniquify-separator &quot;:&quot;)

;;
(require 'ibuffer)
(global-set-key (kbd &quot;C-x C-b&quot;) 'ibuffer)
(require 'ido)
(ido-mode t)

;;-------------------------让Emacs拥有tabs-------------------
(require 'tabbar)
(setq tabbar-buffer-groups-function
          (lambda ()
            (list &quot;All&quot;)))

(tabbar-mode)
(global-set-key [(control shift tab)] 'tabbar-backward)
(global-set-key [(control tab)] 'tabbar-forward)
(global-set-key (kbd &quot;M-1&quot;) 'tabbar-backward)
(global-set-key (kbd &quot;M-2&quot;) 'tabbar-forward) 

;;(require 'session)
;;(add-hook 'after-init-hook 'session-initialize)
;;(load &quot;desktop&quot;)
;;(desktop-load-default)
;;(desktop-read)
;;(setq desktop-save-mode t)

(require 'browse-kill-ring)
(global-set-key [(control c)(k)] 'browse-kill-ring)
(browse-kill-ring-default-keybindings)

;;erlang
;;(require 'erlang-eunit)
;;(load &quot;erlang_appwiz&quot; t nil)
(global-set-key [f3] 'erlang-next-error)
(global-set-key [C-f7] 'erlang-compile)
(global-set-key [f7] 'compile)
(global-set-key [f10] 'linum-mode)

;;distel
(add-to-list 'load-path &quot;/usr/local/share/distel/elisp&quot;)
(require 'distel)
(distel-setup)
;; Some Erlang customizations
(add-hook 'erlang-mode-hook
	    (lambda ()
	          ;; when starting an Erlang shell in Emacs, default in the node name
`	          (setq inferior-erlang-machine-options '(&quot;-sname&quot; &quot;emacs&quot;))
		      ;; add Erlang functions to an imenu menu
		      (imenu-add-to-menubar &quot;imenu&quot;)))

;; A number of the erlang-extended-mode key bindings are useful in the shell too
(defconst distel-shell-keys
  '((&quot;\C-\M-i&quot;   erl-complete)
    (&quot;\M-?&quot;      erl-complete)
    (&quot;\M-.&quot;      erl-find-source-under-point)
    (&quot;\M-,&quot;      erl-find-source-unwind)
    (&quot;\M-*&quot;      erl-find-source-unwind)
    )
  &quot;Additional keys to bind when in Erlang shell.&quot;)

(add-hook 'erlang-shell-mode-hook
	    (lambda ()
	          ;; add some Distel bindings to the Erlang shell
	          (dolist (spec distel-shell-keys)
		          (define-key erlang-shell-mode-map (car spec) (cadr spec)))))

;wrangler
(add-to-list 'load-path &quot;/usr/local/share/wrangler/elisp&quot;)
(require 'wrangler) 

;;ecb
(require 'xcscope)
(require 'cedet) ;;load cedet
(require 'ecb) ;;load ecb

(setq ecb-tip-of-the-day nil
inhibit-startup-message t
ecb-auto-compatibility-check nil
ecb-version-check nil)

(global-set-key [f12] 'ecb-activate)
(global-set-key [C-f12] 'ecb-deactivate)
(global-set-key [f11] 'delete-other-windows)
(global-set-key [(meta return)] 'semantic-ia-complete-symbol-menu)
(global-set-key (kbd &quot;C-c e&quot;) 'ecb-goto-window-edit-last)
(global-set-key (kbd &quot;C-c s&quot;) 'ecb-goto-window-sources)
(global-set-key (kbd &quot;C-c d&quot;) 'ecb-goto-window-directories)
(global-set-key (kbd &quot;C-c m&quot;) 'ecb-goto-window-methods)
(global-set-key (kbd &quot;C-c h&quot;) 'ecb-goto-window-history)
(global-set-key (kbd &quot;C-c r&quot;) 'ecb-redraw-layout)
(global-set-key (kbd &quot;C-.&quot;) 'cscope-find-global-definition-no-prompting)
(global-set-key (kbd &quot;C-,&quot;) 'cscope-pop-mark)
(custom-set-variables
  ;; custom-set-variables was added by Custom.
  ;; If you edit it by hand, you could mess it up, so be careful.
  ;; Your init file should contain only one such instance.
  ;; If there is more than one, they won't work right.
 '(ecb-options-version &quot;2.32&quot;)
 '(safe-local-variable-values (quote ((erlang-indent-level . 2)))))
(custom-set-faces
  ;; custom-set-faces was added by Custom.
  ;; If you edit it by hand, you could mess it up, so be careful.
  ;; Your init file should contain only one such instance.
  ;; If there is more than one, they won't work right.
 )

;;msf abbrev
(add-to-list 'load-path &quot;~/emacs&quot;)
;; ensure abbrev mode is always on
(setq-default abbrev-mode t)
;; do not bug me about saving my abbreviations
(setq save-abbrevs nil)
;; load up modes I use
(require 'cc-mode)
;;(require 'perl-mode)
;;(require 'cperl-mode)
;;(require 'sh-script)
;;(require 'shell)
;;(require 'lua-mode)
;;(require 'erlang)
;; load up abbrevs for these modes
(require 'msf-abbrev)
(setq msf-abbrev-verbose t) ;; optional
(setq msf-abbrev-root &quot;~/emacs/mode-abbrevs&quot;)
(global-set-key (kbd &quot;C-c l&quot;) 'msf-abbrev-goto-root)
(global-set-key (kbd &quot;C-c a&quot;) 'msf-abbrev-define-new-abbrev-this-mode)
(msf-abbrev-load)

;;go mode
(require 'go-mode-load)
(require 'tramp)

;;gud
(add-hook 'gdb-mode-hook '(lambda ()
                            (define-key c-mode-base-map [(f5)] 'gud-go)
                            (define-key c-mode-base-map [(f7)] 'gud-step)
                            (define-key c-mode-base-map [(f8)] 'gud-next)))

(defvar no-easy-keys-minor-mode-map (make-keymap)
  &quot;no-easy-keys-minor-mode keymap.&quot;)
(let ((f (lambda (m)
           `(lambda () (interactive)
              (message (concat &quot;No! use &quot; ,m &quot; instead.&quot;))))))
  (dolist (l '((&quot;&lt;left&gt;&quot; . &quot;C-b&quot;) (&quot;&lt;right&gt;&quot; . &quot;C-f&quot;) (&quot;&lt;up&gt;&quot; . &quot;C-p&quot;)
               (&quot;&lt;down&gt;&quot; . &quot;C-n&quot;)
               (&quot;&lt;C-left&gt;&quot; . &quot;M-f&quot;) (&quot;&lt;C-right&gt;&quot; . &quot;M-b&quot;) (&quot;&lt;C-up&gt;&quot; . &quot;M-{&quot;)
               (&quot;&lt;C-down&gt;&quot; . &quot;M-}&quot;)
               (&quot;&lt;M-left&gt;&quot; . &quot;M-f&quot;) (&quot;&lt;M-right&gt;&quot; . &quot;M-b&quot;) (&quot;&lt;M-up&gt;&quot; . &quot;M-{&quot;)
               (&quot;&lt;M-down&gt;&quot; . &quot;M-}&quot;)
               (&quot;&lt;delete&gt;&quot; . &quot;C-d&quot;) (&quot;&lt;C-delete&gt;&quot; . &quot;M-d&quot;)
               (&quot;&lt;M-delete&gt;&quot; . &quot;M-d&quot;) (&quot;&lt;next&gt;&quot; . &quot;C-v&quot;) (&quot;&lt;C-next&gt;&quot; . &quot;M-x &lt;&quot;)
               (&quot;&lt;prior&gt;&quot; . &quot;M-v&quot;) (&quot;&lt;C-prior&gt;&quot; . &quot;M-x &gt;&quot;)
               (&quot;&lt;home&gt;&quot; . &quot;C-a&quot;) (&quot;&lt;C-home&gt;&quot; . &quot;M-&gt;&quot;)
               (&quot;&lt;C-home&gt;&quot; . &quot;M-&lt;&quot;) (&quot;&lt;end&gt;&quot; . &quot;C-e&quot;) (&quot;&lt;C-end&gt;&quot; . &quot;M-&gt;&quot;)))
    (define-key no-easy-keys-minor-mode-map
      (read-kbd-macro (car l)) (funcall f (cdr l)))))
(define-minor-mode no-easy-keys-minor-mode
  &quot;A minor mode that disables the arrow-keys, pg-up/down, delete
  and backspace.&quot;  t &quot; no-easy-keys&quot;
  'no-easy-keys-minor-mode-map :global t)
(no-easy-keys-minor-mode 1)

(require 'smex)
(smex-initialize)

(global-set-key (kbd &quot;M-x&quot;) 'smex)
(global-set-key (kbd &quot;M-X&quot;) 'smex-major-mode-commands)

(require 'org-install)
(add-to-list 'auto-mode-alist '(&quot;\\.org$&quot; . org-mode))
(define-key global-map &quot;\C-cl&quot; 'org-store-link)
(define-key global-map &quot;\C-ca&quot; 'org-agenda)
(setq org-log-done t)

(setq transient-mark-mode t) ; highlight text selection
(setq delete-selection-mode t) ; delete seleted text when typing

; highlight current line
(require 'hl-line)
(global-hl-line-mode t)
</pre>
<div style="margin-top: 0; margin-bottom: 15px; color: #888888; font-size: 80%; font-style: italic">
<p>Post Footer automatically generated by <a href="http://easwy.com/blog/wordpress/wp-posturl/" style="color: #8888FF; text-decoration: underline;">wp-posturl plugin</a> for wordpress.</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.yufeng.info/archives/578/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>emacs msf-abbrev写c程序 (火箭一样快)</title>
		<link>http://blog.yufeng.info/archives/384</link>
		<comments>http://blog.yufeng.info/archives/384#comments</comments>
		<pubDate>Tue, 06 Apr 2010 13:22:25 +0000</pubDate>
		<dc:creator>Yu Feng</dc:creator>
				<category><![CDATA[杂七杂八]]></category>
		<category><![CDATA[emacs]]></category>
		<category><![CDATA[msf-abbrev]]></category>

		<guid isPermaLink="false">http://blog.yufeng.info/?p=384</guid>
		<description><![CDATA[原创文章，转载请注明： 转载自Erlang非业余研究 本文链接地址: emacs msf-abbrev写c程序 (火箭一样快) 看图不说话: 有兴趣的同学google之! Post Footer automatically generated by wp-posturl plugin for wordpress.]]></description>
			<content:encoded><![CDATA[<div style="margin-top: 15px; font-style: italic">
<p><strong>原创文章，转载请注明：</strong> 转载自<a href="http://blog.yufeng.info/">Erlang非业余研究</a></p>
<p><strong>本文链接地址:</strong> <a href="http://blog.yufeng.info/archives/384">emacs msf-abbrev写c程序 (火箭一样快)</a></p>
</div>
<p><strong>看图不说话:</strong></p>
<p><a href="http://blog.yufeng.info/image/msf-abbrev-demo.gif"><img src="http://blog.yufeng.info/image/msf-abbrev-demo.gif" alt="" title="msf-abbrev-demo" /></a></p>
<p><strong>有兴趣的同学google之!</strong></p>
<div style="margin-top: 0; margin-bottom: 15px; color: #888888; font-size: 80%; font-style: italic">
<p>Post Footer automatically generated by <a href="http://easwy.com/blog/wordpress/wp-posturl/" style="color: #8888FF; text-decoration: underline;">wp-posturl plugin</a> for wordpress.</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.yufeng.info/archives/384/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Go lang的emacs mode设置</title>
		<link>http://blog.yufeng.info/archives/120</link>
		<comments>http://blog.yufeng.info/archives/120#comments</comments>
		<pubDate>Thu, 12 Nov 2009 09:11:58 +0000</pubDate>
		<dc:creator>Yu Feng</dc:creator>
				<category><![CDATA[杂七杂八]]></category>
		<category><![CDATA[emacs]]></category>
		<category><![CDATA[go]]></category>
		<category><![CDATA[mode]]></category>

		<guid isPermaLink="false">http://blog.yufeng.info/?p=120</guid>
		<description><![CDATA[原创文章，转载请注明： 转载自Erlang非业余研究 本文链接地址: Go lang的emacs mode设置 昨天新发布的Go还是很不错的，而且随机带了个emacs的模式　用起来很方便。 CTRL+D 搞定收工。 Post Footer automatically generated by wp-posturl plugin for wordpress.]]></description>
			<content:encoded><![CDATA[<div style="margin-top: 15px; font-style: italic">
<p><strong>原创文章，转载请注明：</strong> 转载自<a href="http://blog.yufeng.info/">Erlang非业余研究</a></p>
<p><strong>本文链接地址:</strong> <a href="http://blog.yufeng.info/archives/120">Go lang的emacs mode设置</a></p>
</div>
<p>昨天新发布的Go还是很不错的，而且随机带了个emacs的模式　用起来很方便。</p>
<pre class="brush: bash; title: ; notranslate">
root@nd-desktop:/usr/src/golang# pwd
/usr/src/golang
root@nd-desktop:/usr/src/golang#  ls misc/emacs/
go-mode.el  go-mode-load.el

root@nd-desktop:/usr/src/golang# cp misc/emacs/*.el ~/.emacs.d

root@nd-desktop:/usr/src/golang# cat &amp;gt;&amp;gt; ~/.emacs
&lt;code&gt;(setq load-path (cons (expand-file-name &quot;~/.emacs.d/&quot;) load-path))
(require 'go-mode-load)&lt;/code&gt;
</pre>
<p>CTRL+D<br />
搞定收工。
<div style="margin-top: 0; margin-bottom: 15px; color: #888888; font-size: 80%; font-style: italic">
<p>Post Footer automatically generated by <a href="http://easwy.com/blog/wordpress/wp-posturl/" style="color: #8888FF; text-decoration: underline;">wp-posturl plugin</a> for wordpress.</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.yufeng.info/archives/120/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

