Improved readability; trying helm again
This commit is contained in:
parent
2c535360ab
commit
60fe531400
118
init.el
118
init.el
|
@ -1,29 +1,37 @@
|
|||
;UTF-8 magic
|
||||
;;;; UTF-8 magic
|
||||
(setq locale-coding-system 'utf-8)
|
||||
(set-terminal-coding-system 'utf-8)
|
||||
(set-keyboard-coding-system 'utf-8)
|
||||
(set-selection-coding-system 'utf-8)
|
||||
(prefer-coding-system 'utf-8)
|
||||
;Simplify the GUI, thanks http://www.masteringemacs.org/articles/2010/10/04/beginners-guide-to-emacs/
|
||||
|
||||
;;;; Simplify the GUI, thanks http://www.masteringemacs.org/articles/2010/10/04/beginners-guide-to-emacs/
|
||||
(menu-bar-mode -1)
|
||||
(tool-bar-mode -1)
|
||||
(scroll-bar-mode -1)
|
||||
;Tab settings
|
||||
|
||||
;;;; Tab settings
|
||||
(setq default-tab-width 4)
|
||||
(define-key text-mode-map (kbd "TAB") 'self-insert-command)
|
||||
;Fix scrolling
|
||||
|
||||
;;;; Fix scrolling
|
||||
(setq scroll-conservatively 1)
|
||||
;Fix Emacs' definition of a sentence
|
||||
|
||||
;;;; Fix Emacs' definition of a sentence
|
||||
(setq sentence-end-double-space nil)
|
||||
;Shiny wrap style, thanks Xah Lee
|
||||
|
||||
;;;; Shiny wrap style, thanks Xah Lee
|
||||
(global-visual-line-mode 1)
|
||||
;Highlight current line and show line numbers
|
||||
|
||||
;;;; Highlight current line and show line numbers
|
||||
(global-hl-line-mode 1)
|
||||
(global-linum-mode 1)
|
||||
; linum-relative
|
||||
|
||||
;;;; linum-relative
|
||||
;(require 'linum-relative)
|
||||
;(linum-mode 1)
|
||||
;Custom keys
|
||||
|
||||
;;;; Custom keys
|
||||
;(global-set-key (kbd "<escape>") 'god-mode-all)
|
||||
(global-set-key (kbd "C-y") 'whole-line-or-region-yank)
|
||||
(global-set-key (kbd "M-w") 'whole-line-or-region-kill-ring-save)
|
||||
|
@ -42,82 +50,108 @@
|
|||
(global-set-key (kbd "C-x cf") 'make-frame)
|
||||
(global-unset-key (kbd "C-x d"))
|
||||
(global-set-key (kbd "C-x df") 'delete-frame)
|
||||
;Fix multi-line indenting - thanks forcer!
|
||||
(defun hn/add-tab-in-front-of-every-line-in-region (beg end) (interactive "r")
|
||||
(save-excursion (goto-char beg) (goto-char (point-at-bol)) (while (re-search-forward "^" end t) (insert "\t"))))
|
||||
(global-set-key (kbd "C-.") 'hn/add-tab-in-front-of-every-line-in-region)
|
||||
;Indicate god-mode with cursor color
|
||||
|
||||
;;;; Fix multi-line indenting - thanks forcer!
|
||||
;(defun hn/add-tab-in-front-of-every-line-in-region (beg end) (interactive "r")
|
||||
;(save-excursion (goto-char beg) (goto-char (point-at-bol)) (while (re-search-forward "^" end t) (insert "\t"))))
|
||||
;(global-set-key (kbd "C-.") 'hn/add-tab-in-front-of-every-line-in-region)
|
||||
|
||||
;;;; Indicate god-mode with cursor color
|
||||
;(defun my-update-cursor ()
|
||||
;(set-cursor-color
|
||||
;(if (or god-local-mode buffer-read-only) "#ffffff" "#ff0000")))
|
||||
;(add-hook 'god-mode-enabled-hook 'my-update-cursor)
|
||||
;(add-hook 'god-mode-disabled-hook 'my-update-cursor)
|
||||
; Transparent Emacs window
|
||||
|
||||
;;;; Transparent Emacs window
|
||||
;;(set-frame-parameter (selected-frame) 'alpha '(<active> [<inactive>]))
|
||||
;(set-frame-parameter (selected-frame) 'alpha '(90 50))
|
||||
;(add-to-list 'default-frame-alist '(alpha 90 50))
|
||||
;(add-to-list 'load-path "~/.emacs.d/elisp/")
|
||||
;MELPA
|
||||
|
||||
;;;; MELPA
|
||||
(require 'package)
|
||||
(add-to-list 'package-archives
|
||||
'("melpa" . "http://melpa.milkbox.net/packages/") t)
|
||||
(require 'package)
|
||||
(add-to-list 'package-archives
|
||||
'("melpa-stable" . "http://melpa-stable.milkbox.net/packages/") t)
|
||||
|
||||
;//// //// //// //// //// ////
|
||||
;//// PACKAGE INITIALIZE ////
|
||||
;//// //// //// //// //// ////
|
||||
(package-initialize)
|
||||
; Set theme
|
||||
|
||||
;;;; Set theme
|
||||
(load-theme 'distinguished t)
|
||||
; God Mode
|
||||
|
||||
;;;; God Mode
|
||||
;(require 'god-mode)
|
||||
; Evil mode
|
||||
|
||||
;;;; Evil mode
|
||||
(require 'evil)
|
||||
(evil-mode 1)
|
||||
; Ace Jump mode
|
||||
|
||||
;;;; Ace Jump mode
|
||||
;(require 'ace-jump-mode)
|
||||
;(define-key global-map (kbd "C-c SPC") 'ace-jump-mode)
|
||||
; Emms
|
||||
|
||||
;;;; Emms
|
||||
(add-to-list 'load-path "~/elisp/emms/")
|
||||
(require 'emms-setup)
|
||||
(emms-standard)
|
||||
(emms-default-players)
|
||||
;Enable Ido mode
|
||||
(require 'ido)
|
||||
(ido-mode t)
|
||||
;(global-set-key (kbd "DEL") 'ido-delete-backward-updir)
|
||||
(define-key ido-buffer-completion-map (kbd "C-h") 'ido-delete-backward-updir)
|
||||
(setq ido-enable-flex-matching t)
|
||||
;Ido-ubiquitous
|
||||
|
||||
;;;; Enable Ido mode
|
||||
;(require 'ido)
|
||||
;(ido-mode t)
|
||||
;(define-key ido-buffer-completion-map (kbd "C-h") 'ido-delete-backward-updir)
|
||||
;(setq ido-enable-flex-matching t)
|
||||
;;(global-set-key (kbd "DEL") 'ido-delete-backward-updir)
|
||||
|
||||
;;;; smex - Ido for Alt-x (M-x)
|
||||
;(require 'smex)
|
||||
;(smex-initialize)
|
||||
;(global-set-key (kbd "M-x") 'smex)
|
||||
|
||||
;;;; Ido-ubiquitous
|
||||
;(require 'ido-ubiquitous)
|
||||
;(ido-ubiquitous-mode 1)
|
||||
; Helm
|
||||
;(require 'helm-config)
|
||||
;(helm-mode 1)
|
||||
; zlc
|
||||
|
||||
;;;; Helm
|
||||
(require 'helm-config)
|
||||
(require 'helm-grep)
|
||||
(global-set-key (kbd "C-c h") 'helm-command-prefix)
|
||||
(global-unset-key (kbd "C-x c"))
|
||||
(define-key helm-map (kbd "C-h") 'helm-ff--deleting-char-backward)
|
||||
(global-set-key (kbd "M-x") 'helm-M-x)
|
||||
(helm-mode 1)
|
||||
|
||||
;;;; zlc
|
||||
;(require 'zlc)
|
||||
;(zlc-mode t)
|
||||
; smex - Ido for Alt-x (M-x)
|
||||
(require 'smex)
|
||||
(smex-initialize)
|
||||
(global-set-key (kbd "M-x") 'smex)
|
||||
; Session.el
|
||||
|
||||
;;;; Session.el
|
||||
(require 'session)
|
||||
(add-hook 'after-init-hook 'session-initialize)
|
||||
; Recentf-mode
|
||||
|
||||
;;;; Recentf-mode
|
||||
(require 'recentf)
|
||||
(recentf-mode 1)
|
||||
(setq recentf-max-menu-items 25)
|
||||
(global-set-key "\C-x\ \C-r" 'recentf-open-files)
|
||||
; text size change
|
||||
|
||||
;;;; text size change
|
||||
(set-face-attribute 'default nil :font "-outline-Bitstream Vera Sans Mono-normal-normal-normal-mono-12-*-*-*-c-*-iso8859-1")
|
||||
; Ediff stuff
|
||||
|
||||
;;;; Ediff stuff
|
||||
(setq ediff-window-setup-function 'ediff-setup-windows-plain)
|
||||
; ERC
|
||||
|
||||
;;;; ERC
|
||||
;(setq erc-log-channels-directory "~/.emacs.d/erc/logs/")
|
||||
;(setq erc-log-write-after-insert t)
|
||||
; yafolding.el
|
||||
|
||||
;;;; yafolding.el
|
||||
(add-hook 'prog-mode-hook
|
||||
(lambda () (yafolding-mode)))
|
||||
; Win-switch
|
||||
|
|
Loading…
Reference in New Issue