Skip to content

Instantly share code, notes, and snippets.

@Bystroushaak
Last active August 29, 2015 14:24
Show Gist options
  • Save Bystroushaak/1f1d049e950ab7489d4e to your computer and use it in GitHub Desktop.
Save Bystroushaak/1f1d049e950ab7489d4e to your computer and use it in GitHub Desktop.
(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.
'(custom-safe-themes (quote ("645599a2aab022fd7777124515a3104a60ba64d2bafdd77a6e7703f8ae97250c" default)))
'(minimap-hide-scroll-bar t)
'(minimap-window-location 'right)
'(show-paren-mode t)
'(tool-bar-mode nil))
(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 "Terminus" :foundry "xos4" :slant normal :weight normal :height 105 :width normal)))))
;; Other settings
(scroll-bar-mode -1)
(global-linum-mode 1)
(global-hl-line-mode 1)
(set-face-background 'hl-line "#3e4446")
(set-face-foreground 'highlight nil)
;; Packages
(require 'package)
(add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/"))
(add-to-list 'package-archives '("org" . "http://orgmode.org/elpa/"))
(add-to-list 'custom-theme-load-path "~/.emacs.d/themes")
(load-theme 'sunburst t)
(require 'ido)
(setq ido-enable-flex-matching t)
(setq ido-everywhere t)
(ido-mode 1)
(setq ido-use-filename-at-point 'guess)
(setq ido-create-new-buffer 'always)
(package-initialize)
(defalias 'yes-or-no-p 'y-or-n-p)
;; Load after start
(autoload 'company-mode "company" nil t)
(global-company-mode)
(add-hook 'after-init-hook 'minimap-toggle)
(add-hook 'after-init-hook 'global-company-mode)
(add-to-list 'company-backends 'company-anaconda)
(add-hook 'python-mode-hook 'anaconda-mode)
;(if (window-system)
; (set-frame-size (selected-frame) 124 80))
(setq desktop-path (list user-emacs-directory)
desktop-auto-save-timeout 60)
(desktop-save-mode 1)
(setq inhibit-startup-message t
inhibit-startup-echo-area-message t)
; Own macros
(fset 'macro-newline-from-middle
[end return])
(fset 'macro-newline-with-colon
[end ?: return])
(fset 'macro-newline-with-comma
[end ?, return])
;; Key shortcuts
(setq ns-right-alternate-modifier nil)
(setq option-key-is-meta t)
(setq x-meta-keysym 'super
x-super-keysym 'meta)
(define-key global-map (kbd "RET") 'newline-and-indent)
(define-key global-map (kbd "<S-return>") 'macro-newline-with-comma)
(define-key global-map (kbd "<M-return>") 'macro-newline-with-colon)
(define-key global-map (kbd "C-a") 'mark-whole-buffer)
(define-key global-map (kbd "C-S-p") 'execute-extended-command)
; Redefine ctrl+enter
(require 'cua-base)
(require 'cua-rect)
(setq cua-rectangle-mark-key "")
(define-key global-map (kbd "<C-return>") 'macro-newline-from-middle)
(cua-mode 1)
(drag-stuff-global-mode)
; Map escape to cancel (like C-g)...
(define-key isearch-mode-map [escape] 'isearch-abort) ;; isearch
(define-key isearch-mode-map "\e" 'isearch-abort) ;; \e seems to work better for terminals
(global-set-key [escape] 'keyboard-escape-quit) ;; everywhere else
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment