windows ~/.emacs

(when (>= emacs-major-version 24)
(require 'package)
(add-to-list
'package-archives
;; '("melpa" . "http://stable.melpa.org/packages/") ; many packages won't show if using stable
'("melpa" . "http://melpa.milkbox.net/packages/")
t)) ;; Added by Package.el. This must come before configurations of
;; installed packages. Don't delete this line. If you don't want it,
;; just comment it out by adding a semicolon to the start of the line.
;; You may delete these explanatory comments.
(package-initialize) (show-paren-mode 1)
(setq show-paren-style 'parentheses) ;; electric-indent-mode
(electric-indent-mode 1) ;; set language environment
(set-language-environment 'UTF-8)
(set-locale-environment "UTF-8") ;; set shell and eshell key binding
(global-set-key "\C-cs" 'shell)
(global-set-key "\C-ce" 'eshell) ;; show file path C-c z
(defun show-file-name ()
"Show the full path file name in the minibuffer."
(interactive)
(message (buffer-file-name))
(kill-new (file-truename buffer-file-name)))
(global-set-key "\C-cz" 'show-file-name) (defun refresh-file ()
(interactive)
(revert-buffer t (not (buffer-modified-p)) t))
(global-set-key [(f5)] 'refresh-file)
(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.
'(package-selected-packages (quote (react-snippets php-mode))))
(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.
)

mac ~/.emacs

;; load emacs 24's package system. Add MELPA repository.

;; Added by Package.el.  This must come before configurations of
;; installed packages. Don't delete this line. If you don't want it,
;; just comment it out by adding a semicolon to the start of the line.
;; You may delete these explanatory comments.
(when (>= emacs-major-version 24)
(require 'package)
(add-to-list
'package-archives
;; '("melpa" . "http://stable.melpa.org/packages/") ; many packages won't show if using stable
'("melpa" . "http://melpa.milkbox.net/packages/")
t)
(package-initialize)
) (setq show-paren-mode t)
(setq show-paren-style 'parenthesis) ;; set shell and eshell key binding
(global-set-key "\C-cs" 'shell)
(global-set-key "\C-ce" 'eshell) ;; text size scale
(global-set-key (kbd "C-+") 'text-scale-increase)
(global-set-key (kbd "C--") 'text-scale-decrease)
(global-set-key (kbd "C-0") 'text-scale-adjust) ;; show file path C-c z
(defun show-file-name ()
"Show the full path file name in the minibuffer."
(interactive)
(message (buffer-file-name))
(kill-new (file-truename buffer-file-name)))
(global-set-key "\C-cz" 'show-file-name) ;; set startup window location
(set-frame-position (selected-frame) 650 10) ; pixels x y from upper left
;; set startup window size
(add-to-list 'default-frame-alist '(height . 48))
(add-to-list 'default-frame-alist '(width . 90))
(let ((default-directory "~/Code"))
(shell "*shell*")) (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.
'(package-selected-packages
(quote
(web-mode flymake-php php-mode enclose groovy-mode gradle-mode autopair php-scratch json-reformat jsfmt emmet-mode ac-html ac-php))))
(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.
)

  

最新文章

  1. Linux文本查看及处理.md
  2. 【先定一个小目标】windows下安装RabbitMQ消息服务器
  3. 免费真机调试 -- Xcode7
  4. ios 返回指定导航控制器
  5. IE浏览器在虚拟机中无法正常显示字符
  6. c#操作XML文件的通用方法
  7. oracle函数Lpad与Rpad
  8. TODO管理工具TaskWarrior (跨平台C++代码)
  9. CoreCRM 开发实录 —— 单元测试、测试驱动开发和在线服务
  10. php 编程效率(2)
  11. web移动端布局方式整理
  12. Java中容器的两种初始化方式比较
  13. openlayers调用瓦片地图分析
  14. EventBus学习笔记(一)
  15. SUSE12Sp3-MongoDB安装
  16. 004_为什么不推荐APP使用SSL-PINNING
  17. numpy 数组创建例程
  18. C# 让枚举返回字符串
  19. 规格化设计-----JSF(第三次博客作业)
  20. leetcode 120. 三角形最小路径和 JAVA

热门文章

  1. 关于Ubuntu18.04 linux系统使用搜狗输入法 出现乱码
  2. DNS地址列表
  3. JMeter结果树响应数据中文乱码
  4. Matlab实现BP神经网络预测(附实例数据及代码)
  5. MySQL双主+Keepalived高可用
  6. js在不同页面的导航背景不同 (设置网站公共头的导航)
  7. Qt5中用QLCDNumber显示时间
  8. C# 实现图片上传
  9. Docker详解(一)——
  10. Spring Cloud Apollo 实践