转投emacs

(global-set-key [f9] 'compile-file)
(global-set-key [f10] 'gud-gdb)
(global-set-key (kbd "C-z") 'undo)
(global-set-key (kbd "C-a") 'mark-whole-buffer)
(global-set-key (kbd "C-x a") 'indent-region)
(global-set-key (kbd "C-s") 'save-buffer)
(global-set-key (kbd "RET") 'newline-and-indent)
(global-set-key (kbd "C-q") 'kill-emacs)
(global-set-key (kbd "C-h") 'kill-this-buffer)
(global-set-key (kbd "M-z") 'loop-alpha)
(setq alpha-list '((100 100) (85 65) (50 35)))
(defun loop-alpha ()(interactive)(let ((h (car alpha-list)))
((lambda (a ab)(set-frame-parameter (selected-frame) 'alpha (list a ab))
(add-to-list 'default-frame-alist (cons 'alpha (list a ab)))) (car h) (car (cdr h)))
(setq alpha-list (cdr (append alpha-list (list h))))))
(setq-default indent-tabs-mode t)
(setq default-tab-width 4)
(setq c-default-style "Linux")
(setq c-basic-offset 4)
(global-linum-mode t)
(global-set-key (kbd "C-d") 'kill-whole-line)
(show-paren-mode t)
(setq default-frame-alist
'((vertical-scroll-bars)
(top . 0)
(left . 0)
(width . 80)
(height . 40)
(background-color . "white")
(foreground-color . "black")
(cursor-color . "gold1")
(mouse-color . "gold1")
(tool-bar-lines . 0)
(menu-bar-lines . 1)
(scroll-bar-lines . 0)
(right-fringe)
(left-fringe)))
(global-hl-line-mode 1)
(set-face-background 'highlight "skyblue")
(set-face-foreground 'region "cyan")
(set-face-background 'region "blue")
(set-face-foreground 'secondary-selection "white")
(set-face-background 'secondary-selection "darkblue")
(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)
(defun compile-file ()
(interactive)
(compile (format "g++ -o %s %s -g -lm -Wall" (file-name-sans-extension (buffer-name))(buffer-name))))
(setq-default cursor-type 'bar)
(custom-set-variables
'(column-number-mode t)
'(cua-mode t nil (cua-base))
'(inhibit-startup-screen t)
'(show-paren-mode t))
(custom-set-faces
'(default ((t (:family "Ubuntu Mono" :foundry "DAMA" :slant normal :weight normal :height 128 :width normal)))))
(setq x-select-enable-clipboard t)
(unless window-system
(when (getenv "DISPLAY")
(defun xsel-cut-function (text &optional push)
(with-temp-buffer(insert text)
(call-process-region (point-min) (point-max) "xsel" nil 0 nil "--clipboard" "--input")))
(defun xsel-paste-function()
(let ((xsel-output (shell-command-to-string "xsel --clipboard --output")))
(unless (string= (car kill-ring) xsel-output)xsel-output )))
(setq interprogram-cut-function 'xsel-cut-function)
(setq interprogram-paste-function 'xsel-paste-function)))

考试特供-10行配置

我灰常的短!!

(global-set-key [f9] 'foo)
(global-set-key [f10] 'gud-gdb)
(global-set-key (kbd "RET") 'newline-and-indent)
(global-linum-mode t)
(setq-default indent-tabs-mode t)
(setq default-tab-width 4)
(setq c-default-style "Linux")
(setq c-basic-offset 4)
(setq-default cursor-type 'bar)
(defun foo()(interactive)(compile (format "g++ -o %s %s -g -Wall" (file-name-sans-extension(buffer-name))(buffer-name))))

就是酱紫
喜欢的话点个推荐吧

posted @ 2017-10-23 07:54  iot;  阅读(352)  评论(2编辑  收藏  举报
知识共享许可协议
年轻人,你需要更多的知识