Created
July 3, 2017 08:49
-
-
Save quinncnl/c696462aea00f9bf21e58c6a6677a12a to your computer and use it in GitHub Desktop.
xxxxxx
This file contains 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
(when (>= emacs-major-version 24) | |
(require 'package) | |
(add-to-list | |
'package-archives | |
'("melpa" . "http://melpa.org/packages/") | |
t) | |
(package-initialize)) | |
(require 'org) | |
(add-hook 'after-init-hook 'global-company-mode) | |
(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 | |
("f831c1716ebc909abe3c851569a402782b01074e665a4c140e3e52214f7504a0" "77515a438dc348e9d32310c070bfdddc5605efc83671a159b223e89044e4c4f1" "b8c5adfc0230bd8e8d73450c2cd4044ad7ba1d24458e37b6dec65607fc392980" "2d5c40e709543f156d3dee750cd9ac580a20a371f1b1e1e3ecbef2b895cf0cd2" "1a094b79734450a146b0c43afb6c669045d7a8a5c28bc0210aba28d36f85d86f" "6e03b7f86fcca5ce4e63cda5cd0da592973e30b5c5edf198eddf51db7a12b832" "1e90834a232ff3b63c41b00e484754293a5c38d73080ddc6f77db72feb0b2f98" "afbb40954f67924d3153f27b6d3399df221b2050f2a72eb2cfa8d29ca783c5a8" default)))) | |
(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. | |
) | |
(setq backup-directory-alist `(("." . "~/.saves"))) | |
(global-hl-line-mode 1) | |
(display-time-mode 1) | |
(global-set-key (kbd "C-.") 'other-window) | |
(global-set-key (kbd "C-,") 'prev-window) | |
(defun prev-window () | |
(interactive) | |
(other-window -1)) | |
;(ac-config-default) | |
;(global-auto-complete-mode t) | |
;(add-to-list 'ac-modes 'poly-markdown-mode) | |
;(add-to-list 'auto-mode-alist '("\\.md\\'" . poly-markdown-mode)) | |
;(add-hook 'html-mode-hook 'auto-complete-mode) | |
;(add-hook 'poly-markdown-mode-hook 'auto-complete-mode) | |
;(add-hook 'js-mode-hook 'auto-complete-mode) | |
(require 'google-translate) | |
(require 'google-translate-default-ui) | |
(global-set-key (kbd "C-x x") 'google-translate-at-point) | |
;(global-set-key "\C-x x" 'google-translate-smooth-translate) | |
(add-hook 'python-mode-hook 'jedi:setup) | |
(defun nl2en () | |
(interactive) | |
(setq google-translate-default-source-language "nl") | |
(setq google-translate-default-target-language "en") | |
(message "nl2en") | |
) | |
(defun en2nl () | |
(interactive) | |
(setq google-translate-default-source-language "en") | |
(setq google-translate-default-target-language "nl") | |
(message "en2nl") | |
) | |
(defun en2zh () | |
(interactive) | |
(setq google-translate-default-source-language "en") | |
(setq google-translate-default-target-language "zh-CN") | |
(message "nl2cn") | |
) | |
(en2zh) | |
;(setq google-translate-translation-directions-alist | |
; '( ("nl" . "en") ("en" . "zh-CN") ("en" . "en") ("nl" . "en"))) | |
;(global-set-key (kbd "C-:") 'ac-complete-with-helm) | |
;(define-key ac-complete-mode-map (kbd "C-:") 'ac-complete-with-helm) | |
;(global-set-key (kbd "C-x m") 'openArchive) | |
(global-set-key (kbd "C-x /") 'string-insert-rectangle) | |
(display-time-mode 1) | |
(require 'helm-config) | |
(global-set-key (kbd "M-x") 'helm-M-x) | |
;(global-set-key (kbd "C-I") 'ac-complete-with-helm) | |
;(define-key ac-complete-mode-map (kbd "C-I") 'ac-complete-with-helm) | |
(require 'yasnippet) | |
(yas-global-mode 1) | |
;(global-linum-mode 1) | |
(size-indication-mode 1) | |
(menu-bar-mode -1) | |
(toggle-scroll-bar -1) | |
(tool-bar-mode -1) | |
(add-hook 'markdown-mode-hook 'flyspell-mode) | |
(setq ispell-program-name "/usr/bin/aspell") | |
(defun dictUS () | |
(interactive) | |
(setenv "DICTIONARY" "en_US") | |
) | |
(defun dictNL () | |
(interactive) | |
(setenv "DICTIONARY" "nl") | |
) | |
(dictUS) | |
(setq make-backup-files nil) | |
(setq inhibit-startup-message t) | |
;(add-hook 'markdown-mode-hook 'auto-complete-mode) | |
(global-set-key (kbd "C-x m") 'helm-bookmarks) | |
(add-to-list 'yas-snippet-dirs "~/yasnippet-snippets") | |
(load-theme 'grandshell t) | |
(global-set-key (kbd "C-x w") 'wiki-summary) | |
(global-set-key (kbd "C-x a") 'beginning-of-buffer) | |
(global-set-key (kbd "C-x e") 'end-of-buffer) | |
(global-set-key (kbd "C-x <down>") 'shrink-window) | |
(global-set-key (kbd "C-x <up>") 'enlarge-window) | |
(add-to-list 'load-path "~/.emacs.d/lisp") | |
(require 'multi-term) | |
(setq multi-term-program "/bin/bash") | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment