博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
.emacs
阅读量:6499 次
发布时间:2019-06-24

本文共 5599 字,大约阅读时间需要 18 分钟。

;为我的emacs配置主题色彩 (color-theme-色彩名称)    (add-to-list 'load-path "~/elisp/color-theme")  (require 'color-theme)  (color-theme-initialize)    (color-theme-oswald)        ;preview-latex  (add-to-list 'load-path  "~/Downloads/auctex-11.86/preview")  (require 'preview)    ; yasnippet      (add-to-list 'load-path           "~/.emacs.d/plugins/yasnippet")  (require 'yasnippet)  (yas/initialize)  (yas/load-directory "~/.emacs.d/plugins/yasnippet/snippets")  (yas/minor-mode-on)    ; this breaks things; use the below advise solution instead  ;(add-hook 'org-mode-hook  ;       (lambda ()  ;         (org-set-local 'yas/trigger-key [tab])  ;         (define-key yas/keymap [tab] 'yas/next-field-group)))    ; when cdlatex-mode or org-cdlatex-mode are loaded, we need to change  ; the behaviour of yas/fallback to call cdlatex-tab    (defun yas/advise-indent-function (function-symbol)    (eval `(defadvice ,function-symbol (around yas/try-expand-first activate)             ,(format               "Try to expand a snippet before point, then call `%s' as usual"               function-symbol)             (let ((yas/fallback-behavior nil))               (unless (and (interactive-p)                            (yas/expand))                 ad-do-it)))))    (yas/advise-indent-function 'cdlatex-tab)  (yas/advise-indent-function 'org-cycle)  (yas/advise-indent-function 'org-try-cdlatex-tab)  (add-hook 'org-mode-hook 'yas/minor-mode-on)            ;cdlatex   (add-to-list 'load-path  "~/elisp")  (require 'cdlatex)      ;fontsize  (set-face-attribute 'default nil :height 150)    ;fullscreen  (global-set-key [f11]'my-fullscreen)  (defun my-fullscreen ()    (interactive)    (x-send-client-message     nil 0 nil "_NET_WM_STATE" 32     '(2 "_NET_WM_STATE_FULLSCREEN" 0))  )  (defun my-maximized ()    (interactive)    (x-send-client-message     nil 0 nil "_NET_WM_STATE" 32     '(1 "_NET_WM_STATE_MAXIMIZED_HORZ" 0))    (interactive)    (x-send-client-message     nil 0 nil "_NET_WM_STATE" 32     '(1 "_NET_WM_STATE_MAXIMIZED_VERT" 0)))  (my-maximized)      ;;关闭起动时的那个“开机画面”  (setq inhibit-startup-message t)      ;不要滚动栏  (scroll-bar-mode nil)      ;改变emacs标题栏的标题  (setq frame-title-format "%b_Luqing Ye")    ;让M-w 能复制内容到剪切板  (setq x-select-enable-clipboard t)    ;当指针到一个括号时,自动显示所匹配的另一个括号  (show-paren-mode 1)    ;ibus  (add-to-list 'load-path "~/.emacs.d/ibus/")  (require 'ibus)  (add-hook 'after-init-hook 'ibus-mode-on)  (global-set-key (kbd "C-=") 'ibus-toggle) ;;这里既是绑定上面设置的C+=快捷键到ibus中  (ibus-define-common-key ?\C-\s nil)  ;; Use C-/ for Undo command  (ibus-define-common-key ?\C-/ nil)  ;; Change cursor color depending on IBus status  (setq ibus-cursor-color '("red" "black" "green"))        ;auctex setting,from  http://www.xemacs.org/Documentation/packages/html/auctex_4.html      (require 'tex-site)  (setq TeX-auto-save t)  (setq TeX-parse-self t)    ;为了使用 AucTeX 方便,为 LaTeX 模式 hook 自动换行,数学公式,reftex 和显示行号的功能  (mapc (lambda (mode)        (add-hook 'LaTeX-mode-hook mode))        (list 'auto-fill-mode              'cdlatex-mode              'LaTeX-math-mode              'turn-on-reftex              'linum-mode))              (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.   '(show-paren-mode t)   '(tool-bar-mode nil))  (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.   )            (setq TeX-save-query nil) ;;autosave latex file before compiling                ;;1.This will make sure org gets loaded, and some basic global key combinations are defined  ;;2.If you've configured your Emacs initialization file as suggested below, Emacs should enter org-mode whenever you visit or create a file with the extension ".org".  (require 'org-install)  (add-to-list 'auto-mode-alist '("\\.org$" . org-mode))  (define-key global-map "\C-cl" 'org-store-link)  (define-key global-map "\C-ca" 'org-agenda)  (setq org-log-done t)          ;;org mode自动换行  (add-hook 'org-mode-hook      (lambda () (setq truncate-lines nil)))                (add-to-list 'load-path "~/elisp")  (require 'cdlatex)  (require 'texmathp)  ;load org-cdlatex-mode for all org files  (add-hook 'org-mode-hook 'turn-on-org-cdlatex)            ;; all backups goto ~/.backups instead in the current directory  (setq backup-directory-alist (quote (("." . "~/.backups"))))      ;use pdflatex  (setq latex-run-command "pdflatex")      ;generate pdf when complile.  (setq TeX-PDF-mode t)(defun replace-matching-parens ()  (interactive)  (save-excursion    (let ((end-point (point)))      (backward-list)      (let ((start-point (point)))        (goto-char end-point)        (re-search-backward ")" nil t)        (replace-match " \\\\right)" nil nil)        (goto-char start-point)        (re-search-forward "(" nil t)        (replace-match "\\\\left( " nil nil)))));Asymptote(add-to-list 'load-path "/usr/share/asymptote")(autoload 'asy-mode "asy-mode.el" "Asymptote major mode." t)(autoload 'lasy-mode "asy-mode.el" "hybrid Asymptote/Latex major mode." t)(autoload 'asy-insinuate-latex "asy-mode.el" "Asymptote insinuate LaTeX." t)(add-to-list 'auto-mode-alist '("\\.asy$" . asy-mode));two-mode-mode  (add-to-list 'load-path  "~/elisp")  (require 'two-mode-mode)

 

转载于:https://www.cnblogs.com/yeluqing/archive/2013/04/13/3827422.html

你可能感兴趣的文章
ms sql server mysql_MS SQL Server和MySQL区别
查看>>
mysql druid 多数据源_springboot+druid+mybatis plus的多数据源配置
查看>>
python 发送邮件附件csv_Python 发邮件及邮件附件
查看>>
把mysql数据放hbase_Sqoop将mysql数据导入hbase的血与泪
查看>>
termux配置python安装kali_利用termux安装kali
查看>>
新人python2和python3的区别_python2 和Python3 的区别
查看>>
hadoopt -cat 命令查看_linux运维命令实践:使用cat命令合并文件和查看文件内容
查看>>
python开发节目程序_Python获取央视节目单的实现代码
查看>>
python的image用法_python使用Image处理图片常用技巧分析
查看>>
JDBC_MySQL_jdbc连接mysql_MySQL
查看>>
新手学习python零基础_新手零基础学习Python第一步,搭建开发环境!
查看>>
mysql cte的好处_Mysql 8 重要新特性 - CTE 通用表表达式
查看>>
zcu106 固化_xilinx zcu106 vcu demo
查看>>
java 打印万年历_Java基础之打印万年历
查看>>
java ftpclient 代码_java后台代码ftpclient下载文件
查看>>
java mina 长连接_MINA实现TCP长连接(二)——服务端实现
查看>>
java数据库生成model_继承BaseModelGenerator 生成Model时添加数据库表字段 生成代码示例...
查看>>
https redirects java_java HttpURLConnection 得到 Redirect 转向的例子
查看>>
java读取html文件并替换_java读取html并替换相关内容
查看>>
java面向对象的概念_java面向对象(上)-- 面向对象的概念
查看>>