Browse files

Let C-u C-x C-f be git-find-file.

  • Loading branch information...
1 parent c28326d commit 7abb291a0aca1866df6d3380a132170c270da7b6 @nelhage committed Sep 17, 2012
Showing with 7 additions and 2 deletions.
  1. +7 −2 dot-emacs
View
9 dot-emacs
@@ -430,6 +430,11 @@ unable to perform symbol completion.")
("\C-p" . ido-prev-match))))
(add-hook 'ido-minibuffer-setup-hook 'my-ido-keys)
+
+(defun my-find-file (arg)
+ (interactive "P")
+ (call-interactively (if arg 'git-find-file 'ido-find-file)))
+
(global-set-key (kbd "C-x C-f") 'my-find-file)
; (require 'iswitchb)
; (iswitchb-mode nil)
@@ -451,7 +456,7 @@ unable to perform symbol completion.")
;
; (add-hook 'iswitchb-minibuffer-setup-hook 'iswitchb-local-keys)
-(defun git-find-file ()
+(defun git-find-file ()
"Use ido to select a file from the git repo"
(interactive)
(let* ((my-project-root (git-wc-root))
@@ -478,7 +483,7 @@ unable to perform symbol completion.")
)
project-files)
(let ((ido-decorations (quote ("\n-> " "" "\n " "\n ..." "[" "]" " [No match]" " [Matched]" " [Not readable]" " [Too big]" " [Confirm]")))
- (truncate-lines nil))
+ (truncate-lines nil))
(find-file (gethash (ido-completing-read "files: " ido-list) tbl))))))
(require 'windmove)

0 comments on commit 7abb291

Please sign in to comment.