aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.emacs.d/init.el43
-rw-r--r--.emacs.d/modes/init-evil-mode.el15
-rw-r--r--.emacs.d/modes/init-org-mode.el27
-rw-r--r--.vim/init.vim2
-rw-r--r--.vim/plugins/easymotion.vim3
5 files changed, 56 insertions, 34 deletions
diff --git a/.emacs.d/init.el b/.emacs.d/init.el
index bf131b5..3c48275 100644
--- a/.emacs.d/init.el
+++ b/.emacs.d/init.el
@@ -8,22 +8,7 @@
(setq vc-follow-symlinks t)
(setq backup-directory-alist
`(("." . ,(concat user-emacs-directory "backups"))))
-
-(defun set-exec-path-from-shell-PATH ()
- "Set up Emacs' `exec-path' and PATH environment variable to match
-that used by the user's shell.
-
-This is particularly useful under Mac OS X and macOS, where GUI
-apps are not started from a shell."
- (interactive)
- (let ((path-from-shell (replace-regexp-in-string
- "[ \t\n]*$" "" (shell-command-to-string
- "$SHELL --login -c 'echo $PATH'"
- ))))
- (setenv "PATH" path-from-shell)
- (setq exec-path (split-string path-from-shell path-separator))))
-
-(set-exec-path-from-shell-PATH)
+(setq-default fill-column 72)
(dolist (package '(use-package))
(unless (package-installed-p package)
@@ -61,9 +46,9 @@ apps are not started from a shell."
;; Company Mode
(use-package company
- :hook ((after-init . global-company-mode)
- (org-mode . (lambda () (company-mode -1)))
- (ledger-mode . (lambda () (company-mode -1)))))
+ :init
+ (setq company-global-modes '(emacs-lisp-mode))
+ :hook ((after-init . global-company-mode)))
;; Projectile
(use-package projectile
@@ -80,7 +65,7 @@ apps are not started from a shell."
(setq ivy-use-virtual-buffers t)
(setq ivy-count-format "(%d/%d) ")
(setq ivy-re-builders-alist
- '((t . ivy--regex-fuzzy)
+ '((read-file-name-internal . ivy--regex-fuzzy)
(t . ivy--regex-plus)))
(evil-define-key 'normal ivy-mode-map
(kbd "<leader>fb") 'ivy-switch-buffer
@@ -94,8 +79,26 @@ apps are not started from a shell."
:ensure t
:config
(dashboard-setup-startup-hook)
+ (setq dashboard-startup-banner nil)
(setq dashboard-items '((recents . 5)
(bookmarks . 5)
(projects . 5)
(agenda . 5)
(registers . 5))))
+
+(use-package markdown-mode
+ :ensure t
+ :commands (markdown-mode gfm-mode)
+ :mode (("README\\.md\\'" . gfm-mode)
+ ("\\.md\\'" . markdown-mode)
+ ("\\.markdown\\'" . markdown-mode))
+ :init
+ (setq markdown-command "multimarkdown"))
+
+(use-package exec-path-from-shell
+ :if (memq window-system '(mac ns))
+ :ensure t
+ :config
+ (exec-path-from-shell-initialize))
+
+(use-package avy)
diff --git a/.emacs.d/modes/init-evil-mode.el b/.emacs.d/modes/init-evil-mode.el
index ee7983a..ba04ca5 100644
--- a/.emacs.d/modes/init-evil-mode.el
+++ b/.emacs.d/modes/init-evil-mode.el
@@ -3,11 +3,11 @@
:hook (evil-org-mode . (lambda () (setq evil-want-C-i-jump nil)))
:init
(setq evil-want-integration t
+ evil-want-C-u-scroll t
+ evil-wannt-fine-undo t
evil-want-keybinding nil)
:config
(evil-set-leader 'normal ",")
- (setq evil-want-C-u-scroll t)
- (setq evil-want-fine-undo t)
(evil-set-undo-system 'undo-tree)
(evil-mode 1))
@@ -23,7 +23,14 @@
:config
(evil-escape-mode)
(setq-default
- evil-escape-key-sequence "jk"
- evil-escape-unordered-key-sequence t))
+ evil-escape-delay 0.2
+ evil-escape-key-sequence "jk"
+ evil-escape-unordered-key-sequence t))
+
+(use-package evil-easymotion
+ :ensure t
+ :after (evil avy)
+ :config
+ (evilem-default-keybindings "SPC"))
(provide 'init-evil-mode)
diff --git a/.emacs.d/modes/init-org-mode.el b/.emacs.d/modes/init-org-mode.el
index ca1be2a..a542b2c 100644
--- a/.emacs.d/modes/init-org-mode.el
+++ b/.emacs.d/modes/init-org-mode.el
@@ -1,5 +1,6 @@
(use-package org
:after evil
+ :commands org-agenda
:config
(setq org-directory "~/notes/")
(setq org-default-notes-file (concat org-directory "/inbox.org"))
@@ -14,7 +15,7 @@
(setq org-agenda-start-on-weekday 0)
(setq org-adapt-indentation nil)
(setq org-return-follows-link t)
- (setq org-log-done t)
+ (setq org-descriptive-links nil)
(evil-define-key 'normal 'global
(kbd "<leader>a") 'org-agenda
(kbd "<leader>l") 'org-store-link
@@ -22,28 +23,36 @@
(evil-define-key 'normal org-mode-map
(kbd "TAB") 'org-cycle
(kbd "RET") 'org-open-at-point)
+ (setq org-agenda-skip-deadline-prewarning-if-scheduled t)
+ ; todo
(setq org-todo-keywords
- '((sequence "TODO" "|" "DONE" "CANCELED")))
+ '((sequence "TODO" "NEXT" "WAITING" "SOMEDAY" "PROJECT" "|" "DONE" "CANCELED")))
+ (setq org-log-done t)
+
+ ; tags
(setq org-tag-alist '((:startgroup . nil)
("work" . ?w) ("home" . ?h) ("errants" . ?e)
(:endgroup . nil)
("@phone" . ?p)))
- (setq org-icalendar-include-todo t)
- (setq org-icalendar-combined-agenda-file "~/notes/org.ics")
- (add-hook 'org-mode-hook
- (lambda ()
- (add-hook 'after-save-hook 'org-icalendar-combine-agenda-files nil t))))
+ ; org babel
+ (org-babel-do-load-languages
+ 'org-babel-load-languages
+ '((shell . t))))
(use-package evil-org
:ensure t
:after (org evil)
:hook (org-mode . (lambda () (evil-org-mode)))
-
:config
(evil-org-set-key-theme '(navigation insert textobjects additional calendar todo))
(require 'evil-org-agenda)
- (evil-org-agenda-set-keys))
+ (evil-org-agenda-set-keys)
+ (evil-define-key 'motion org-agenda-mode-map
+ (kbd "q") (lambda ()
+ (interactive)
+ (org-save-all-org-buffers)
+ (org-agenda-quit))))
(provide 'init-org-mode)
diff --git a/.vim/init.vim b/.vim/init.vim
index 93bebcc..58f7e0a 100644
--- a/.vim/init.vim
+++ b/.vim/init.vim
@@ -4,7 +4,7 @@ set nocompatible
set number
set backspace=indent,eol,start
syntax on
-set encoding=utf-8
+set fileencodings=ucs=bom,utf-8,utf-16,gbk,big5,gb18030,latin1
set t_Co=256
set showcmd
set autoread
diff --git a/.vim/plugins/easymotion.vim b/.vim/plugins/easymotion.vim
new file mode 100644
index 0000000..ce87f12
--- /dev/null
+++ b/.vim/plugins/easymotion.vim
@@ -0,0 +1,3 @@
+Plug 'easymotion/vim-easymotion'
+
+map <Space> <Plug>(easymotion-prefix)