我不是大神,使用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. 模拟电磁曲射炮_H题 方案分析【2019年电赛】【刘新宇qq522414928】

    请查看我的有道云笔记: 文档:电磁曲射炮分析.note链接:http://note.youdao.com/noteshare?id=26f6b6febc04a8983d5efce925e92e21

  2. 0day学习笔记(2)--函数调用

    函数调用过程 调用函数操作 函数参数入栈(在当前函数栈帧),从左至右或从右至左视情况而定 一般为从右至左 mov 地址,参数 的一个操作并不直接pop而是定位到地址将参数传递进去 call offse ...

  3. Pycharm中设置encoding

    在Pycharm专业版中,为了防止文件在别的机器上出现乱码,所以需要进行字符编码的设置. 首先在Pycharm中的View中将下图中的Toolbar打上勾. 接着,工具栏就会出现,选中settings ...

  4. 网络传输 socket

    一.Socket语法及相关 前言:osi七层模型: 第七层:应用层.     各种应用程序协议,如HTTP,FTP,SMTP,POP3. 第六层:表示层.     信息的语法语义以及它们的关联,如加密 ...

  5. android开发之自定义View 详解 资料整理 小冰原创整理,原创作品。

    2019独角兽企业重金招聘Python工程师标准>>> /** * 作者:David Zheng on 2015/11/7 15:38 * * 网站:http://www.93sec ...

  6. Redis数据迁移的三个方法

    为什么80%的码农都做不了架构师?>>>   1. rdb数据备份恢复方法 redis 127.0.0.1:6379> SAVE OK 或者 redis-cli -h 127. ...

  7. Docker安装和基本操作

    一.Docker安装 CentOS7安装Docker CE $sudo yum install -y yum-utils device-mapper-persistent-data lvm2 $sud ...

  8. opencv-11-中值滤波及自适应中值滤波

    开始之前 在上一篇我们实现了读取噪声图像, 然后 进行三种形式的均值滤波得到结果, 由于我们自己写的均值滤波未作边缘处理, 所以效果有一定的下降, 但是总体来说, 我们得到的结果能够说明我们的算法执行 ...

  9. 数学--数论-- AtCoder Beginner Contest 151(组合数+数学推导)好题(๑•̀ㅂ•́)و✧

    思路统计最大值出现的次数,和最小值出现的次数.虽然是每次都是MAX-MIN,我们先求MAX的和,然后再求MIN的和,做差. 这次代码写的真的很漂亮 题目地址: #include <bits/st ...

  10. Mariadb 主主复制

    两台server1  192.168.1.189 &&  server2 192.168.1.226 安装mariadb数据库 yum -y install mariadb maria ...