~/.emacs emacs 配置文件
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 配置文件的更多相关文章
- emacs 配置文件
使用方式: git clone 到本地,把 emacs 复制到 ~/.emacs.d 打开 emacs 会自动安装包 https://github.com/NorseLZJ/lzj-config/tr ...
- windows下,emacs的配置文件在哪儿?
配置文件_Emacs在你的家目录下"C:/Documents and Settings/username/Application Data". 在Window 7下,配置文件目录在 ...
- [emacs] emacs调整C代码的缩进格式等
相比于VIM,emacs在默认配置下写C代码还真是不好用. 好多东西都要调整,其中最麻烦的就是缩进.调啊调,调了好久. 勉强形成一个配置如下: (add-hook 'c-mode-hook (lamb ...
- [emacs] emacs设置python code的indent
装python-mode的包 https://gitlab.com/python-mode-devs/python-mode/tree/master python-mode emacswiki文档 e ...
- [Emacs] Emacs使用介绍
详细,可参考该文档(转载):Emacs 快速指南 - 原生中文手册 C-x C-c 关闭Emacs会话 C-v/M-v 向前/后翻页 C-n/C-p 光标向下/上移一行 C-f/C-b 光标向前/后移 ...
- Emacs 配置文件
以下是我整理的 emacs 配置文件,供刚开始玩 emacs 的同学参考.网上有人说:emacs 是神的编辑器,如果能够用到这样的编辑器,那这个人就是神了.从我个人的经验来看,emacs 是一把利器, ...
- emacs配置详解及C/C++IDE全功能配置演示(附配置文件)
我的emacs插件下载地址: http://pan.baidu.com/share/link?shareid=4196458904&uk=3708780105 说明: 1.为什么使用emacs ...
- emacs配置文件的基础知识 (转载)
转自:http://blog.csdn.net/schumyxp/article/details/2278268 emacs的配置文件,叫作.emacs,是个隐藏文件,存在于当前用户的根目录下面,也就 ...
- emacs windows 下配置
一般windows的emacs是一个压缩包,解压一下,即可.主程序在bin文件夹下.需要设置一下emacs的home路径, 打开注册表,创建HKEY_LOCAL_MACHINE/SOFTWARE/GN ...
随机推荐
- 题解 CF613E Puzzle Lover
解题思路 其实仔细观察我们可以发现路径一定是一个类似于下图的一个左括号之后中间随便反复曲折,然后右边在来一个右括号. 然后对于两个括号形状的东西其实是可以利用 Hash 来判等特殊处理的. 对于中间的 ...
- Jetpack Compose学习(2)——文本(Text)的使用
原文: Jetpack Compose学习(2)--文本(Text)的使用 | Stars-One的杂货小窝 对于开发来说,文字最为基础的组件,我们先从这两个使用开始吧 本篇涉及到Kotlin和DSL ...
- NOIP 模拟 $28\; \rm 割海成路之日$
题解 \(by\;zj\varphi\) 用两个集合分别表示 \(1\) 边联通块,\(1,2\) 边联通块 . \(\rm son_x\) 表示当前节点通过 \(3\) 类边能到的 \(2\) 联通 ...
- noip模拟10
被打回原形了emmmmm 贴张图吧,展示一下根本不行的水平 考试经过 上来浏览一遍T1到T3,读懂题之后发现都不是很可做 T1上了想到了前缀和,往矩阵快速幂想了一下觉得不可做,半小时之后还是只会\(n ...
- elasticsearch可视化工具-dejavu
https://github.com/appbaseio/dejavu docker run -p 1358:1358 -d appbaseio/dejavu http.port: 9200 http ...
- [ES6深度解析]15:模块 Module
JavaScript项目已经发展到令人瞠目结舌的规模,社区已经开发了用于大规模工作的工具.你需要的最基本的东西之一是一个模块系统,这是一种将你的工作分散到多个文件和目录的方法--但仍然要确保你的所有代 ...
- uwp之图片旋转动画实现
参考网址:https://blog.csdn.net/hzw2945/article/details/72467820 https://www.cnblogs.com/changbaishan/p/3 ...
- spring学习日志三
一.回顾 1.1 依赖注入的方式. set方法来注入 <property name="属性名" /> 构造方法来注入<construtor-arg index=& ...
- 大数据Shell编程 之 常用正则表达式
使用man grep查看grep的帮助文档,有如下内容: 可以看出,正则表达式由三类,分别是 基本的正则表达式(Basic Regular Expression 又叫 Basic RegEx 简称 B ...
- CrackMe-CFF Crackme #3
转载自:OllyDbg入门教程 我们先来运行一下这个 crackme(用 PEiD 检测显示是 Delphi 编的),界面如图: 这个 crackme 已经把用户名和注册码都输好了,省得我们动手^_^ ...