Emacs

Emacs

这个编辑器一直都是我的心头好,是属于那种都懒得和别人说这个东西有多好的心头好。

最近 TapTap 的同事们搞了个 Tap 色彩主题的代码高亮,瞄了一眼竟然提供 emacs 的格式,于是重新捡起来折腾了一下。还是好玩的。

晚上回到家里电脑里翻箱倒柜的挖了一下以前的 .emacs 配置文件。补了最新的邮箱>_< 这里贴一下,反正也没什么重要信息,估计我后续也不太会去常用了。因为不用,所以想念,大概是这种感觉。

从最初在 Solaris 上摸索着 emacs 写阿尔卡特手机的测试用例,用着 clearcase 和 rational rose,到现在,这个配置文件已经快 20 年了。岁月真是把杀猪刀。希望在用几年的时间把工作做平顺后,每天仍然能够有时间打开 emacs 把玩摩挲。

;(set-background-color "AntiqueWhite")
;(set-background-color "black")
;(set-background-color "azure")

(global-font-lock-mode t)

(show-paren-mode 1)
(setq show-paren-style 'parentheses)
(setq next-line-add-newlines nil)

(setq frame-title-format "emacs@%b")

(set-language-environment 'Chinese-GB)
;(set-language-environment "Japanese")

;;
;; Lua HightLight Support.
;;
(load-file "~/emacs/config/lua-mode.el")

;;
;; CHINESE
;;
; (setq w32-charset-info-alist
; (cons '("gbk" w32-charset-gb2312 . 936) w32-charset-info-alist))

;;;;for change default font size.
; (create-fontset-from-fontset-spec
; "--Courier New-normal-r---12----c-*-fontset-gbk" t)

; (load-file "~/emacs/config/mule-gbk/chinese-gbk.el")
; (load-file "~/emacs/config/mule-gbk/fontset-gbk.el")

; (set-w32-system-coding-system 'chinese-gbk)
; (set-selection-coding-system 'chinese-gbk)
; (set-keyboard-coding-system 'chinese-gbk)
; (set-language-environment 'chinese-gbk)
; (setq locale-coding-system 'chinese-gbk)
; (setq current-language-environment "Chinese-GBK")

; (load-file "~/emacs/config/mule-gbk/characters-gbk.el")

; (setq default-frame-alist
; '(
; (foreground-color . "Wheat")
; (background-color . "DarkSlateGray")
; (cursor-color . "Orchid")
; )
; )

; (setq default-frame-alist
; (append
; '((font . "fontset-gbk"))
; default-frame-alist))

;;
;; time display
;;
(setq display-time-24hr-format t)
(setq display-time-day-and-date t)
(display-time)

;;
;; todo setting
;;
(setq todo-file-do "~/emacs/todo/do")
(setq todo-file-done "~/emacs/todo/done")
(setq todo-file-top "~/emacs/todo/top")

(setq diary-file "~/emacs/diary")
;(setq diary-mail-addr "xietianmin@sega-wow.com")
;(setq diary-mail-addr "tmxie@ubisoft.com.cn")
;(setq diary-mail-addr "tian-min.xie@ubisoft.com")
;(setq diary-mail-addr "tianmin.xie@staff.epicgameschina.com")
;(setq diary-mail-addr "tianmin.xie@epicgames.com")
(setq diary-mail-addr "tianmin.xie@xd.com")
(add-hook 'diary-hook 'appt-make-list)

(setq search-highlight t)
(setq query-replace-highlight t)

(require 'cc-mode)
(c-set-offset 'substatement-open 0)

(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-save-interval 100)
'(c++-font-lock-extra-types (quote ("\sw+t"
"\([iof]\|str\)+stream\(buf\)?"
"ios"
"string"
"FString"
"rope"
"list"
"slist"
"deque"
"vector"
"rotator"
"bit_vector"
"set"
"multiset"
"map"
"multimap"
"hash\(\(m\(ap\|ulti\(map\|set\)\)\|set\)\)?"
"stack"
"queue"
"priority_queue"
"iterator"
"const_iterator"
"reverse_iterator"
"const_reverse_iterator"
"reference"
"const_reference"
"DWORD"
"BOOL"
"UBOOL"
"NLsint32"
"NLuint32"
"NLint"
"NLfloat"
"NLangle"
"NLuint8"
"NLpoint2"
"NLpoint3"
"Vertex"
"Vector"
"FVector"
"FRotator"
"Angle3D"
"POINT2D_F"
"DDB"
"DDBObj"
"ActionClass"
"AnimationClass"
"CharacterClass"
"GameUIWindowManager"
"GameUIButtonWindow"
"SpriteBase"
"StringPut"
"GameUIWindow"
"INT"
"FLOAT"
"TRUE"
"FALSE"
"Actor") ) )
'(c-default-style "cc-mode")
'(c-echo-syntactic-information-p t)
'(c-font-lock-extra-types (quote ("FILE" "\sw+_t" "bool" "BOOL" "virtual" "friend" "inline" "NLfloat" "NLsint32" "NL_MATRIX")))
'(c-macro-preprocessor "/usr/bin/cpp -C")
'(column-number-mode t)
'(compile-command "make clean; make")
'(exec-path (quote ("C:/cygwin/bin" "c:/WINNT/system32" "C:/WINNT" "C:/WINNT/System32/Wbem" "C:/Program Files/Metrowerks/ATtaCK/bin" "C:/Program Files/Microsoft Visual Studio/VSS/win32" "" )))
'(font-lock-maximum-size 512000)
'(indent-tabs-mode nil)
'(tool-bar-mode nil)
'(message-send-mail-function (quote smtpmail-send-it) t)
'(msdos-shells (quote ("command.com")))
'(netstat-program-options (quote ("-n")))
'(shell-file-name "bash")
'(standard-indent 4)
'(tab-stop-list nil)
'(tab-width 4)
'(user-full-name "XIE TianMin"))

;;
;; key binding
;;
(progn
(global-set-key [f1] (lambda () (interactive) (manual-entry (current-word)) ) )
(global-set-key [C-f2] 'point-to-register)
(global-set-key [f2] 'register-to-point)
(global-set-key [f3] 'goto-line)
(global-set-key [f4] 'append-next-kill)
(global-set-key [f5] 'set-mark-command)
(global-set-key [f6] 'kill-region)
(global-set-key [f7] 'copy-to-register)
(global-set-key [f8] 'insert-register)
(global-set-key [f9] 'compile)
(global-set-key [f11] 'list-buffers)
(global-set-key [f12] 'list-bookmarks)
(global-set-key [C-return] 'shell-command)
(global-set-key [C-tab] 'switch-to-buffer)
)

;;
;; lua mode autoload.
;;
(autoload 'lua-mode "lua-mode" "Mode for editing lua source files")
(setq auto-mode-alist (append '(("\.lua$" . lua-mode)) auto-mode-alist))
(setq interpreter-mode-alist (append '(("lua" . lua-mode)) interpreter-mode-alist))

;; This assumes that Cygwin is installed in C:\cygwin (the
;; default) and that C:\cygwin\bin is not already in your
;; Windows Path (it generally should not be).
;;
(setenv "PATH" (concat "C:\cygwin\bin;" (getenv "PATH")))
;;
;; NT-emacs assumes a Windows command shell, which you change
;; here.
;;
(setq process-coding-system-alist '(("bash" . undecided-unix)))
(setenv "SHELL" shell-file-name)
(setq explicit-shell-file-name shell-file-name)
;;
;; This removes unsightly ^M characters that would otherwise
;; appear in the output of java applications.
;;
(add-hook 'comint-output-filter-functions
'comint-strip-ctrl-m)

; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;(require 'gnus-load)

;(setq gnus-startup-file "~/emacs/config/newsrc")
;(setq gnus-init-file "~/emacs/config/gnus-config")

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; TEST
(add-hook 'find-file-hooks 'auto-insert)

(add-to-list 'load-path "~/emacs/config")
;(require 'color-theme)
;(color-theme-standard)
;(color-theme-jsc-light2)
;(color-theme-comidia)
;(color-theme-midnight)
;(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.
;)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; WIN32 MAX FRAME
(defun w32-restore-frame (&optional arg)
"Restore a minimized frame"
(interactive)
(w32-send-sys-command 61728 arg))
(defun w32-maximize-frame (&optional arg)
"Maximize the current frame"
(interactive)
(w32-send-sys-command 61488 arg))
;(w32-maximize-frame)
;(add-hook 'after-make-frame-functions 'w32-maximize-frame)

;;EMMS player (a music/video player for emacs)
(add-to-list 'load-path "~/emacs/emms-3.0/")
(add-to-list 'load-path "C:/mplayer/")
(add-to-list 'exec-path "C:/mplayer/")
(require 'emms)
(require 'emms-player-simple)
(require 'emms-source-file)
(require 'emms-source-playlist)
(require 'emms-player-mplayer)
(require 'emms-browser)
(setq emms-player-list '(emms-player-mpg321
emms-player-ogg123
emms-player-mplayer) )
; emms-source-list '((emms-directory-tree "D:/My Music/")) )

;
; remember
;
(add-to-list 'load-path "~/emacs/config/remember")
(require 'remember)

;
; Perforce
; (setenv "P4PORT" "10.195.0.13:1676") ubi
; (setenv "P4CLIENT" "timDebugView")
; (setenv "P4USER" "tmxie")
;; egc
;(setenv "P4PORT" "192.168.0.250:1667")
;(setenv "P4CLIENT" "xietianmin.trunk.work")
;(setenv "P4USER" "xietianmin")
;(load-file "~/emacs/config/p4.el")

; Unreal Script mode
(load-file "~/emacs/config/unrealscript-mode.el")

11x 程序员专属 TapTap 代码编辑器主题: https://mp.weixin.qq.com/s/5cjBCowRHDZuxAVMFMADpA