Chinaunix首页 | 论坛 | 博客
  • 博客访问: 41260
  • 博文数量: 15
  • 博客积分: 403
  • 博客等级: 一等列兵
  • 技术积分: 155
  • 用 户 组: 普通用户
  • 注册时间: 2009-11-28 22:44
个人简介

This is the blog site of Shaka, who comes from China. Being passionate and creative, he loves peace, freedom and life. He has a variety of interests, and is also an open-source software amateur. He loves Unix/Linux, \LaTeX{}, MetaPost, Emacs, Vim, etc.

文章分类

全部博文(15)

文章存档

2015年(1)

2014年(1)

2012年(2)

2010年(11)

我的朋友

分类: LINUX

2015-03-17 12:55:58

;; Character coding setting
(set-language-environment 'UTF-8)

;; Elpa
(setq package-archives '(("gnu" . "")
             ("melpa" . "")))
(package-initialize)

;; IDE
(add-hook 'c-mode-common-hook '(lambda() (eide-start)))

;; Company
(global-company-mode t)
(setq company-idle-delay 0)
;; In order to complete c/c++, a elisp file, named ".dir-locals.el" should be created in the project root, with its content like
;; ((nil . ((company-clang-arguments . ("-I/opt/itpp/include")))))
(setq company-backends (delete 'company-semantic company-backends))
(add-to-list 'company-backends 'company-c-headers)
(require 'company-auctex)
(company-auctex-init)

;; Cscope
(add-hook 'c-mode-common-hook '(lambda() (require 'xcscope) (cscope-setup)))

;; Doxygen
(require 'doxymacs)
(add-hook 'c-mode-common-hook 'doxymacs-mode)
(defun my-doxymacs-font-lock-hook ()
  (if (or (eq major-mode 'c-mode) (eq major-mode 'c++-mode))
      (doxymacs-font-lock)))
(add-hook 'font-lock-mode-hook 'my-doxymacs-font-lock-hook)

;; Org
(setq org-startup-indented t)
(setq org-hide-leading-stars t)
(setq org-src-fontify-natively t)
(global-set-key "\C-cl" 'org-store-link)
(global-set-key "\C-ca" 'org-agenda)
(global-set-key "\C-cb" 'org-iswitchb)

;; Auctex
(require 'preview)
(setq preview-scale-function 1.5)

;; Reftex
(require 'reftex)
(add-hook 'LaTeX-mode-hook 'turn-on-reftex)
(add-hook 'latex-mode-hook 'turn-on-reftex)

;; TeX view and fold
(setq TeX-view-program-list '(("Evince" "evince %o")))
(setq TeX-view-program-selection '((output-pdf "Evince")))
(setq TeX-fold-env-spec-list
      (quote (("[tikzpicture]" ("tikzpicture"))
          ("[tabular]" ("tabular")))))

;; Yasnippet
(require 'yasnippet)
(yas-global-mode t)

;; Personal info.
(setq user-full-name "name")
(setq user-mail-address "email")

(global-set-key [f7] 'compile)
(setq-default compile-command "make")
(global-set-key [f9] 'other-window)
阅读(336) | 评论(0) | 转发(0) |
0

上一篇:Turn on/off touchpad

下一篇:没有了

给主人留下些什么吧!~~