Emacs 配置文件

(setq default-frame-alist
                 '((vertical-scroll-bars)  
                   (top . 25)  
                   (left . 45)  
                   (width . 120)  
                   (height . 40)  
                   (background-color . "black")  
                   (foreground-color . "grey")  
                   (cursor-color . "gold1")  
                   (mouse-color . "gold1")  
                   (tool-bar-lines . 0)  
                   (menu-bar-lines . 1)  
                   (scroll-bar-lines . 0)  
                   (right-fringe)  
                   (left-fringe)))  

    (set-face-foreground 'highlight "white")  
    (set-face-background 'highlight "blue")  
    (set-face-foreground 'region "cyan")  
    (set-face-background 'region "blue")  
    (set-face-foreground 'secondary-selection "skyblue")  
    (set-face-background 'secondary-selection "darkblue")  

    (defun my-c-mode-auto-pair()  
        (interactive)  
        (make-local-variable'skeleton-pair-alist)  
        (setq skeleton-pair-alist'(  
            (?\" _ "\"" >)  
            (?\' _ "\'" >)  
            (?\( _ ")" >)  
            (?\[ _ "]" >) (?{ > _ \n ?} >))) (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(kbd"\'")'skeleton-pair-insert-maybe) ) (add-hook'c++-mode-hook'my-c-mode-auto-pair) (add-hook'c-mode-hook'my-c-mode-auto-pair) (column-number-mode t) (global-linum-mode t) (setq make-backup-files nil) (setq auto-save-mode nil) (show-paren-mode t) (setq show-paren-style'parenthesis) (setq inhibit-splash-screen t) (setq default-tab-width 2) (defun my-compile() (interactive) (save-some-buffers t) (let((file(file-name-nondirectory buffer-file-name))) (compile (format "g++ %s -g -o %s" file (file-name-sans-extension file)))) (switch-to-buffer-other-window"*compilation*") ) (defun my-compileO2() (interactive) (save-some-buffers t) (let((file(file-name-nondirectory buffer-file-name))) (compile (format "g++ %s -g -o %s -O2" file (file-name-sans-extension file)))) (switch-to-buffer-other-window"*compilation*") ) (defun my-compilec++11() (interactive) (save-some-buffers t) (let((file(file-name-nondirectory buffer-file-name))) (compile (format "g++ %s -g -o %s -std=c++11" file (file-name-sans-extension file)))) (switch-to-buffer-other-window"*compilation*") ) (global-set-key(kbd"RET")'newline-and-indent) (global-set-key[f4]'other-window) (global-set-key[f9]'my-compile) (global-set-key[f10]'my-compileO2) (global-set-key[f11]'my-compilec++11) (global-set-key[f5]'gdb) (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) '(cua-mode t nil (cua-base)) '(show-paren-mode t)) (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 "Courier New" :foundry "outline" :slant normal :weight normal :height 120 :width normal))))) 
  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值