我不是大神,使用vim和emacs只是兴趣,打发空闲时间。

上代码:

;; 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) (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.
'(column-number-mode t)
'(display-time-mode t)
'(inhibit-startup-screen t)
'(package-selected-packages
(quote
(markdown-mode easy-kill ace-window w3 seq realgud-ipdb yasnippet csv-mode company-statistics flymake docbook enwc auctex all python org html5-schema json-mode company-math ##))))
(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 (:family "宋体" :foundry "outline" :slant normal :weight normal :height 120 :width normal))))) (set-scroll-bar-mode nil)
(tool-bar-mode nil) (setq initial-frame-alist '((top . 0)(left . 0)(width . 165)(height . 40))) ;; Date Setting
(display-time-mode 1)
(setq display-time-24hr-format t)
(setq display-time-day-and-date t)
(setq display-time-use-mail-icon t)
(setq display-time-interval 10) ;; Closing the sounds
(setq visible-bell t) ;; Show the column and line
(setq column-number-mode t)
(setq line-number-mode t) ;; autosave
(setq auto-save-mode nil) (setq make-backup-files nil)
(setq-default make-backup-files nil) ;; Show the directory and files
(setq speedbar-show-unknown-files t) ;; It is convenient for us to write code.
(load-library "hideshow")
(add-hook 'c-mode-hook 'hs-minor-mode)
(add-hook 'c++-mode-hook 'hs-minor-mode)
(add-hook 'java-mode-hook 'hs-minor-mode)
(add-hook 'perl-mode-hook 'hs-minor-mode)
(add-hook 'php-mode-hook 'hs-minor-mode)
(add-hook 'emacs-lisp-mode-hook 'hs-minor-mode)
(add-hook 'org-mode-hook 'turn-on-foot-lock)
;; Editing css
(autoload 'css-mode "css-mode" "CSS editing mode" t) (autoload 'htmlize-buffer "htmlize" "HTMLize mode" t) (autoload 'folding-mode "folding" "Folding mode" t)
(autoload 'turn-off-folding-mode "folding" "Folding mode" t)
(autoload 'turn-on-folding-mode "folding" "Folding mode" t) ;; The file pattern is associated with the filename suffix
(setq auto-mode-alist
(append '(("\\.py\\'" . python-mode)
("\\.s?html?\\'" . html-helper-mode)
("\\.asp\\'" . html-helper-mode)
("\\.phtml\\'" . html-helper-mode)
("\\.css\\'" . css-mode))
auto-mode-alist)) ;; Set keyboard
(global-set-key [F11] 'compile)
(global-set-key [F12] 'gdb) ;; increase package-archives
(require 'package)
(add-to-list 'package-archives
'("melpa-stable" . "https://stable.melpa.org/packages/"))
(package-initialize) ;; configure the markdown-mode
(autoload 'markdown-mode "markdown-mode"
"Major mode for editing Markdown files" t)
(add-to-list 'auto-mode-alist '("\\.markdown\\'" . markdown-mode))
(add-to-list 'auto-mode-alist '("\\.md\\'" . markdown-mode)) (autoload 'gfm-mode "markdown-mode"
"Major mode for editing GitHub Flavored Markdown files" t)
(add-to-list 'auto-mode-alist '("README\\.md\\'" . gfm-mode))

然后看下(这头牛真不错):

emacs开发网站

Main repository:

git clone -b master git://git.sv.gnu.org/emacs.git

ELPA repository:

git clone git://git.sv.gnu.org/emacs/elpa

官方文档在这里emacs开发配置,还是需要硬读英文文档。


最新更新:

(setq package-archives '(("gnu" . "http://elpa.emacs-china.org/gnu/")

("melpa" . "http://elpa.emacs-china.org/melpa/")))

;; -----------------------------------My main configuration---------------------------------------

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

'(global-linum-mode t)

'(inhibit-startup-screen t)

'(electric-pair-mode t)

'(package-selected-packages

'(flycheck-ycmd company-ycmd ycmd elpy yasnippet s pyvenv py-autopep8 material-theme highlight-indentation flycheck company better-defaults auto-complete)))

(setq initial-frame-alist '((top . 0)(left . 0)(width . 170)(height . 43)))

(tool-bar-mode 0)

(menu-bar-mode 0)

(scroll-bar-mode 0)

(setq initial-scratch-message "")

(setq tool-bar-mode nil)

(setq visible-bell t)

(setq auto-save-mode nil)

(setq backup-directory-alist (quote ("." . "/home/D/Software/Centos_7/backups/")))

(setq-default auto-save-timeout 15)

(setq-default auto-save-interval 100)

(setq make-backup-files nil)

(setq

backup-by-copying t

delete-old-versions t

kept-new-versions 3

kept-old-versions 1

version-control t)

(setq default-tab-width 4)

(setq indent-tabs-mode nil)

;; ----------------------------------Python 3.4 IDE configuration---------------------------------

(require 'package)

(add-to-list 'package-archives

'("melpa" . "http://melpa.org/packages/") t)

(package-initialize)

(defvar myPackages

'(better-defaults

elpy

auto-complete

py-autopep8

flycheck

material-theme))

(when (not package-archive-contents)

(package-refresh-contents))

(mapc #'(lambda (package)

(unless (package-installed-p package)

(package-install package)))

myPackages)

(require 'elpy)

(setq elpy-rpc-python-command "python3")

(setq python-shell-interpreter "python3")

(setq pyvenv-virtualenvwrapper-python "/usr/bin/python3")

(elpy-enable)

(ac-config-default)

(load-theme 'material t) ;; load material theme

(global-set-key (kbd "RET") 'newline-and-indent)

(when (require 'flycheck nil t)

(setq elpy-modules (delq 'elpy-module-flymake elpy-modules))

(add-hook 'elpy-mode-hook 'flycheck-mode))

;; enable autopep8 formatting on save

(require 'py-autopep8)

(add-hook 'elpy-mode-hook 'py-autopep8-enable-on-save)

;;--------------------------------- My ycmd configuration-------------------------------------

;;;; To use ycmd-mode in all supported modes

(require 'ycmd)

(add-hook 'after-init-hook #'global-ycmd-mode)

;;;; Specify only support c/c++ mode

;;(require 'ycmd)

;;(add-hook 'c++-mode-hook 'company-mode)

;;(add-hook 'c++-mode-hook 'ycmd-mode)

;;;; Specify how to run the server

(set-variable 'ycmd-server-command '("/usr/bin/python3" "/home/D/ycmd/ycmd"))

;;;; Specify a global emacs configuration

(set-variable 'ycmd-global-config "/home/D/ycmd/examples/.ycm_extra_conf.py")

;;;; Completion framework

(require 'company-ycmd)

(company-ycmd-setup)

(add-hook 'after-init-hook #'global-company-mode)

;;;; Enable flycheck

(require 'flycheck-ycmd)

(flycheck-ycmd-setup)

(add-hook 'after-init-hook #'global-flycheck-mode)

;;;; Set always complete immediately

(setq company-idle-delay 0)

;;;; ---------------------------------------------------

我的.emacs配置的更多相关文章

  1. emacs配置eslint 语法检查.找不到node解决

    使用emacs配置eslint 当调用语法检查时报错 Suspicious state from syntax checker javascript-eslint: Checker javascrip ...

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

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

  3. 一些有用的 Emacs 配置(窗口快速切换、一键透明效果、任意位置删除整行等)

    本篇文章记录的是一些有用的 Emacs 配置,有些是自己原创,有些是借鉴别人(能记起来出处的我放了链接). 规定:C 代表 Ctrl,M 代表 Alt. 1.设置一次跳跃 n 行的快捷键 按 C-M- ...

  4. emacs 配置

    个人的Emacs配置,环境是archlinux,参考了不少网上资料,因为太多,就不一一列举了,在这里感谢那些作者的辛苦经验劳动. (custom-set-variables ;; custom-set ...

  5. 绝世emacs配置for Ubuntu

    反正过不了几天就要退役了,把emacs配置放出来造福(祸害)大众? 浓浓的OIER风格,除了方便打代码就没别的用处(F8并不这样认为?),只可惜windows下的弄丢了,只有Ubuntu下的. F1不 ...

  6. 存个emacs配置

    emacs配置 (global-set-key [f9] 'compile-file) (global-set-key [f10] 'gud-gdb) (global-set-key (kbd &qu ...

  7. emacs 配置.emacs

    emacs 配置.emacs (require 'package) (package-initialize) (add-to-list'package-archives '("melpa&q ...

  8. purcell的emacs配置中的自动补全功能开启

    标记一下,原文参看purcell的emacs配置中的自动补全功能开启 修改init-auto-complete.el文件 ;;(setq-default ac-expand-on-auto-compl ...

  9. 中国大陆无法访问Steve Purcell的emacs配置解决办法

    因为大陆网络问题,没办法访问Steve Purcell的emacs配置中的melpa.org,所以我们更改目录即可. 1.删除自己的配置. $ rm ~/.emacs $ rm -rf ~/.emac ...

  10. emacs配置&博客界面源代码

    emacs配置 如果想要考场简单配置也可以去下面看,需要别的考场配置可以自己在下面比较全的里面找 考试备忘录(有新的就会更的...) By Junlier (global-set-key [f9] ' ...

随机推荐

  1. anaconda 使用conda命令创建虚拟环境

    1.首先在所在系统中安装Anaconda.可以打开命令行输入conda -V检验是否安装以及当前conda的版本. 2.conda常用的命令. 1)conda list 查看安装了哪些包. 2)con ...

  2. 学习笔记-CTF密码相关

    RSA共模攻击 RSA基本原理 ①  选择两个大的质数p和q,N=pq: ②  根据欧拉函数,求得r=(p-1)(q-1): ③  选一个小于r的整数e,求得e关于模r的模反元素d: ④  将p和q的 ...

  3. JDK 15 JAVA 15的新特性展望

    目录 JEP 371: Hidden Classes JEP 372: 删除 Nashorn JavaScript Engine JEP 377: 新的垃圾回收器ZGC正式上线了 JEP 378: T ...

  4. maven过滤配置文件

    第一种方式, 解决maven打包时,会编译特定文件导致文件不可用maven打包时,过滤不编译文件类型 <plugin>    <groupId>org.apache.maven ...

  5. sed命令的正则表达式实践

    1. 取系统ip [root@oldboy logs]# ifconfig eth3 eth3 Link encap:Ethernet HWaddr 08:00:27:4C:6F:AD inet ad ...

  6. 2019 ICPC 银川网络赛 H. Fight Against Monsters

    It is my great honour to introduce myself to you here. My name is Aloysius Benjy Cobweb Dartagnan Eg ...

  7. RF(常用关键字)

    一.常用关键字 Open Browser    [url | browser | alias]    打开浏览器 Close Browser     关闭当前浏览器(不是窗口) Close All B ...

  8. mybatis添加信息自动生成主键

    一.使用Oracle数据库 举例:添加员工的时候自动生成主键 1.在dao接口中声明方法 2.在mapper中实现该方法 需要先在数据表中创建序列 3.测试 注意:在调用过save方法之后,emp对象 ...

  9. 硬肝4.4w字为你写成Java开发手册

    先来看一下本篇文章的思维导图吧,我会围绕下面这些内容进行讲解.内容很干,小伙伴们看完还希望不吝转发.(高清思维导图版本关注作者公众号 Java建设者 回复 Java666 获取,其他思维导图获取方式在 ...

  10. 微软原文翻译:适用于.Net Core的WPF数据绑定概述

    原文链接,大部分是机器翻译,仅做了小部分修改.英.中文对照,看不懂的看英文. Data binding overview in WPF 2019/09/19 Data binding in Windo ...