emacs使用 -- 默认配置,不断更新中
2012-04-24 00:00
441 查看
设置默认c文件缩进风格
;;define my c mode hook
(defun mychook()
(c-set-style "linux"))
(add-hook 'c-mode-hook 'mychook)
M-x hs-minor-mode
For Emacs 21:
•C-c @ C-M-s show all
•C-c @ C-M-h hide all
•C-c @ C-s show block
•C-c @ C-h hide block
•C-c @ C-c toggle hide/show
(add-hook 'c-mode-hook 'hs-minor-mode)
indent and de-indent
C-c >
C-c <
================My Configuration File========================
(global-set-key [(meta g)] 'goto-line)
(global-set-key [(meta p)] 'backward-kill-word)
(global-set-key [(ctrl f)] 'hs-toggle-hiding)
(global-set-key (kbd "C-c #") 'comment-region)
;;define my c mode hook
(defun mychook()
(c-set-style "linux"))
(add-hook 'c-mode-hook 'mychook)
(add-hook 'c-mode-hook 'hs-minor-mode)
;;open .bbclass or .bb files with python mode
(add-to-list 'auto-mode-alist '("\\.bbclass$" . python-mode))
(add-to-list 'auto-mode-alist '("\\.bb$" . python-mode))
=======================================================
2012-12-31
global-set-key [(meta g)] 'goto-line)
(global-set-key [(meta p)] 'backward-kill-word)
(global-set-key (kbd "C-c #") 'comment-region)
;;define my c mode hook
(defun mychook()
(c-set-style "linux"))
(add-hook 'c-mode-hook 'mychook)
(add-hook 'c-mode-hook 'hs-minor-mode)
;;open .bbclass or .bb files with python mode
(add-to-list 'auto-mode-alist '("\\.bbclass$" . python-mode))
(add-to-list 'auto-mode-alist '("\\.bb$" . python-mode))
(add-to-list 'auto-mode-alist '("\\.inc$" . python-mode))
;;make system c/p work with emacs's c/p
(setq x-select-enable-clipboard t)
(setq interprogram-paste-function 'x-cut-buffer-or-selection-value)
(require 'whitespace)
(setq whitespace-style '(face empty tabs lines-tail trailing))
(global-whitespace-mode t)
============= 2013-06-23 === 增加默认highlight===============
(global-set-key [(meta g)] 'goto-line)
(global-set-key [(meta p)] 'backward-kill-word)
(global-set-key (kbd "C-c #") 'comment-region)
;;define my c mode hook
(defun mychook()
(c-set-style "linux"))
(add-hook 'c-mode-hook 'mychook)
(add-hook 'c-mode-hook 'hs-minor-mode)
;;define hightlight hook
(defun highlight()
(highlight-regexp ".*\\[100%\\]" "hi-green")
(highlight-regexp ".*\\[critical\\]" "hi-red-b")
(highlight-regexp ".*\\[important\\]" "hi-red-b")
(highlight-regexp ".*\\[to do\\]" "hi-blue")
(highlight-regexp ".*\\[work\\]" "hi-yellow"))
(add-hook 'text-mode-hook 'highlight)
;;open .bbclass or .bb files with python mode
(add-to-list 'auto-mode-alist '("\\.bbclass$" . python-mode))
(add-to-list 'auto-mode-alist '("\\.bb$" . python-mode))
(add-to-list 'auto-mode-alist '("\\.inc$" . python-mode))
;;make system c/p work with emacs's c/p
(setq x-select-enable-clipboard t)
(setq interprogram-paste-function 'x-cut-buffer-or-selection-value)
(require 'whitespace)
(setq whitespace-style '(face empty tabs lines-tail trailing))
(global-whitespace-mode t)
;;define my c mode hook
(defun mychook()
(c-set-style "linux"))
(add-hook 'c-mode-hook 'mychook)
M-x hs-minor-mode
For Emacs 21:
•C-c @ C-M-s show all
•C-c @ C-M-h hide all
•C-c @ C-s show block
•C-c @ C-h hide block
•C-c @ C-c toggle hide/show
(add-hook 'c-mode-hook 'hs-minor-mode)
indent and de-indent
C-c >
C-c <
================My Configuration File========================
(global-set-key [(meta g)] 'goto-line)
(global-set-key [(meta p)] 'backward-kill-word)
(global-set-key [(ctrl f)] 'hs-toggle-hiding)
(global-set-key (kbd "C-c #") 'comment-region)
;;define my c mode hook
(defun mychook()
(c-set-style "linux"))
(add-hook 'c-mode-hook 'mychook)
(add-hook 'c-mode-hook 'hs-minor-mode)
;;open .bbclass or .bb files with python mode
(add-to-list 'auto-mode-alist '("\\.bbclass$" . python-mode))
(add-to-list 'auto-mode-alist '("\\.bb$" . python-mode))
=======================================================
2012-12-31
global-set-key [(meta g)] 'goto-line)
(global-set-key [(meta p)] 'backward-kill-word)
(global-set-key (kbd "C-c #") 'comment-region)
;;define my c mode hook
(defun mychook()
(c-set-style "linux"))
(add-hook 'c-mode-hook 'mychook)
(add-hook 'c-mode-hook 'hs-minor-mode)
;;open .bbclass or .bb files with python mode
(add-to-list 'auto-mode-alist '("\\.bbclass$" . python-mode))
(add-to-list 'auto-mode-alist '("\\.bb$" . python-mode))
(add-to-list 'auto-mode-alist '("\\.inc$" . python-mode))
;;make system c/p work with emacs's c/p
(setq x-select-enable-clipboard t)
(setq interprogram-paste-function 'x-cut-buffer-or-selection-value)
(require 'whitespace)
(setq whitespace-style '(face empty tabs lines-tail trailing))
(global-whitespace-mode t)
============= 2013-06-23 === 增加默认highlight===============
(global-set-key [(meta g)] 'goto-line)
(global-set-key [(meta p)] 'backward-kill-word)
(global-set-key (kbd "C-c #") 'comment-region)
;;define my c mode hook
(defun mychook()
(c-set-style "linux"))
(add-hook 'c-mode-hook 'mychook)
(add-hook 'c-mode-hook 'hs-minor-mode)
;;define hightlight hook
(defun highlight()
(highlight-regexp ".*\\[100%\\]" "hi-green")
(highlight-regexp ".*\\[critical\\]" "hi-red-b")
(highlight-regexp ".*\\[important\\]" "hi-red-b")
(highlight-regexp ".*\\[to do\\]" "hi-blue")
(highlight-regexp ".*\\[work\\]" "hi-yellow"))
(add-hook 'text-mode-hook 'highlight)
;;open .bbclass or .bb files with python mode
(add-to-list 'auto-mode-alist '("\\.bbclass$" . python-mode))
(add-to-list 'auto-mode-alist '("\\.bb$" . python-mode))
(add-to-list 'auto-mode-alist '("\\.inc$" . python-mode))
;;make system c/p work with emacs's c/p
(setq x-select-enable-clipboard t)
(setq interprogram-paste-function 'x-cut-buffer-or-selection-value)
(require 'whitespace)
(setq whitespace-style '(face empty tabs lines-tail trailing))
(global-whitespace-mode t)
相关文章推荐
- WINDOWS 8 使用与配置汇总(不断更新)
- Emacs笔记——配置篇(不断更新中)
- Nginx配置使用积累[不断更新]
- Matlab 默认配置汇总(不断更新。。。)
- Emacs配置命令(不断更新)
- Sublime Text 配置使用总结(不断更新....)
- 配置solr服务(默认使用jetty部署)
- 【java】Maven项目开发中pom.xml常用配置,不断更新
- [技巧分享-eclipse使用]eclipse配置默认内部或外部浏览器
- CXF WebService 8 - 在cxf中使用配置避免增加字段导致客户端必须更新、同步实体属性的问题
- eclipse中使用maven创建项目和更新项目JDK版本默认是1.5解决方法
- mysql 使用技巧 不断更新
- Java日志组件logback使用:加载非类路径下的配置文件并设置定时更新
- 修改配置文件使Netbeans默认使用UTF-8编码
- jquery操作,项目中使用实例集----会不断更新收集
- 整理 PHPstorm实用个人配置,修改调整个性化快捷键,修改使用phpstorm创建的模板的默认注释:
- Maven配置默认使用的JDK版本
- Ubuntu的一些使用小技巧【不断更新中】
- 删除顽固的重复MYSQL及其它使用技巧(不断更新)
- Linux中命令使用笔记(不断更新...)