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.
)

  

~/.emacs emacs 配置文件的更多相关文章

  1. emacs 配置文件

    使用方式: git clone 到本地,把 emacs 复制到 ~/.emacs.d 打开 emacs 会自动安装包 https://github.com/NorseLZJ/lzj-config/tr ...

  2. windows下,emacs的配置文件在哪儿?

    配置文件_Emacs在你的家目录下"C:/Documents and Settings/username/Application Data". 在Window 7下,配置文件目录在 ...

  3. [emacs] emacs调整C代码的缩进格式等

    相比于VIM,emacs在默认配置下写C代码还真是不好用. 好多东西都要调整,其中最麻烦的就是缩进.调啊调,调了好久. 勉强形成一个配置如下: (add-hook 'c-mode-hook (lamb ...

  4. [emacs] emacs设置python code的indent

    装python-mode的包 https://gitlab.com/python-mode-devs/python-mode/tree/master python-mode emacswiki文档 e ...

  5. [Emacs] Emacs使用介绍

    详细,可参考该文档(转载):Emacs 快速指南 - 原生中文手册 C-x C-c 关闭Emacs会话 C-v/M-v 向前/后翻页 C-n/C-p 光标向下/上移一行 C-f/C-b 光标向前/后移 ...

  6. Emacs 配置文件

    以下是我整理的 emacs 配置文件,供刚开始玩 emacs 的同学参考.网上有人说:emacs 是神的编辑器,如果能够用到这样的编辑器,那这个人就是神了.从我个人的经验来看,emacs 是一把利器, ...

  7. emacs配置详解及C/C++IDE全功能配置演示(附配置文件)

    我的emacs插件下载地址: http://pan.baidu.com/share/link?shareid=4196458904&uk=3708780105 说明: 1.为什么使用emacs ...

  8. emacs配置文件的基础知识 (转载)

    转自:http://blog.csdn.net/schumyxp/article/details/2278268 emacs的配置文件,叫作.emacs,是个隐藏文件,存在于当前用户的根目录下面,也就 ...

  9. emacs windows 下配置

    一般windows的emacs是一个压缩包,解压一下,即可.主程序在bin文件夹下.需要设置一下emacs的home路径, 打开注册表,创建HKEY_LOCAL_MACHINE/SOFTWARE/GN ...

随机推荐

  1. DVWA-全等级文件上传

    DVWA简介 DVWA(Damn Vulnerable Web Application)是一个用来进行安全脆弱性鉴定的PHP/MySQL Web应用,旨在为安全专业人员测试自己的专业技能和工具提供合法 ...

  2. Linux搭建Syslog服务器

    在大多数据的Linux发行版中,rsyslog是一个预先安装的标准日志后台进程.在 客户端/服务端 的系统配置中,rsyslog 能扮演两个角色;作为一个日志服务器能从其它设备收集日志信息,而作为一个 ...

  3. 十四:Servlet3.0的动态

    动态的创建是为了简化配置文件的.对于我们创建的servlet,filter和listener后可以使用.这也是注解的另外一种替代方式. package com.hotusm.dynamic; impo ...

  4. 通过PEB的Ldr枚举进程内所有已加载的模块

    一.几个重要的数据结构,可以通过windbg的dt命令查看其详细信息 _PEB._PEB_LDR_DATA._LDR_DATA_TABLE_ENTRY 二.技术原理 1.通过fs:[30h]获取当前进 ...

  5. 梯度下降做做优化(batch gd、sgd、adagrad )

    首先说明公式的写法 上标代表了一个样本,下标代表了一个维度: 然后梯度的维度是和定义域的维度是一样的大小: 1.batch gradient descent: 假设样本个数是m个,目标函数就是J(th ...

  6. 使用dom4j工具:读取xml标签(二)

    package dom4j_read; import java.io.File; import java.util.List; import org.dom4j.Document; import or ...

  7. linux高级监控atop的使用

    一.centos安装 sudo yum -y install epel-release.noarch sudo yum -y install atop sudo systemctl enable at ...

  8. 1day漏洞反推技巧实战(2)

    学习存货(2) CVE-2018-11784简单分析之反推的魅力 看着挺有趣的,简单分析下: 通过搜索tomcat漏洞找到: http://tomcat.apache.org/security-7.h ...

  9. 性能环境之docker操作指南4(全网最全)

    容器的常用操作 docker run -i -t  /bin/bash 使用image创建container并进入交互模式, login shell是/bin/bash 实例: $ docker ru ...

  10. Redis详解(二)——

    https://www.cnblogs.com/yeya/p/14274948.html https://www.cnblogs.com/liang24/tag/redis/