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. Git(12)-- Git 分支 - 分支简介

    @ 目录 1.分支简介 1.1.初始化并首次提交 首次提交对象及其树结构: git 的 cat-file 的命令用法: 1.2.修改并第二次提交 第二次提交对象及其树结构: 1.3.修改并第三次提交 ...

  2. MySQL自定义函数与存储过程的创建、使用、删除

    前言 日常开发中,可能会用到数据库的自定义函数/存储过程,本文记录MySQL对自定义函数与存储过程的创建.使用.删除的使用 通用语法 事实上,可以认为存储过程就是没有返回值的函数,创建/使用/删除都非 ...

  3. 因为手机设置字体大小导致h5页面在webview中变形的BUG

    出现这个问题,有以下因素 你的页面采用了rem单位,并且是采用js动态计算html的font-size你的页面被加在了APP中的webview中这该死的手机被重设了字体大小解决方法一般,我们动态计算好 ...

  4. wpf toggleSwitch 的只读属性

    xml code --------------------------------------------- <Page x:Class="UWPDemo.MainPage" ...

  5. 关于Typora的使用

    关于Typora的使用 今天介绍一个做笔记用的一款markdown编辑器,用了之后,顺利被圈粉: Typora,美观小众,可用性强! 和传统的markdown编辑器不一样,传统的markdown编辑器 ...

  6. jQuery中的事件(八):on()、off()、bind()、unbind()、one()、hover()、hide()、show()、offset()等

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <hea ...

  7. 修改python import模块中的变量

    可以直接通过 模块名.变量名=xx 的方式修改模块中的全局变量,测试代码如下 模块:test_model.py x = 111 def inc_x(): global x x = x + 1 测试脚本 ...

  8. 实例说明C++的virtual function的作用以及内部工作机制初探

    C++为何要引入virtual function? 来看一个基类的实现: 1 class CBase 2 { 3 public: 4 CBase(int id) : m_nId(id), m_pBas ...

  9. TDSQL-A与CK的对比

    CK介绍 CK是目前社区里面比较热门的,应用场景也比较广泛. 首先,在架构上,集群内划分为多个分片,通过分片的线性扩展能力,支持海量数据的分布式存储计算,每个分片内包含一定数量的节点Node,即进程, ...

  10. CSS 是啥?前端小白入门级理解

    What is CSS? CSS stands for Cascading Style Sheets CSS describes how HTML elements are to be display ...