(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. '(blink-cursor-mode nil) '(column-number-mode t) '(display-time-mode t) '(inhibit-startup-screen t) '(show-paren-mode t) '(size-indication-mode t) '(speedbar-show-unknown-files t) '(uniquify-buffer-name-style (quote forward) nil (uniquify))) ;; (set-background-color "SeaGreen4") ;; don't backup file in *.*~ format (setq make-backup-files nil) (global-linum-mode t) (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. '(default ((t (:inherit nil :stipple nil :background "grey10" :foreground "SeaGreen2" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 133 :width normal :foundry "unknown" :family "文泉驛等寬微米黑")))) '(font-lock-comment-face ((t (:foreground "MediumAquamarine")))) '(font-lock-constant-face ((((class color) (background dark)) (:bold t :foreground "LimeGreen")))) '(font-lock-doc-string-face ((t (:foreground "LimeGreen")))) '(font-lock-function-name-face ((t (:foreground "SkyBlue")))) '(font-lock-keyword-face ((t (:bold t :foreground "seagreen1")))) '(font-lock-string-face ((t (:foreground "LimeGreen")))) '(highlight-changes ((((min-colors 88) (class color)) (:foreground "seagreen4"))))) ;; keep this info :background "SeaGreen4" :foreground "black" ;;display buffer name after emacs@ (setq frame-title-format "emacs@%b") ;;Ignore ^M in mixed (LF and CR+LF) line ended textfiles ;(setq buffer-display-table (make-display-table)) ;(aset buffer-display-table ?\^M []) ;;Replace all freakin' ^M chars in the current buffer ;; (fset 'replace-ctrlms ;; [escape ?< escape ?% ?\C-q ?\C-m return ?\C-q ?\C-j return ?!]) ;; (global-set-key "\C-cm" 'replace-ctrlms) ;; Hiding ^M in emacs (defun remove-dos-eol () "Do not show ^M in files containing mixed UNIX and DOS line endings." (interactive) (setq buffer-display-table (make-display-table)) (aset buffer-display-table ?\^M [])) (add-hook 'text-mode-hook 'remove-dos-eol) ;; To make system copy work with Emacs paste and Emacs copy work with system paste (setq x-select-enable-clipboard t) (setq interprogram-paste-function 'x-cut-buffer-or-selection-value) (set-fontset-font "fontset-default" 'han "WenQuanYi Micro Hei Mono") ;;全局缩放字体的函数 ;;(global-set-key [(control x) (meta -)] (lambda () (interactive) (bhj-step-frame-font-size -1))) ;;(global-set-key [(control x) (meta +)] (lambda () (interactive) (bhj-step-frame-font-size 1))) ;; Bonus: to get these things to happen in Emacs without having to reload your whole .emacs, ;; do C-x e with the cursor just after the close paren of each of those expressions in the .emacs buffer. (defun nuke-all-buffers () (interactive) (mapcar 'kill-buffer (buffer-list)) (delete-other-windows)) (global-set-key (kbd "C-x K") 'nuke-all-buffers) (put 'scroll-left 'disabled nil) (global-set-key (kbd "C-x c") "\M-m\C- \C-e\M-w") (defun copy-line (arg) "Copy lines (as many as prefix argument) in the kill ring" (interactive "p") (kill-ring-save (line-beginning-position) (line-beginning-position (+ 1 arg))) (message "%d line%s copied" arg (if (= 1 arg) "" "s"))) ;; optional key binding (global-set-key "\C-c\C-k" 'copy-line) ;;(tool-bar-mode 0)