(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)))))
07-29