Last active
January 6, 2020 17:47
-
-
Save lazanet/16398c43e4c5b6dfafbb8f049ec2c44b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Various settings: | |
(package-initialize) | |
(cua-mode 1) ;; Enable ^Z, ^X, ^C, ^V, select with mouse and shift-cursor-movement | |
(transient-mark-mode 1) ;; No region when it is not highlighted | |
(setq cua-keep-region-after-copy t) ;; Standard MS-Windows behaviour | |
(setq-default line-spacing 1) ;; Add 1 pixel between lines | |
(recentf-mode) ;; Add menu-item "File--Open recent" | |
; Define some additional "native-Windows" keystrokes (^tab, Alt/F4, ^A, ^F, ^O, | |
; ^S, ^W) and redefine (some of) the overridden Emacs functions. | |
(global-set-key (kbd "<backtab>") 'other-window) | |
(global-set-key [M-f4] 'save-buffers-kill-emacs) | |
(global-set-key "\C-a" 'mark-whole-buffer) | |
(global-set-key "\C-f" 'isearch-forward) | |
(global-set-key "\C-o" 'find-file) | |
(global-set-key "\C-s" 'save-buffer) | |
(global-set-key "\C-w" 'kill-this-buffer) | |
(global-set-key (kbd "C-S-o") 'open-line) | |
(global-set-key (kbd "C-S-w") 'kill-region) | |
(define-key global-map (kbd "RET") 'newline-and-indent) ; For programming language modes | |
(define-key isearch-mode-map "\C-f" 'isearch-repeat-forward) | |
; Make Fortran 90 also auto-indent: | |
(add-hook 'f90-mode-hook (lambda () | |
(local-set-key (kbd "RET") 'reindent-then-newline-and-indent))) | |
; Default colours are too light (to see colour names do M-x list-colors-display | |
; and to see faces do M-x list-faces-display): | |
(set-face-foreground font-lock-type-face "dark green") | |
(set-face-foreground font-lock-builtin-face "Orchid4") | |
(set-face-foreground font-lock-constant-face "CadetBlue4") | |
(set-face-foreground font-lock-keyword-face "Purple4") | |
(set-face-foreground font-lock-string-face "IndianRed4") | |
(set-face-foreground font-lock-variable-name-face "SaddleBrown") | |
(semantic-mode 1) | |
(global-ede-mode t) | |
(if (boundp 'semantic-ia) (require 'semantic-ia)) | |
(if (boundp 'semantic-gcc) (require 'semantic-gcc)) | |
(defalias 'yes-or-no-p 'y-or-n-p) | |
(setq linum-format "%4d \u2502 ") | |
(global-linum-mode 1) | |
(global-set-key (kbd "<f5>") 'compile) | |
(global-set-key (kbd "<f9>") 'delete-other-windows) | |
(global-set-key (kbd "<f8>") 'split-window-right) | |
(global-hl-line-mode 1) | |
(set-face-background 'highlight "#000") | |
(set-face-foreground 'highlight nil) | |
(set-face-underline-p 'highlight t) | |
(set-face-background 'mode-line "#555555") | |
(global-set-key (kbd "S-C-<left>") 'shrink-window-horizontally) | |
(global-set-key (kbd "S-C-<right>") 'enlarge-window-horizontally) | |
(global-set-key (kbd "S-C-<down>") 'shrink-window) | |
(global-set-key (kbd "S-C-<up>") 'enlarge-window) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment