summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2015-03-10 00:14:33 -0400
committerKyle Meyer <kyle@kyleam.com>2015-03-10 00:14:33 -0400
commit7feb46a375e072b361f08e9d799f20ac4b50f279 (patch)
tree6f047883cf923b76c0d8d99e84a5084185720e50 /lisp
parentd0cff250c9a73c45375a17b27dc933ae190c2825 (diff)
downloademacs.d-7feb46a375e072b361f08e9d799f20ac4b50f279.tar.gz
Switch from ido to helm
Diffstat (limited to 'lisp')
-rw-r--r--lisp/init-diminish.el1
-rw-r--r--lisp/init-dired.el4
-rw-r--r--lisp/init-files.el7
-rw-r--r--lisp/init-git.el1
-rw-r--r--lisp/init-gnus.el21
-rw-r--r--lisp/init-helm.el31
-rw-r--r--lisp/init-ido.el36
-rw-r--r--lisp/init-org.el3
-rw-r--r--lisp/init-projectile.el1
9 files changed, 38 insertions, 67 deletions
diff --git a/lisp/init-diminish.el b/lisp/init-diminish.el
index 900d655..b29030e 100644
--- a/lisp/init-diminish.el
+++ b/lisp/init-diminish.el
@@ -1,6 +1,7 @@
(require 'diminish)
(diminish 'abbrev-mode "Ab")
+(after 'helm-mode (diminish 'helm-mode))
(after 'flyspell (diminish 'flyspell-mode "Fy"))
(after 'paredit (diminish 'paredit-mode " Pe"))
(after 'magit (diminish 'magit-auto-revert-mode))
diff --git a/lisp/init-dired.el b/lisp/init-dired.el
index 1de657f..2be6a2a 100644
--- a/lisp/init-dired.el
+++ b/lisp/init-dired.el
@@ -42,8 +42,8 @@
(pop-to-buffer (km/dired-completing-buffer)))
(defun km/dired-completing-buffer ()
- (ido-completing-read "Dired buffer: "
- (-map 'buffer-name (km/dired-buffer-list))))
+ (completing-read "Dired buffer: "
+ (-map 'buffer-name (km/dired-buffer-list))))
(defun km/dired-buffer-list ()
(--filter (with-current-buffer it
diff --git a/lisp/init-files.el b/lisp/init-files.el
index ff16aca..a8ff7eb 100644
--- a/lisp/init-files.el
+++ b/lisp/init-files.el
@@ -34,7 +34,7 @@
(defun km/find-file-as-root ()
"Automatically edit file with root-privileges."
(interactive)
- (let ((file (ido-read-file-name "Edit as root: ")))
+ (let ((file (read-file-name "Edit as root: ")))
(unless (file-writable-p file)
(setq file (concat "/sudo:root@localhost:" file)))
(find-file file)))
@@ -51,8 +51,6 @@ Use the current file name as initial input of prompt."
(global-set-key (kbd "C-x C-w") 'km/write-file)
-(key-chord-define-global "jc" 'find-file)
-
(define-key ctl-x-4-map "v" 'view-file-other-window)
(define-prefix-command 'km/file-map)
@@ -114,9 +112,8 @@ entering `ch' is equivalent to `*.[ch]'.")
;; `view-file-other-window', which I map to 'v', has the same
;; functionality.
(defun km/read-recent-file ()
- (ido-completing-read "Choose recent file: " recentf-list nil t))
+ (completing-read "Choose recent file: " recentf-list nil t))
-(key-chord-define-global "jt" 'km/recentf-find-file)
(define-key ctl-x-4-map "r" 'km/recentf-find-file-other-window)
diff --git a/lisp/init-git.el b/lisp/init-git.el
index a4b2597..59d52b1 100644
--- a/lisp/init-git.el
+++ b/lisp/init-git.el
@@ -17,7 +17,6 @@
(require 'orgit)
(setq magit-restore-window-configuration t
- magit-completing-read-function 'magit-ido-completing-read
magit-delete-by-moving-to-trash nil
magit-log-show-margin nil)
diff --git a/lisp/init-gnus.el b/lisp/init-gnus.el
index 8782534..e556b53 100644
--- a/lisp/init-gnus.el
+++ b/lisp/init-gnus.el
@@ -75,27 +75,6 @@ is off."
(string< (gnus-group-topic (gnus-info-group info1))
(gnus-group-topic (gnus-info-group info2))))
-(defun km/gnus-group-jump-to-group ()
- "`gnus-group-jump-to-group', but with ido completion."
- (interactive)
- (gnus-group-jump-to-group
- (ido-completing-read "Group: "
- (mapcar #'car (cdr gnus-newsrc-alist))
- nil t)))
-
-(defun km/gnus-topic-jump-to-topic ()
- "`gnus-group-jump-to-group', but with ido completion."
- (interactive)
- (gnus-topic-jump-to-topic
- (ido-completing-read "Topic: "
- (mapcar #'car gnus-topic-alist)
- nil t)))
-
-(define-key gnus-group-mode-map [remap gnus-group-jump-to-group]
- 'km/gnus-group-jump-to-group)
-(define-key gnus-group-mode-map [remap gnus-topic-jump-to-topic]
- 'km/gnus-topic-jump-to-topic)
-
(define-key gnus-group-mode-map "e" 'gnus-group-select-group)
diff --git a/lisp/init-helm.el b/lisp/init-helm.el
new file mode 100644
index 0000000..594b99a
--- /dev/null
+++ b/lisp/init-helm.el
@@ -0,0 +1,31 @@
+
+(require 'helm)
+(require 'helm-config)
+
+(setq helm-split-window-in-side-p t
+ helm-move-to-line-cycle-in-source t
+ helm-ff-skip-boring-files t)
+
+(defun km/helm-ff-org-open-file ()
+ "Run `org-open-file' from `helm-source-find-files'."
+ (interactive)
+ (with-helm-alive-p
+ (helm-quit-and-execute-action #'org-open-file)))
+
+(global-set-key (kbd "C-c h") 'helm-command-prefix)
+(global-set-key (kbd "C-x c") nil)
+
+(after 'helm-files
+ (define-key helm-find-files-map (kbd "C-c x") 'km/helm-ff-org-open-file))
+
+(define-key helm-map ";" 'helm-maybe-exit-minibuffer)
+
+(key-chord-define-global "jc" 'helm-find-files)
+(key-chord-define-global "jt" 'helm-mini)
+(key-chord-define-global "kx" 'helm-M-x)
+
+(define-key search-map "k" 'helm-swoop)
+
+(helm-mode 1)
+
+(provide 'init-helm)
diff --git a/lisp/init-ido.el b/lisp/init-ido.el
deleted file mode 100644
index 08b9303..0000000
--- a/lisp/init-ido.el
+++ /dev/null
@@ -1,36 +0,0 @@
-
-(setq ido-enable-prefix nil
- ido-enable-flex-matching t
- ido-default-file-method 'selected-window
- ido-default-buffer-method 'selected-window
- ido-create-new-buffer 'always
- ido-use-filename-at-point 'guess
- ido-auto-merge-work-directories-length -1
- ido-max-prospects 10
- ido-save-directory-list-file "~/.emacs.d/cache/ido.hist"
- ido-max-directory-size 100000)
-
-;; Disable ido faces to see flx highlights.
-(setq ido-use-faces nil)
-
-(setq ido-file-extensions-order
- '(".org" ".txt" ".md" ".rst" ".tex" ".py" ".el" ".hs"))
-
-(setq completion-ignored-extensions
- (append '(".out" ".log" ".fls" ".fdb" ".fdb_latexmk")
- completion-ignored-extensions))
-
-(add-hook 'dired-mode-hook
- (lambda ()
- (set (make-local-variable 'ido-use-filename-at-point) nil)))
-
-(ido-mode 1)
-(ido-vertical-mode)
-(ido-everywhere)
-(flx-ido-mode)
-(ido-ubiquitous-mode)
-(ido-at-point-mode)
-
-(key-chord-define-global "vv" 'ido-switch-buffer)
-
-(provide 'init-ido)
diff --git a/lisp/init-org.el b/lisp/init-org.el
index 46054a7..38e2569 100644
--- a/lisp/init-org.el
+++ b/lisp/init-org.el
@@ -21,8 +21,7 @@
org-use-extra-keys t
org-fast-tag-selection-single-key 'expert)
-(setq org-completion-use-ido t
- org-outline-path-complete-in-steps nil
+(setq org-outline-path-complete-in-steps nil
org-goto-interface 'outline-path-completionp
org-goto-max-level 3)
diff --git a/lisp/init-projectile.el b/lisp/init-projectile.el
index 29d915a..eb75daf 100644
--- a/lisp/init-projectile.el
+++ b/lisp/init-projectile.el
@@ -1,6 +1,7 @@
(require 'projectile)
(setq projectile-find-dir-includes-top-level t
+ projectile-completion-system 'helm
projectile-use-git-grep t)
(defun km/projectile-switch-project (&optional arg)