我的.emacs文件

		 (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)			;显示时间
		 ;;'(indent-tabs-mode nil)
		 ;'(show-paren-mode t)
 		 '(standard-indent 2)				;缩进为2格
 		 '(tab-width 2)		 					;Tab键为2格
 		 '(transient-mark-mode t))	

		 (setq default-major-mode 'text-mode);一打开就起用 text 模式。
		 (global-font-lock-mode t);语法高亮
		 (auto-image-file-mode t);打开图片显示功能
		 (fset 'yes-or-no-p 'y-or-n-p);以 y/n代表 yes/no,可能你觉得不需要,呵呵。
		 (column-number-mode t);显示列号
		 (show-paren-mode t);显示括号匹配
		 (display-time-mode 1);显示时间,格式如下
		 (setq display-time-24hr-format t)
		 (setq display-time-day-and-date t)
		 (tool-bar-mode nil);去掉那个大大的工具栏
		 ;(scroll-bar-mode nil);去掉滚动条,因为可以使用鼠标滚轮了 ^_^
		 (mouse-avoidance-mode 'animate);光标靠近鼠标指针时,让鼠标指针自动让开,别挡住视线。很好玩阿,这个功能
		 (setq mouse-yank-at-point t);支持中键粘贴
		 (transient-mark-mode t);这个忘了,郁闷!
		 (setq x-select-enable-clipboard t);支持emacs和外部程序的粘贴
		 (setq frame-title-format "gaof@%b");在标题栏提示你目前在什么位置。你要把zhan改成自己的用户名
		 (setq default-fill-column 80);默认显示 80列就换行 
		 (load-file "/home/gaof/prime/etc/emacs/color-theme.el")
		 ;(color-theme-dark-blue);选择 darkblue的配色方案 
		 (set-default-font "-sony-fixed-medium-r-normal--16-120-100-100-c-80-iso8859-1")

		 (setq skeleton-pair t) ;括号的自动配对
		 (local-set-key (kbd "[") 'skeleton-pair-insert-maybe)
		 (local-set-key (kbd "(") 'skeleton-pair-insert-maybe)
		 (local-set-key (kbd "{") 'skeleton-pair-insert-maybe) 
		 (local-set-key (kbd "<") 'skeleton-pair-insert-maybe)

		 ;(local-set-key [(control o)] 'vi-open-next-line) ;设置快捷键的一种方式

		 (color-theme-sitaramv-solaris)

		 ;设置Ruby模式
		 (setq load-path (add-to-list 'load-path "/usr/share/emacs22/site-lisp/mozart"))
		 (setq load-path (add-to-list 'load-path "/usr/share/emacs/site-lisp/ruby1.8-elisp"))
		 (require 'ruby-mode)
		 (add-to-list 'auto-mode-alist '("\\.rb$" . ruby-mode))

		 ;设置session和desktop
		 (setq load-path (add-to-list 'load-path "/home/gaof/prime/etc/emacs"))
		 (require 'session)
		 (add-hook 'after-init-hook 'session-initialize)
		 (load "desktop")
 		 (desktop-load-default) 
 		 (desktop-read)
 		 (desktop-save-mode 1)

		 ;抑制启动时的提示信息
		 (setq inhibit-startup-message t)
		 ;保证同名文件显示的缓冲区名称唯一
		 (setq uniquify-buffer-name-style 'forward)

		 ;设置org模式
		 (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-hide-leading-stars t)
		 (setq org-log-done t)
		 (setq org-agenda-files (list "~/org/work.org"
			     "~/org/todo.org"
			     "~/org/school.org"  
           "~/org/home.org"))  

		 ;以Server模式启动
		 (server-start)

		 (require 'ido)
		 (ido-mode t)

		 (require 'tabbar)
		 (tabbar-mode)
		 (global-set-key [s-up]    'tabbar-backward-group)
		 (global-set-key [s-down]  'tabbar-forward-group)
		 (global-set-key [s-left]  'tabbar-backward)
		 (global-set-key [s-right] 'tabbar-forward)

		 ;设置进入VIP模式的快捷键,注意Win键的设置方法
		 (global-set-key (kbd "s-z") 'vip-mode)

		 ;显示缓冲区对应的文件全路径
		 (defun display-buffer-name ()
		   (interactive)
			 (message (buffer-file-name (current-buffer))))

你可能感兴趣的:(c,Solaris,Ruby,emacs,lisp)