emacs
luyued 发布于 2011-04-08 18:02 浏览 N 次(mapcar(lambda (x)(add-to-list'load-path(expand-file-namex))) '("~/.emacs.d" "~/.emacs.d/clojure-mode" "~/.emacs.d/slime" "~/.emacs.d/swank-clojure-extra" "~/.emacs.d/haskell-mode"))
(defunrequire-all(packages) (mapcar#'requirepackages))
(require-all'( mwe-log-commands uniquify light-symbol linum color-theme gentooish ido parenface point-undo bar-cursor browse-kill-ring smart-tab clojure-test-mode undo-tree ))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Haskell
(load "~/.emacs.d/haskell-mode/haskell-site-file")(add-hook'haskell-mode-hook'turn-on-haskell-doc-mode)(add-hook'haskell-mode-hook'turn-on-haskell-indentation);;(add-hook 'haskell-mode-hook (lambda () (smart-tab-mode nil)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; GLOBAL(color-theme-initialize)
(if (string=window-system"w32") (set-default-font"-outline-Consolas-normal-r-normal-normal-14-97-96-96-c-*-iso859-1") (set-default-font"Consolas-12"t))
(if window-system (color-theme-gentooish) (color-theme-dark-laptop))
;; from http://joost.zeekat.nl/2010/06/03/slime-hints-3-interactive-completions-and-smart-tabs/
(setqhippie-expand-try-functions-list (append hippie-expand-try-functions-list'(slime-complete-symbol)))(setqsmart-tab-completion-functions-alist '((emacs-lisp-mode.lisp-complete-symbol) (text-mode.dabbrev-completion) (slime-repl-mode.slime-complete-symbol)))
(global-undo-tree-mode1)(global-smart-tab-mode1)(global-set-key"\C-R"'undo-tree-redo)(add-hook'undo-mode-visualizer-mode (define-keyundo-tree-visualizer-map (kbd"") 'undo-tree-visualizer-quit))
(browse-kill-ring-default-keybindings)(setqauto-save-list-file-prefixnil)(fset'yes-or-no-p'y-or-n-p)
(defunmy-backward-kill-word() "Kill words backward my way." (interactive) (if (bolp) (backward-delete-char1) (if (string-match"^\\s-+$"(buffer-substring(point-at-bol)(point))) (kill-region(point-at-bol)(point)) (backward-kill-word1))))
(global-set-key"\M-\d"'my-backward-kill-word)
;; From http://stackoverflow.com/questions/848936/how-to-preserve-clipboard-content-in-emacs-on-windows(defadvicekill-new(beforekill-new-push-xselection-on-kill-ringactivate) "Before putting new kill onto the kill-ring, add the clipboard/external selection to the kill ring" (let ((have-paste(and interprogram-paste-function (funcallinterprogram-paste-function)))) (whenhave-paste(pushhave-pastekill-ring))))
(global-hi-lock-mode1)(global-set-key"\C-o"'point-undo);;(global-set-key "\C-i" 'point-redo)
;; from http://stackoverflow.com/questions/589691/how-can-i-emulate-vims-search-in-gnu-emacs
(defunmy-isearch-word-at-point() (interactive) (call-interactively'isearch-forward-regexp))
(defunmy-isearch-yank-word-hook() (when(equalthis-command'my-isearch-word-at-point) (let ((string (concat"\\<" (buffer-substring-no-properties (progn(skip-syntax-backward"w_")(point)) (progn(skip-syntax-forward"w_")(point))) "\\>"))) (if (and isearch-case-fold-search (eq'not-yankssearch-upper-case)) (setqstring(downcasestring))) (setqisearch-stringstring isearch-message (concatisearch-message (mapconcat'isearch-text-char-description string"")) isearch-yank-flagt) (isearch-search-and-update))))
(add-hook'isearch-mode-hook'my-isearch-yank-word-hook)(global-set-key[M-kp-multiply]'my-isearch-word-at-point)
(bar-cursor-mode1)
;; Try to fix copy/paste(setq-defaultmode-line-buffer-identification'(#("%2b"02(facemode-line-buffer-id))))(setqtransient-mark-modet)(setqmouse-drag-copy-regionnil)(setqx-select-enable-primarynil)(setqx-select-enable-clipboardt)(setqselect-active-regionst)(global-set-key[mouse-2]'mouse-yank-primary)(cua-modet)
(delete-selection-modet)(tool-bar-mode0)(global-linum-mode)(setqlinum-format"%3d ")(setq-defaultindent-tabs-modenil)(setqindent-tabs-modenil)(winner-modet)
(tooltip-modenil)(setqline-number-modenil)(setqcolumn-number-modenil)(setqsize-indication-modenil)(setqmode-line-positionnil)(ido-mode1)
(global-set-key"\C-m"'reindent-then-newline-and-indent);No tabs(global-set-key"\C-a"'beginning-of-line-text)
(setqwindow-min-height2)(defunmaximize-window() (interactive) (let* ((other-windows(cdr (window-list))) (other-heights(* (length other-windows)window-min-height)) (my-height(- (frame-height)other-heights))) (setf(window-height)(- my-height1))))
(add-hook'term-setup-hook(lambda ()(<
上一篇:2011年01月28日 下一篇:[转]转载:可可幼儿园
相关资讯
- 07-01· 古珀行钻戒 钻石情缘
- 07-01· 庆祝古珀行珠宝乌审旗珠
- 07-01· 加盟戴梦得古珀行成就财
- 07-01· 戴梦得古珀行代表了传统
- 07-01· 527=我爱妻 爱妻就为她做点
- 07-01· 中国时尚街拍网时尚街拍
- 07-01· 财富中国名媛学堂
- 07-01· 哥特式名媛打广告:关于叛
- 07-01· 名媛最爱 2011春季新款高跟
- 07-01· 足浴店开业宣传单为你免
图文资讯
最新资讯
- 07-01· SEM深入探究-两岸职工小发
- 07-01· 柳坪中小学主要领导
- 07-01· 移植名古树和人生历炼成
- 07-01· 亿赛通苦练内功,现身“
- 07-01· 阿美,别哭
- 07-01· [有声小说 www.51ysxs.com]“把
- 07-01· 2009年 大学生就业创业论坛
- 07-01· 创意生活点亮“个性家居
- 07-01· 各界名流齐聚2010中国新丝
- 07-01· 2011世界财富小姐英才大赛